public virtual void TestInstantiationEvents() { EventsTestCaseBase.EventLog instantiatedLog = new EventsTestCaseBase.EventLog(); EventRegistry().Instantiated += new System.EventHandler<Db4objects.Db4o.Events.ObjectInfoEventArgs> (new _IEventListener4_20(this, instantiatedLog).OnEvent); RetrieveOnlyInstance(typeof(EventsTestCaseBase.Item)); Assert.IsFalse(instantiatedLog.xing); Assert.IsTrue(instantiatedLog.xed); }
public virtual void TestInstantiationEvents() { EventsTestCaseBase.EventLog instantiatedLog = new EventsTestCaseBase.EventLog(); EventRegistry().Instantiated += new System.EventHandler <Db4objects.Db4o.Events.ObjectInfoEventArgs> (new _IEventListener4_20(this, instantiatedLog).OnEvent); RetrieveOnlyInstance(typeof(EventsTestCaseBase.Item)); Assert.IsFalse(instantiatedLog.xing); Assert.IsTrue(instantiatedLog.xed); }
public virtual void TestActivationEvents() { EventsTestCaseBase.EventLog activationLog = new EventsTestCaseBase.EventLog(); EventRegistry().Activating += new System.EventHandler <Db4objects.Db4o.Events.CancellableObjectEventArgs> (new _IEventListener4_19(this, activationLog).OnEvent); EventRegistry().Activated += new System.EventHandler <Db4objects.Db4o.Events.ObjectInfoEventArgs> (new _IEventListener4_25(this, activationLog).OnEvent); RetrieveOnlyInstance(typeof(EventsTestCaseBase.Item)); Assert.IsTrue(activationLog.xing); Assert.IsTrue(activationLog.xed); }
public virtual void TestActivationEvents() { EventsTestCaseBase.EventLog activationLog = new EventsTestCaseBase.EventLog(); EventRegistry().Activating += new System.EventHandler<Db4objects.Db4o.Events.CancellableObjectEventArgs> (new _IEventListener4_19(this, activationLog).OnEvent); EventRegistry().Activated += new System.EventHandler<Db4objects.Db4o.Events.ObjectInfoEventArgs> (new _IEventListener4_25(this, activationLog).OnEvent); RetrieveOnlyInstance(typeof(EventsTestCaseBase.Item)); Assert.IsTrue(activationLog.xing); Assert.IsTrue(activationLog.xed); }
public virtual void TestDeletionEvents() { if (IsEmbedded()) { // TODO: something wrong when embedded c/s is run as part // of the full test suite return; } EventsTestCaseBase.EventLog deletionLog = new EventsTestCaseBase.EventLog(); ServerEventRegistry().Deleting += new System.EventHandler <Db4objects.Db4o.Events.CancellableObjectEventArgs> (new _IEventListener4_25(this, deletionLog).OnEvent); ServerEventRegistry().Deleted += new System.EventHandler <Db4objects.Db4o.Events.ObjectInfoEventArgs> (new _IEventListener4_31(this, deletionLog).OnEvent); Db().Delete(((EventsTestCaseBase.Item)RetrieveOnlyInstance(typeof(EventsTestCaseBase.Item )))); Db().Commit(); Assert.IsTrue(deletionLog.xing); Assert.IsTrue(deletionLog.xed); }
public virtual void TestDeletionEvents() { if (IsEmbedded()) { // TODO: something wrong when embedded c/s is run as part // of the full test suite return; } EventsTestCaseBase.EventLog deletionLog = new EventsTestCaseBase.EventLog(); ServerEventRegistry().Deleting += new System.EventHandler<Db4objects.Db4o.Events.CancellableObjectEventArgs> (new _IEventListener4_25(this, deletionLog).OnEvent); ServerEventRegistry().Deleted += new System.EventHandler<Db4objects.Db4o.Events.ObjectInfoEventArgs> (new _IEventListener4_31(this, deletionLog).OnEvent); Db().Delete(((EventsTestCaseBase.Item)RetrieveOnlyInstance(typeof(EventsTestCaseBase.Item )))); Db().Commit(); Assert.IsTrue(deletionLog.xing); Assert.IsTrue(deletionLog.xed); }
public _IEventListener4_31(DeletionEventsTestCase _enclosing, EventsTestCaseBase.EventLog deletionLog) { this._enclosing = _enclosing; this.deletionLog = deletionLog; }
public _IEventListener4_25(ActivationEventsTestCase _enclosing, EventsTestCaseBase.EventLog activationLog) { this._enclosing = _enclosing; this.activationLog = activationLog; }
public _IEventListener4_20(InstantiationEventsTestCase _enclosing, EventsTestCaseBase.EventLog instantiatedLog) { this._enclosing = _enclosing; this.instantiatedLog = instantiatedLog; }