public void MatchReturnTrueForClassSatisfyingExpression1() { // Given var argument = ""; var sut = new MatchArgChecker <string>(x => x != null); // When var result = sut.Match(argument); // Then Assert.True(result); }
public void MatchReturnTrueForSatisfyingExpression() { // Given var argument = 10; var sut = new MatchArgChecker <int>(x => x > 5); // When var result = sut.Match(argument); // Then Assert.True(result); }
public void MatchReturnFalseForNullableInvalidTypes() { // Given int?argument = 11; var sut = new MatchArgChecker <long?>(x => x.HasValue && x.Value == 11); // When var result = sut.Match(argument); // Then Assert.False(result); }
public void MatchReturnFalseForClassInvalidTypes() { // Given var argument = ""; var sut = new MatchArgChecker <object>(x => x != null); // When var result = sut.Match(argument); // Then Assert.False(result); }
public void MatchReturnTrueForNullableSatisfyingExpression2() { // Given int?argument = 11; var sut = new MatchArgChecker <int?>(x => x.HasValue && x.Value == 11); // When var result = sut.Match(argument); // Then Assert.True(result); }