Ejemplo n.º 1
0
        public void Test_EnableVitals1()
        {
            AllotBedViewModel bed = new AllotBedViewModel();

            bed.PatientId = "boo";
            VitalSign vital = new VitalSign
            {
                IsEnabled = true,
                Type      = 0
            };

            bed.EnableVitals1();
            Assert.AreEqual("boo", bed.PatientId);
        }
Ejemplo n.º 2
0
        public void Given_PatientId_And_Vitals_To_api_should_return_Success()
        {
            AllotBedViewModel allotBed = new AllotBedViewModel();
            SetVitals         set      = new SetVitals();

            set.PatientId   = "veena";
            set.VitalsSigns = new List <VitalSign>();
            set.VitalsSigns.Add(new VitalSign {
                IsEnabled = true, Type = 0
            });
            bool       expected = true;
            HttpClient client   = new HttpClient();
            var        response = client.PostAsJsonAsync
                                      ("http://localhost:58905/api/BedConfiguration/ConfigureBed", 234).Result;
            bool actual = allotBed.AllotBed(set.PatientId, set);

            Assert.AreEqual(expected, actual);
        }