public void Test_ListaSvihTerminaPacijenta(int id) { var kontroler = new TerminController(_context); var vr = kontroler.ListaSvihTerminaPacijenta(id); var rezultat = vr.Count; Assert.AreEqual(1, rezultat); }
public void Test_FunkcijaTermin(int id) { try { var kontroler = new TerminController(_context); var vr = kontroler.PromjeniStanjeTermina(id, "odobri") as ViewResult; var rezultat = vr.Model as TerminPregledViewModel; Assert.AreEqual("Ne", rezultat.NaCekanju); Assert.AreEqual("Da", rezultat.Odobren); } catch (Exception e) { throw e; } }
static void initialisiereKalender() { PersonController personenController = PersonController.theInstance; personenController.einfuegen("Jonas", "Pfeiffer", "Oberhausen", "Hellberg 1", "46047"); personenController.einfuegen("Dustin", "Riepl", "Bottrop", "Gladbecker Straße 5", "46240"); personenController.einfuegen("Pierre", "Lasarzig", "Essen", "Altenessener Straße 4123", "12456"); List <PersonModel> personen = new List <PersonModel>(); for (int i = 0; i < personenController.personen.Count; i++) { personen.Add(personenController.suchen(i)); } TerminController terminController = TerminController.theInstance; terminController.einfuegen(personen[0], new DateTime( 2017, 5, 5), "Schule Frankenstraße", "Unterricht"); terminController.einfuegen(personen[1], new DateTime( 2017, 5, 6), "Schule Dahnstraße", "Unterricht"); terminController.einfuegen(personen[2], new DateTime( 2017, 5, 7), "Schule Frankenstraße", "Unterricht"); }