コード例 #1
0
        public void MustInstantiatePropertiesOfSpecifiedTypeInDefaultConstructorConventionSpecification_FailsWhenPropertiesAreNotInstantiateInTheDefaultConstructor_WithMultipleTypes()
        {
            var result = typeof(DoesNotInstantiatePropertiesProperly)
                         .MustConformTo(Convention.MustInstantiatePropertiesOfSpecifiedTypeInDefaultConstructor(new[] { typeof(IEnumerable <>), typeof(Money) }));

            result.IsSatisfied.Should().BeFalse();
            result.Failures.Should().HaveCount(1);
        }
コード例 #2
0
 public void MustInstantiatePropertiesOfSpecifiedTypeInDefaultConstructorConventionSpecification_SuccessWithMultipleTypes()
 {
     typeof(InstantiatesPropertiesProperly)
     .MustConformTo(Convention.MustInstantiatePropertiesOfSpecifiedTypeInDefaultConstructor(new [] { typeof(IEnumerable <>), typeof(Money) }))
     .IsSatisfied
     .Should()
     .BeTrue();
 }
コード例 #3
0
 public void MustInstantiateValueTypesInDefaultConstructor()
 {
     AggregateRoots()
     .MustConformTo(Convention.MustInstantiatePropertiesOfSpecifiedTypeInDefaultConstructor(ValueTypes()));
 }