Esempio n. 1
0
        public void Write_FileDoesNotExist_ShouldCreateFile()
        {
            File.Delete(_LOGFILEPATH);
            _serviceLogger = new ServiceLogger(_LOGFILEPATH);

            _serviceLogger.Write("cake schedule service");

            Assert.That(File.Exists(_LOGFILEPATH), Is.EqualTo(true));
        }
Esempio n. 2
0
        public void Write_FolderInLogFilePathDoesNotExist_ShouldNotThrowException()
        {
            _serviceLogger = new ServiceLogger(@"c:\NotExistingFolder\CakeScheduleService.log");

            Assert.DoesNotThrow(() => _serviceLogger.Write("Some message"));
        }