public void MatchesValuesWithType() { var x = new AnyMatcher(typeof(int)); Assert.True(x.Matches(5)); Assert.False(x.Matches("foo")); }
public void NonNullableNeverMatchesNull() { var x = new AnyMatcher(typeof(int)); var y = AnyMatcher <int> .Default; Assert.False(x.Matches(null)); Assert.False(y.Matches(null)); }
public void NullableIntMatchesNull() { var x = new AnyMatcher(typeof(int?)); Assert.True(x.Matches(null)); }
public void MatchesDerivedType() { var x = new AnyMatcher(typeof(Base)); Assert.True(x.Matches(new Derived())); }