public void Matches_WhenFirstValueIsNotContext_ReturnsFalse(ContextControlStringMatcher unit) { unit.Context = "foo"; var fixture = new Fixture(); fixture.Customizations.Add(new InlineConstructorParams <ControlString>(0, 3, new Queue <string>(new[] { "bar" }))); var controlString = fixture.Create <ControlString>(); unit.Matches(controlString).ShouldBeFalse(); }
public void Matches_WhenFirstValueIsContextAndSubMatcherDoesNotMatch_ReturnsFalse([Frozen] IControlStringMatcher submatcher, ContextControlStringMatcher unit) { Mock.Get(submatcher).Setup(x => x.Matches(It.IsAny <ControlString>())).Returns(false); unit.Context = "foo"; var fixture = new Fixture(); fixture.Customizations.Add(new InlineConstructorParams <ControlString>(0, 3, new Queue <string>(new[] { unit.Context }))); var controlString = fixture.Create <ControlString>(); unit.Matches(controlString).ShouldBeFalse(); }
public void Matches_WhenControlStringIsNull_ThrowsArgumentNullException(ContextControlStringMatcher unit) { Should.Throw <ArgumentNullException>(() => unit.Matches(null)); }