public void EntityId_create_an_invalid()
        {
            var fixture = new Fixture();

            fixture.Register <EntityTestId>(() => EntityTestId.From(Guid.Empty));

            var entityId = fixture.Create <EntityTestId>();

            Assert.False(entityId.ValidationResults.IsValid);
        }
        public void EntityId_create_a_valid()
        {
            var fixture = new Fixture();

            fixture.Register <EntityTestId>(() => EntityTestId.From(fixture.Create <Guid>()));

            var entityId = fixture.Create <EntityTestId>();

            Assert.True(entityId.ValidationResults.IsValid);
        }
Пример #3
0
 public static EntityTestId Empty()
 {
     return(EntityTestId.From(Guid.Empty));
 }