Ejemplo n.º 1
0
        public void IsValidFileName_NameSupportedExtension_ReturnsTrue()
        {
            FakeExtensionManager myFakeManager =
                new FakeExtensionManager();

            myFakeManager.WillBeValid = false;
            LogAnalyzer log =
                new LogAnalyzer(myFakeManager);
            bool result = log.IsValidLogFileName("short.ext");

            Assert.False(result);
        }
Ejemplo n.º 2
0
        IsValidFileName_ExtManagerThrowsException_ReturnsFalse()
        {
            FakeExtensionManager myFakeManager =
                new FakeExtensionManager();

            myFakeManager.WillThrow = new Exception("this is fake");
            LogAnalyzer log =
                new LogAnalyzer(myFakeManager);
            bool result = log.IsValidLogFileName("anything.anyextension");

            Assert.False(result);
        }