public void IsSatisfiedByWithNullRequestShouldThrowArgumentNullException() { // Fixture setup var sut = new DirectBaseTypeSpecification(typeof(object)); // Exercise system and verify outcome Assert.Throws<ArgumentNullException>(() => sut.IsSatisfiedBy(null)); // Teardown }
public void IsSatisfiedByWithRequestForSameTypeShouldReturnTrue() { // Fixture setup var targetType = typeof(ConcreteType); var requestedType = typeof(ConcreteType); var sut = new DirectBaseTypeSpecification(targetType); // Exercise system var result = sut.IsSatisfiedBy(requestedType); // Verify outcome Assert.True(result); // Teardown }
public void IsSatisfiedByWithInvalidRequestShouldReturnFalse(object request) { // Fixture setup var sut = new DirectBaseTypeSpecification(typeof(ConcreteType)); // Exercise system var result = sut.IsSatisfiedBy(request); // Verify outcome Assert.False(result); // Teardown }