public void NullCandidate_NoException() { var sut = new MockCommonSpecification <object>(); var exception = Record.Exception(() => sut.IsNotSatisfiedBy(null, out _)); Assert.Null(exception); }
public void Nullable_ReturnTrue() { var sut = new MockCommonSpecification <int?>(); var result = sut.IsNotSatisfiedBy(0); Assert.True(result); }
public void IncorrectData_ReturnFalse <T>(T candidate) { var sut = new MockCommonSpecification <T>(); var result = sut.IsNotSatisfiedBy(candidate); Assert.False(result); }
public void IncorrectData_ReturnExpectedResultObject <T>(T candidate, SpecificationResult expected) { var sut = new MockCommonSpecification <T>(); var overall = sut.IsNotSatisfiedBy(candidate, out var result); Assert.False(overall); Assert.Equal(expected, result, new SpecificationResultComparer()); }
public void Nullable_ReturnExpectedResultObject() { var expected = new SpecificationResult("NotMockCommonSpecification<Nullable<Int32>>"); var sut = new MockCommonSpecification <int?>(); var overall = sut.IsNotSatisfiedBy(0, out var result); Assert.True(overall); Assert.Equal(expected, result, new SpecificationResultComparer()); }