public void AdhereToCopyAndModificationPolicyFalseTrue() { //DataCopyPolicy.None & DataModifyPolicy.Modify CopyPolicyFalse t = new CopyPolicyFalse(); Start.Publisher(t); TestSubscriber s = new TestSubscriber(); s.SubscribeWithModifyTrue(); t.PublishEvent(); Assert.IsFalse(ReferenceEquals(t.data, s.rec)); }
public void UnsubscribeFromObject() { CopyPolicyFalse p = new CopyPolicyFalse(); Start.Publisher(p); TestSubscriber s = new TestSubscriber(); s.Subscribe(); s.SubscribeToBool(); Thread.Sleep(1000); s.UnsubscribeFromObject(); Assert.AreEqual(0, EllaModel.Instance.TotalNumberOfSubscriptions); }