static void Main(string[] args) { string dir = AppDomain.CurrentDomain.BaseDirectory; //dir += @"PatientData.json"; dir += @"PatientData.json"; var persons = Deserializer.DeserializeObjects <Patient>(dir, "JSON").ToList(); foreach (var person in persons) { Console.WriteLine("Patient {0} vitals:\n", person.PatientId); Console.WriteLine("Spo2:{0}\nPulseRate:{1}\nTemperature:{2}\n", person.Spo2, person.PulseRate, person.Temperature); Console.WriteLine("Summary of patient {0}'s situation:\n", person.PatientId); AlertGenerator.CheckSpo2(person.Spo2); AlertGenerator.CheckPulseRate(person.PulseRate); AlertGenerator.CheckTemperature(person.Temperature); Console.Writeline("==================================="); } Console.ReadLine(); }
public void Test37() { Assert.AreEqual(1, AlertGenerator.CheckTemperature(89)); }
public void Test34() { Assert.AreEqual(2, AlertGenerator.CheckTemperature(92)); }
public void Test2() { Assert.AreEqual(1, AlertGenerator.CheckSpo2(100)); }
public void Test18() { Assert.AreEqual(3, AlertGenerator.CheckPulseRate(60)); }
public void Test13() { Assert.AreEqual(5, AlertGenerator.CheckPulseRate(221)); }
public void Test11() { Assert.AreEqual(4, AlertGenerator.CheckSpo2(0)); }
public void Test6() { Assert.AreEqual(2, AlertGenerator.CheckSpo2(91)); }
public void Test26() { Assert.AreEqual(6, AlertGenerator.CheckTemperature(98.4)); }
public void Test24() { Assert.AreEqual(7, AlertGenerator.CheckTemperature(100)); }
public void Test1() { Assert.AreEqual(5, AlertGenerator.CheckSpo2(101)); }
public void Test23() { Assert.AreEqual(6, AlertGenerator.CheckPulseRate(-45)); }
public void Test22() { Assert.AreEqual(1, AlertGenerator.CheckPulseRate(0)); }
public void Test20() { Assert.AreEqual(2, AlertGenerator.CheckPulseRate(40)); }
public void Test39() { Assert.AreEqual(8, AlertGenerator.CheckTemperature(-63)); }
public void Test4() { Assert.AreEqual(1, AlertGenerator.CheckSpo2(95)); }
public void Test28() { Assert.AreEqual(5, AlertGenerator.CheckTemperature(97)); }
public void Test9() { Assert.AreEqual(3, AlertGenerator.CheckSpo2(77)); }
public void Test29() { Assert.AreEqual(4, AlertGenerator.CheckTemperature(96)); }
public void Test12() { Assert.AreEqual(5, AlertGenerator.CheckSpo2(-90)); }
public void Test30() { Assert.AreEqual(4, AlertGenerator.CheckTemperature(95.5)); }
public void Test15() { Assert.AreEqual(4, AlertGenerator.CheckPulseRate(170)); }
public void Test32() { Assert.AreEqual(3, AlertGenerator.CheckTemperature(94)); }