public void TestSend02() { NotifyManager notifyManager = NotifyManagerFactory.CreateNotifyManager01(); string type = string.Empty; string name = string.Empty; object body = NotifyObjectFactory.CreateNotifyObject01(); notifyManager.Send(type, name, body); }
public void TestSend03() { NotifyManager notifyManager = NotifyManagerFactory.CreateNotifyManager01(); string type = string.Empty; string name = string.Empty; object body = ViewManagerFactory.CreateViewManager01(); //Test Procedure Call notifyManager.Send(type, name, body); }
public void TestSend01() { NotifyManager notifyManager = NotifyManagerFactory.CreateNotifyManager01(); ObserverTest observer1 = new ObserverTest(); notifyManager.RegisterObserver(observer1); string type = string.Empty; string name = string.Empty; object body = NotifyManagerFactory.CreateNotifyManager01(); //Test Procedure Call notifyManager.Send(type, name, body); }
public void TestUnregisterObserver() { NotifyManager notifyManager = NotifyManagerFactory.CreateNotifyManager01(); ObserverTest observer1 = new ObserverTest(); notifyManager.RegisterObserver(observer1); //Test Procedure Call notifyManager.UnregisterObserver(observer1); //Post Check Accessor notifyManagerAccessor = ReflectionAccessor.Wrap(notifyManager); Dictionary <IObserver, IObserver> observerMap = (Dictionary <IObserver, IObserver>)notifyManagerAccessor.GetField("m_ObserverMap"); Assert.IsFalse(observerMap.ContainsKey(observer1)); }
public void TestBodySetter03() { NotifyObject notifyObject = NotifyObjectFactory.CreateNotifyObject01(); object body = NotifyManagerFactory.CreateNotifyManager01(); notifyObject.Body = body; #region Record State ValueRecorder recorder = new ValueRecorder(); recorder.Record((string)notifyObject.Name); recorder.Record((string)notifyObject.Type); recorder.FinishRecording(); #endregion #region Assertions Assert.IsNull((string)notifyObject.Name); Assert.IsNull((string)notifyObject.Type); #endregion }
public void TestNotifyManagerConstructor01() { //NotifyManager notifyManager = (NotifyManager)ReflectionAccessor.Construct(); NotifyManager notifyManager = NotifyManagerFactory.CreateNotifyManager01(); }