public void Create_PropertyTypeMissmatch_Exception()
        {
            var          subject   = new SingleBuilder();
            PropertyInfo missmatch = this.Property(nameof(TypeMismatch));

            Assert.That(() => subject.Create(missmatch, null), Throws.InstanceOf <FormatException>());
        }
        public void Create_ExactConversion_Instance()
        {
            var          subject  = new SingleBuilder();
            PropertyInfo exact    = this.Property(nameof(ExactType));
            object       instance = subject.Create(exact, null);

            Assert.That(instance, Is.InstanceOf(exact.PropertyType));
        }
        public void Create_CompatibleConversion_Instance()
        {
            var          subject    = new SingleBuilder();
            PropertyInfo compatible = this.Property(nameof(CompatibleConversion));
            object       instance   = subject.Create(compatible, null);

            Assert.That(instance, Is.InstanceOf(compatible.PropertyType));
        }
        public void Create_NotAProperty_NoOp()
        {
            var    subject      = new SingleBuilder();
            object notAProperty = typeof(int);
            var    noOp         = subject.Create(notAProperty, null);

            Assert.That(noOp, Is.InstanceOf <NoSpecimen>());
        }
        public void Create_PropertyOfUnsupportedType_NoOp()
        {
            var          subject       = new SingleBuilder();
            PropertyInfo unhandledType = this.Property(nameof(Unhandled));

            var noOp = subject.Create(unhandledType, null);

            Assert.That(noOp, Is.InstanceOf <NoSpecimen>());
        }
        public void Create_PropertyNotDecorated_NoOp()
        {
            var subject = new SingleBuilder();

            PropertyInfo notDecorated = this.Property(nameof(NotDecorated));
            var          noOp         = subject.Create(notDecorated, null);

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