public void NoIdReturnsBaseHashCode() { var bar = new EntityWithStringPrimaryKey(); Assert.Equal(RuntimeHelpers.GetHashCode(bar), bar.GetHashCode()); }
public void SettingIdReturnsPrevIfGetHashCodeAlreadyCalled() { var bar = new EntityWithStringPrimaryKey(); var hash = bar.GetHashCode(); bar.Id = "456"; Assert.Equal(hash, bar.GetHashCode()); }
public void GetHashCodeReturnsIdFactor() { var bar = new EntityWithStringPrimaryKey { Id = "123" }; Assert.Equal(bar.Id.GetHashCode(), bar.GetHashCode()); }