Inheritance: IExtensionManager
        public void IsValidFileName_NameShorterThan6CharsButSupportedExtension_ReturnsFalse()
        {
            //setup the stub to use, make sure it returns true
            StubExtensionManager myFakeManager = new StubExtensionManager();
            myFakeManager.ShouldBeValid = true;

            //create analyzer and inject stub
            LogAnalyzerConstructorStub log =
                new LogAnalyzerConstructorStub(myFakeManager);

            //Assert logic assuming extension is supprted
            bool result = log.IsValidLogFileName("short.ext");
            Assert.IsFalse(result,"File name with less than 5 chars should have failed the method, even if the extension is supported");
        }
Ejemplo n.º 2
0
        public void IsValidFileName_NameShorterThan6CharsButSupportedExtension_ReturnsFalse()
        {
            //setup the stub to use, make sure it returns true
            StubExtensionManager myFakeManager = new StubExtensionManager();

            myFakeManager.ShouldBeValid = true;

            //create analyzer and inject stub
            LogAnalyzerConstructorStub log =
                new LogAnalyzerConstructorStub(myFakeManager);

            //Assert logic assuming extension is supprted
            bool result = log.IsValidLogFileName("short.ext");

            Assert.IsFalse(result, "File name with less than 5 chars should have failed the method, even if the extension is supported");
        }