Пример #1
0
 public void Given_Valid_Arguments_When_Multiple_Instance_Invoked_Then_Valid_Result_Asserted()
 {
     m_queue.Enqueue(new PatientVitals
     {
         PatientId = "Pat000",
         Vitals    = new List <Vitals>()
     });
     SharedResources.SharedQueue.SharedQueue queueList = SharedResources.SharedQueue.SharedQueue.Instance;
     Assert.IsFalse(queueList.IsEmpty());
     m_queue.Dequeue();
 }
Пример #2
0
        public void Given_Valid_Arguments_When_Different_Object_Unsubscribe_Invoked_Then_Valid_Result_Asserted()
        {
            m_queue.Enqueue(new PatientVitals
            {
                PatientId = "Pat000",
                Vitals    = new List <Vitals>()
            });
            SharedResources.SharedQueue.SharedQueue secQueue = SharedResources.SharedQueue.SharedQueue.Instance;
            secQueue.Enqueue(new PatientVitals
            {
                PatientId = "Pat1010",
                Vitals    = new List <Vitals>()
            });
            var result = secQueue.Dequeue();

            Assert.AreEqual("Pat000", result.PatientId);
            result = m_queue.Dequeue();
            Assert.AreEqual("Pat1010", result.PatientId);
        }
Пример #3
0
        public void Given_Valid_Arguments_When_Multiple_Enqueue_Invoked_Then_Valid_Result_Asserted()
        {
            m_queue.Enqueue(new PatientVitals
            {
                PatientId = "Pat000",
                Vitals    = new List <Vitals>()
            });
            SharedResources.SharedQueue.SharedQueue secQueue = SharedResources.SharedQueue.SharedQueue.Instance;
            secQueue.Enqueue(new PatientVitals
            {
                PatientId = "Pat1010",
                Vitals    = new List <Vitals>()
            });
            var result = secQueue.Dequeue();

            Assert.IsFalse(m_queue.IsEmpty());
            result = m_queue.Dequeue();
            Assert.IsTrue(m_queue.IsEmpty());
        }