Example #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);
        }
Example #2
0
        public void TestBodyGetter01()
        {
            NotifyObject notifyObject = NotifyObjectFactory.CreateNotifyObject01();
            object       body         = notifyObject.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
        }
Example #3
0
        public void TestTypeSetter01()
        {
            NotifyObject notifyObject = NotifyObjectFactory.CreateNotifyObject01();
            string       type         = string.Empty;

            notifyObject.Type = type;
            #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.AreEqual("", (string)notifyObject.Type);
            #endregion
        }
Example #4
0
        public void TestNotifyObserver01()
        {
            //using (OPCDataSelectorController oPCDataSelectorController = OPCDataSelectorControllerFactory.CreateOPCDataSelectorController01())
            //{
            NotifyObject notifyObj = NotifyObjectFactory.CreateNotifyObject01();

            oPCDataSelectorController.NotifyObserver(notifyObj);
            #region Record State
            ValueRecorder recorder = new ValueRecorder();
            recorder.Record <string>(delegate { return((string)notifyObj.Name); });
            recorder.Record <string>(delegate { return((string)notifyObj.Type); });
            recorder.FinishRecording();
            #endregion
            #region Assertions
            Assert.IsNull((string)notifyObj.Name);
            Assert.IsNull((string)notifyObj.Type);
            #endregion
            // }
        }