Example #1
0
 protected void CheckResult(CollectionListeners listeners, CollectionListeners.IListener listenerExpected,
                            IEntity ownerExpected, object collExpected, int index)
 {
     Assert.That(listeners.ListenersCalled[index], Is.SameAs(listenerExpected));
     Assert.That(listeners.Events[index].AffectedOwnerOrNull, Is.SameAs(ownerExpected));
     Assert.That(listeners.Events[index].AffectedOwnerIdOrNull, Is.EqualTo(ownerExpected.Id));
     Assert.That(listeners.Events[index].GetAffectedOwnerEntityName(),
                 Is.EqualTo(ownerExpected.GetType().FullName));
     Assert.That(listeners.Events[index].Collection, Is.SameAs(collExpected));
 }
Example #2
0
 protected void CheckResult(CollectionListeners listeners, CollectionListeners.IListener listenerExpected,
                            ChildWithBidirectionalManyToMany child, int index)
 {
     CheckResult(listeners, listenerExpected, child, child.Parents, index);
 }
Example #3
0
 protected void CheckResult(CollectionListeners listeners, CollectionListeners.IListener listenerExpected,
                            IParentWithCollection parent, int index)
 {
     CheckResult(listeners, listenerExpected, parent, parent.Children, index);
 }