Ejemplo n.º 1
0
        public void TestSend02()
        {
            NotifyManager notifyManager = NotifyManagerFactory.CreateNotifyManager01();
            string        type          = string.Empty;
            string        name          = string.Empty;
            object        body          = NotifyObjectFactory.CreateNotifyObject01();

            notifyManager.Send(type, name, body);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
        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));
        }
Ejemplo n.º 5
0
        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
        }
Ejemplo n.º 6
0
 public void TestNotifyManagerConstructor01()
 {
     //NotifyManager notifyManager = (NotifyManager)ReflectionAccessor.Construct();
     NotifyManager notifyManager = NotifyManagerFactory.CreateNotifyManager01();
 }