AOUT.CH3.LogAn.Tests.LogAnalyzerConstructorStubTests.IsValidFileName_NameShorterThan6CharsButSupportedExtension_ReturnsFalse C# (CSharp) Method

IsValidFileName_NameShorterThan6CharsButSupportedExtension_ReturnsFalse() private method

        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");
        }