public void CreateReturnsNoSpecimenIfRequestIsNotPropertyInfo() { var sut = new ContentAttributeRelay(); var request = Substitute.For<ICustomAttributeProvider>(); request.GetCustomAttributes(Arg.Any<Type>(), Arg.Any<bool>()).Returns(new object[] { new ContentAttribute() }); sut.Create(request, null).Should().BeOfType<NoSpecimen>(); }
public void CreateReturnsNoSpecimenIfICustomAttributeProviderDoesNotReturnExpectedAttributeType() { var sut = new ContentAttributeRelay(); var request = Substitute.For<ICustomAttributeProvider>(); request.GetCustomAttributes(Arg.Any<Type>(), Arg.Any<bool>()).Returns(new object[0]); sut.Create(request, null).Should().BeOfType<NoSpecimen>(); }
public void CreateReturnsNoSpecimenIfRequestIsNotPropertyInfo() { var sut = new ContentAttributeRelay(); var request = Substitute.For <ICustomAttributeProvider>(); request.GetCustomAttributes(Arg.Any <Type>(), Arg.Any <bool>()).Returns(new object[] { new ContentAttribute() }); sut.Create(request, null).Should().BeOfType <NoSpecimen>(); }
public void CreateReturnsNoSpecimenIfICustomAttributeProviderDoesNotReturnExpectedAttributeType() { var sut = new ContentAttributeRelay(); var request = Substitute.For <ICustomAttributeProvider>(); request.GetCustomAttributes(Arg.Any <Type>(), Arg.Any <bool>()).Returns(new object[0]); sut.Create(request, null).Should().BeOfType <NoSpecimen>(); }
public void CreateReturnsNoSpecimentIfRequestIsNotICustomAttributeProvider() { var sut = new ContentAttributeRelay(); sut.Create(new object(), null).Should().BeOfType<NoSpecimen>(); }
public void CreateReturnsNoSpecimentIfRequestIsNull() { var sut = new ContentAttributeRelay(); sut.Create(null, null).Should().BeOfType<NoSpecimen>(); }
public void CreateReturnsNoSpecimentIfRequestIsNotICustomAttributeProvider() { var sut = new ContentAttributeRelay(); sut.Create(new object(), null).Should().BeOfType <NoSpecimen>(); }
public void CreateReturnsNoSpecimentIfRequestIsNull() { var sut = new ContentAttributeRelay(); sut.Create(null, null).Should().BeOfType <NoSpecimen>(); }