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"); }
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"); }
public void Should_return_false_when_string_does_not_start_with_the_prefix() { var subject = new PrefixedNamingRequirement("_"); subject.Matches("Funny").Should().BeFalse(); }
public void Should_return_true_when_string_starts_with_the_prefix() { var subject = new PrefixedNamingRequirement("_"); subject.Matches("_funny").Should().BeTrue(); }