Tests.AnalyseCommandTests.Analyse_Index_Complex_Successful C# (CSharp) Method

Analyse_Index_Complex_Successful() private method

private Analyse_Index_Complex_Successful ( ) : void
return void
        public void Analyse_Index_Complex_Successful()
        {
            // Init
            const string sourceFolder = @"D:\music\";
            var mp3Files = new List<IMp3File>
            {
                new FakeMp3File(new Mp3Tags{Title = "title1"}, sourceFolder + "4. anothertitle.mp3"),
                new FakeMp3File(new Mp3Tags{Title = "title2"}, sourceFolder + "2. title2.mp3"),
                new FakeMp3File(new Mp3Tags{Title = "title3"}, sourceFolder + "qw. title3.mp3"),
            };
            var fakeWriter = new FakeWorker();
            var commandPool = mp3Files.Select(mp3File => new AnalyseCommand(mp3File, "{index}. {title}", fakeWriter)).Cast<Command>().ToList();

            // Act
            commandPool.ForEach(command => command.Execute());

            // Assert
            var message = "File: " + mp3Files[0].FullName + "\n" +
                         "{title} in file name: anothertitle; {title} in tags: title1\n\n" +
                         "Index out of range. Maximum is 3:\n" +
                         "\t" + "4. anothertitle" + "\n\n" +
                         "Index must be number\n" +
                         "\t" + "qw. title3" + "\n\n" +
                         "Some indexes are missing: " + "1, 3.\n\n";

            Assert.AreEqual(message, fakeWriter.Stream.ToString());
        }