Exemplo n.º 1
0
        public void LoadFromWrongFile()
        {
            settings.MelodyLocation = "";
            var loader   = new MelodyFileLoader(changer, settings);
            var expected = StandardMelodyLoader.StandardMelodies.First().Value;
            var melody   = loader.Load();

            Assert.AreEqual(expected, melody);
        }
Exemplo n.º 2
0
        public void LoadFromRightFile()
        {
            Directory.SetCurrentDirectory(AppDomain.CurrentDomain.BaseDirectory);
            settings.MelodyLocation = Environment.CurrentDirectory + @"\Tests\1.txt";
            var loader   = new MelodyFileLoader(changer, settings);
            var expected = new Melody(new[] { Note.C, Note.D, Note.E, Note.F, Note.A, Note.B, Note.G });
            var melody   = loader.Load();

            Assert.AreEqual(expected, melody);
        }