public void IsNew_is_true_when_first_created() { var entity = new TestableBaseEntityWithGuidKey(); Assert.True(entity.IsNew); Assert.Equal(Guid.Empty, entity.Id); }
public void GetIdentifier_does_return_id() { var id = Guid.NewGuid(); var entity = new TestableBaseEntityWithGuidKey(); entity.SetId(id); Assert.Equal(id, entity.GetIdentifier()); }
public void IsNew_is_false_when_id_not_zero() { var id = Guid.NewGuid(); var entity = new TestableBaseEntityWithGuidKey(); entity.SetId(id); Assert.False(entity.IsNew); Assert.Equal(id, entity.Id); }