/// <summary> /// Uses reflection to set the ID of autor <see cref="ADomainObject{IdT}" />. /// </summary> public void SetIdOf(ADomainObject domainObject, long id) { // Set the data property reflectively PropertyInfo idProperty = domainObject.GetType().GetProperty(NAME_OF_ID_MEMBER, BindingFlags.Public | BindingFlags.Instance); Check.Ensure(idProperty != null, "idProperty could not be found"); idProperty.SetValue(domainObject, id, null); }
public override void setUp() { do1 = new DomainModelImpl(); do2 = new DomainModelImpl(); }