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>();
    }
Beispiel #3
0
        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>();
        }
Beispiel #4
0
        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>();
 }
Beispiel #7
0
        public void CreateReturnsNoSpecimentIfRequestIsNotICustomAttributeProvider()
        {
            var sut = new ContentAttributeRelay();

            sut.Create(new object(), null).Should().BeOfType <NoSpecimen>();
        }
Beispiel #8
0
        public void CreateReturnsNoSpecimentIfRequestIsNull()
        {
            var sut = new ContentAttributeRelay();

            sut.Create(null, null).Should().BeOfType <NoSpecimen>();
        }