Ejemplo n.º 1
0
        public void IsValidFileName_SupportedExtension_ReturnsTrue()
        {
            FakeExtensionManager myFakeManager = new FakeExtensionManager();
            LogAnalyzer          log           = MakeAnalyzer();

            myFakeManager.WillThrow = new Exception("");
            log.ExtensionManager    = myFakeManager;

            bool result = log.IsValidFileName("anything.anyextension");

            Assert.True(result);
        }
Ejemplo n.º 2
0
        public void IsValidFileName_NameSupportedExtension_ReturnsTrue()
        {
            FakeExtensionManager myFakeManager = new FakeExtensionManager();

            myFakeManager.WillBeValid = true;
            LogAnalyzer log = new LogAnalyzer();

            log.ExtensionManager = myFakeManager;
            bool result = log.IsValidFileName("short.ext");

            Assert.True(result);
        }