public void Get_and_set_unique_key() { var m = new AllPropertiesMappingManager(); m.SetUniqueKey(typeof(Entity).GetProperty("Id")); var pk = m.GetUniqueKey(typeof (Entity)); Assert.IsNotNull(pk); Assert.IsNotNull(pk.Property); Assert.IsNotNull(pk.FieldName); Assert.AreEqual("Id", pk.Property.Name); Assert.AreEqual("Id", pk.FieldName); }
public void NoUniqueKey_ShouldThrow() { var m = new AllPropertiesMappingManager(); var pk = m.GetUniqueKey(typeof(Entity)); }
public void NoUniqueKey_IsNull() { var m = new AllPropertiesMappingManager(); var pk = m.GetUniqueKey(typeof(Entity)); Assert.IsNull(pk); }