public virtual void Test() { ReentrantActivationTestCase.ReentratActivatableItem item = ((ReentrantActivationTestCase.ReentratActivatableItem )RetrieveOnlyInstance(typeof(ReentrantActivationTestCase.ReentratActivatableItem ))); Assert.IsFalse(item.Activated()); item.ActivateForRead(); Assert.IsTrue(item.Activated()); AssertNotActivatedForWrite(item); }
public virtual void Activate(IReferenceActivationContext context) { ReentrantActivationTestCase.ReentratActivatableItem item = (ReentrantActivationTestCase.ReentratActivatableItem )context.PersistentObject(); item.ActivateForWrite(); }
private void AssertNotActivatedForWrite(ReentrantActivationTestCase.ReentratActivatableItem item) { Commit(); Assert.IsFalse(item.Written()); }