Пример #1
0
        //ncrunch: no coverage start
        static void Main(string[] args)
        {
            FileExtensionManager myManager = new FileExtensionManager();

            ExtensionManagerFactory.SetManager(myManager);

            LogAnalyzer logAn = new LogAnalyzer();

            logAn.IsValidLogFileName("ValidFileName.SLF");
        }
Пример #2
0
        //ncrunch: no coverage start
        static void Main(string[] args)
        {
            ////////////////
            // Using Constructor Injection
            ////////////////
            FakeExtensionManager myFakeManager = new FakeExtensionManager();

            LogAnalyzer logAn = new LogAnalyzer(myFakeManager);

            logAn.IsValidLogFileName("ValidFileName.SLF");
        }
Пример #3
0
 static void Main(string[] args)
 {
     LogAnalyzer logAnalyzer = new LogAnalyzer();
     if (logAnalyzer.IsValidLogFileName("hello"))
     {
         System.Console.WriteLine("Valid.");
     }
     else
     {
         System.Console.WriteLine("Invalid.");
     }
     System.Console.ReadKey();
 }
        //ncrunch: no coverage start
        static void Main(string[] args)
        {
            LogAnalyzer logAn = new LogAnalyzer();

            logAn.IsValidLogFileName("ValidFileName.SLF");
        }
Пример #5
0
 public void IsValidLogFileName_GoodExtensions_ReturnsTrue(string filename)
 {
     LogAnalyzer analyzer = new LogAnalyzer();
     bool result = analyzer.IsValidLogFileName(filename);
     Assert.True(result);
 }
Пример #6
0
 public void IsValidLogFileName_BadExtension_ReturnsFalse()
 {
     LogAnalyzer analyzer = new LogAnalyzer();
     bool result = analyzer.IsValidLogFileName("filewithbadextension.foo");
     Assert.False(result);
 }