Exemplo n.º 1
0
        public void TestSetLog()
        {
            var log = new TestLogObject();

            Log.SetLog(log);
            Log.WriteInfoToLog("does this work?");

            Assert.AreEqual("does this work?", log.SeeLogDetails().Trim());
        }
Exemplo n.º 2
0
        public void TestWriteErrorToLog()
        {
            var testlog = new TestLogObject();

            Log.SetLog(testlog);

            var exception = new Exception("This is going on the log");

            Log.WriteErrorToLog("We had a problem", exception);

            var testString = testlog.SeeLogDetails();

            Assert.IsTrue(testString.Contains("We had a problem"));
            Assert.IsTrue(testString.Contains(exception.Message));
        }
Exemplo n.º 3
0
        public void TestFacade_WriteAlbumsGavStyleNoFix()
        {
            var settings = FormatterSettingsTests.GetDefaultSettings();

            settings.Format     = FormatStyle.Gav;
            settings.FixTags    = false;
            settings.CopyOrMove = CopyType.Copy;

            var log = new TestLogObject();

            var facade = new Mp3FormatterFacade(settings);

            facade.ProcessLog = log;

            facade.Process();
        }
Exemplo n.º 4
0
        public void TestFacade_WriteAlbumsPeteStyleWithFix()
        {
            var settings = FormatterSettingsTests.GetDefaultSettings();

            settings.Format     = FormatStyle.Pete;
            settings.FixTags    = true;
            settings.CopyOrMove = CopyType.Copy;

            var log = new TestLogObject();

            var facade = new Mp3FormatterFacade(settings);

            facade.ProcessLog = log;

            facade.Process();

            var mp3 = GetFile("Von Hertzen Brothers - 2013 - Nine Lives\\02-vhb-flowers_and_rust.mp3");

            Assert.AreEqual("Von Hertzen Brothers", mp3.AlbumArtist);
        }