Example #1
0
            public void Spec01()
            {
                using (var testable = new CreateTestable())
                {
                    var actual = testable.Instance.Create(null);

                    I.Expect(actual.Help).ToBeTrue();
                }
            }
Example #2
0
            public void Spec03()
            {
                using (var testable = new CreateTestable())
                {
                    var actual = testable.Instance.Create(new string[] { "/?" });

                    I.Expect(actual.Help).ToBeTrue();
                }
            }
Example #3
0
            public void Spec06()
            {
                using (var testable = new CreateTestable())
                {
                    var actual = testable.Instance.Create(new string[] { "source directory" });

                    I.Expect(actual.SourceDirectory).ToBe("source directory");
                    I.Expect(actual.Help).ToBeFalse();
                }
            }
Example #4
0
 public void Spec05()
 {
     using (var testable = new CreateTestable())
     {
         I.Expect(() =>
         {
             var actual = testable.Instance.Create(new string[] { "-s" });
         }).ToThrow <ArgumentException>();
     }
 }
Example #5
0
            public void Spec12()
            {
                using (var testable = new CreateTestable())
                {
                    var actual = testable.Instance.Create(new string[]
                    {
                        @"some\path\to\file.json"
                    });

                    I.Expect(actual.SettingsEditor).ToBe(true);
                }
            }
Example #6
0
            public void Spec07()
            {
                using (var testable = new CreateTestable())
                {
                    var actual = testable.Instance.Create(new string[]
                    {
                        "source directory",
                        "-settingsfile",
                        "settings file"
                    });

                    I.Expect(actual.SettingsFile).ToBe("settings file");
                }
            }
Example #7
0
            public void Spec09()
            {
                using (var testable = new CreateTestable())
                {
                    var actual = testable.Instance.Create(new string[]
                    {
                        "source directory",
                        "-loglevel",
                        "silent"
                    });

                    I.Expect(actual.LogLevel).ToBe(LogLevel.Silent);
                }
            }
Example #8
0
            public void Spec08()
            {
                using (var testable = new CreateTestable())
                {
                    var actual = testable.Instance.Create(new string[]
                    {
                        "source directory",
                        "-reportfile",
                        "report file"
                    });

                    I.Expect(actual.ReportFile).ToBe("report file");
                }
            }
Example #9
0
 public void Spec11()
 {
     using (var testable = new CreateTestable())
     {
         I.Expect(() =>
         {
             var actual = testable.Instance.Create(new string[]
             {
                 "source directory",
                 "/r",
                 "/s",
                 "settings file"
             });
         }).ToThrow <ArgumentException>();
     }
 }
Example #10
0
            public void Spec10()
            {
                using (var testable = new CreateTestable())
                {
                    var actual = testable.Instance.Create(new string[]
                    {
                        "source directory",
                        "/l",
                        "1",
                        "/r",
                        "report file",
                        "/s",
                        "settings file"
                    });

                    I.Expect(actual.SettingsFile).ToBe("settings file");
                    I.Expect(actual.ReportFile).ToBe("report file");
                    I.Expect(actual.LogLevel).ToBe(LogLevel.Verbose);
                }
            }