Ejemplo n.º 1
0
        public void Should_not_invoke_pipelined_requirement_when_name_does_not_start_with_the_prefix()
        {
            var inner = Substitute.For <INamingRequirement>();

            var subject = new PrefixedNamingRequirement("_", inner);

            subject.Matches("Funny");

            inner.DidNotReceive().Matches("Funny");
        }
Ejemplo n.º 2
0
        public void Should_invoke_pipelined_requirement_with_prefix_stripped_when_name_starts_with_the_prefix()
        {
            var inner = Substitute.For <INamingRequirement>();

            var subject = new PrefixedNamingRequirement("_", inner);

            subject.Matches("_funny");

            inner.Received(1).Matches("funny");
        }
Ejemplo n.º 3
0
        public void Should_return_false_when_string_does_not_start_with_the_prefix()
        {
            var subject = new PrefixedNamingRequirement("_");

            subject.Matches("Funny").Should().BeFalse();
        }
Ejemplo n.º 4
0
        public void Should_return_true_when_string_starts_with_the_prefix()
        {
            var subject = new PrefixedNamingRequirement("_");

            subject.Matches("_funny").Should().BeTrue();
        }