public void IsSatisfiedByNullThrows() { // Arrange var dummyType = typeof(object); var sut = new ExactTypeSpecification(dummyType); // Act & assert Assert.Throws <ArgumentNullException>(() => sut.IsSatisfiedBy(null)); }
public void IsSatisfiedByNullThrows() { // Fixture setup var dummyType = typeof(object); var sut = new ExactTypeSpecification(dummyType); // Exercise system and verify outcome Assert.Throws <ArgumentNullException>(() => sut.IsSatisfiedBy(null)); // Teardown }
public void IsSatisfiedByMatchesExactlyOpenGenerics(Type specType, Type requestType, bool expectedResult) { // Arrange var sut = new ExactTypeSpecification(specType); // Act var result = sut.IsSatisfiedBy(requestType); // Assert Assert.Equal(expectedResult, result); }
public void IsSatisfiedByReturnsCorrectResult(Type specType, Type requestType, bool expectedResult) { // Arrange var sut = new ExactTypeSpecification(specType); // Act var result = sut.IsSatisfiedBy(requestType); // Assert Assert.Equal(expectedResult, result); }
public void SutIsRequestSpecification() { // Arrange var dummyType = typeof(object); // Act var sut = new ExactTypeSpecification(dummyType); // Assert Assert.IsAssignableFrom <IRequestSpecification>(sut); }
public void IsSatisfiedByReturnsCorrectResult(Type specType, Type requestType, bool expectedResult) { // Fixture setup var sut = new ExactTypeSpecification(specType); // Exercise system var result = sut.IsSatisfiedBy(requestType); // Verify outcome Assert.Equal(expectedResult, result); // Teardown }
public void SutIsRequestSpecification() { // Fixture setup var dummyType = typeof(object); // Exercise system var sut = new ExactTypeSpecification(dummyType); // Verify outcome Assert.IsAssignableFrom <IRequestSpecification>(sut); // Teardown }
public void TargetTypeIsCorrect() { // Arrange var expectedType = typeof(DayOfWeek); var sut = new ExactTypeSpecification(expectedType); // Act Type result = sut.TargetType; // Assert Assert.Equal(expectedType, result); }
public void TargetTypeIsCorrect() { // Fixture setup var expectedType = typeof(DayOfWeek); var sut = new ExactTypeSpecification(expectedType); // Exercise system Type result = sut.TargetType; // Verify outcome Assert.Equal(expectedType, result); // Teardown }