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); }
public void MustInstantiatePropertiesOfSpecifiedTypeInDefaultConstructorConventionSpecification_SuccessWithMultipleTypes() { typeof(InstantiatesPropertiesProperly) .MustConformTo(Convention.MustInstantiatePropertiesOfSpecifiedTypeInDefaultConstructor(new [] { typeof(IEnumerable <>), typeof(Money) })) .IsSatisfied .Should() .BeTrue(); }
public void MustInstantiateValueTypesInDefaultConstructor() { AggregateRoots() .MustConformTo(Convention.MustInstantiatePropertiesOfSpecifiedTypeInDefaultConstructor(ValueTypes())); }