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