コード例 #1
0
        public void Create_NotAProperty_NoOp()
        {
            var    subject      = new NullableBuilder();
            object notAProperty = typeof(int);
            var    noOp         = subject.Create(notAProperty, null);

            Assert.That(noOp, Is.InstanceOf <NoSpecimen>());
        }
コード例 #2
0
        public void Create_NullableNotNull_NotNull()
        {
            var subject = new NullableBuilder();

            PropertyInfo nullableNotNull = this.Property(nameof(NullableNotNull));
            var          notNull         = subject.Create(nullableNotNull, null);

            Assert.That(notNull, Is.InstanceOf(nullableNotNull.PropertyType).And.Not.Null);
        }
コード例 #3
0
        public void Create_NullableNull_Null()
        {
            var subject = new NullableBuilder();

            PropertyInfo nullableNull = this.Property(nameof(NullableNull));
            var          @null        = subject.Create(nullableNull, null);

            Assert.That(@null, Is.Null);
        }
コード例 #4
0
        public void Create_NotNullable_NoOp()
        {
            var subject = new NullableBuilder();

            PropertyInfo notNullable = this.Property(nameof(NotNullable));
            var          noOp        = subject.Create(notNullable, null);

            Assert.That(noOp, Is.InstanceOf <NoSpecimen>());
        }