Esempio n. 1
0
        public void Given_Invalid_Arguments_When_Unsubscribe_Invoked_Then_Invalid_Result_Asserted()
        {
            Callbacks callbacks           = new Callbacks();
            VitalsMonitoringFunction func = new VitalsMonitoringFunction(callbacks.VitalsCallback);

            vitalsMonitorList.Subscribe("patientId", "id", func);
            vitalsMonitorList.Unsubscribe("patientId2", "id2");
            Assert.IsFalse(vitalsMonitorList.IsEmpty());
            vitalsMonitorList.Unsubscribe("patientId", "id");
        }
Esempio n. 2
0
        public void Given_Valid_Arguments_When_Multiple_Instance_Invoked_Then_Valid_Result_Asserted()
        {
            Callbacks callbacks           = new Callbacks();
            VitalsMonitoringFunction func = new VitalsMonitoringFunction(callbacks.VitalsCallback);

            vitalsMonitorList.Subscribe("patientId", "id", func);
            SharedResources.VitalsMonitorList.VitalsMonitorList list = SharedResources.VitalsMonitorList.VitalsMonitorList.Instance;
            Assert.IsFalse(list.IsEmpty());
            vitalsMonitorList.Unsubscribe("patientId", "id");
            Assert.IsTrue(list.IsEmpty());
        }