Exemple #1
0
        public void ShouldHaveDefault()
        {
            var target = new IgnoreMethodsInput {
                SuppliedInput = null
            };

            var result = target.Validate();

            result.ShouldBeEmpty();
        }
Exemple #2
0
        public void ShouldReturnRegex()
        {
            var target = new IgnoreMethodsInput {
                SuppliedInput = new[] { "Dispose" }
            };

            var result = target.Validate();

            result.ShouldHaveSingleItem().ToString().ShouldBe(@"^(?:[^.]*\.)*Dispose$");
        }
Exemple #3
0
        public void ShouldReturnMultipleItems()
        {
            var target = new IgnoreMethodsInput {
                SuppliedInput = new[] { "Dispose", "Test" }
            };

            var result = target.Validate();

            result.Count().ShouldBe(2);
            result.First().ToString().ShouldBe(@"^(?:[^.]*\.)*Dispose$");
            result.Last().ToString().ShouldBe(@"^(?:[^.]*\.)*Test$");
        }
Exemple #4
0
        public void ShouldHaveHelpText()
        {
            var target = new IgnoreMethodsInput();

            target.HelpText.ShouldBe(@"Ignore mutations on method parameters. | default: []");
        }