public void CanGetStructure() { IPrepareView <Structure> prepareView = new PrepareStructureView <Structure>(); Structure structure = prepareView.GetView(db); Assert.IsNotNull(structure); }
// GET: HRStructure public ActionResult Structure() { IPrepareView <Structure> prepareView = new PrepareStructureView <Structure>(); Structure structure = prepareView.GetView(db); return(View(structure)); }
public void CanLoadStructure() { arrangeStructure(); IPrepareView <Structure> prepareView = new PrepareStructureView <Structure>(); Structure structure = prepareView.GetView(db); Assert.AreEqual(structure.Boss.FirstName, "Krzysztof"); Assert.AreEqual(structure.Boss.Teams.Count(), 1); Assert.AreEqual(structure.Boss.Teams[0].Name, "Dyrekcja generalna"); Assert.AreEqual(structure.Boss.Teams[0].Persons.Count(), 2); Assert.AreEqual(structure.Boss.Teams[0].Persons[0].Teams[0].Persons[0].LastName, "Pierwszy Bryg"); Assert.AreEqual(structure.Boss.Teams[0].Persons[0].Teams[0].Persons[0].Teams[0].Persons[0].LastName, "Czwarty"); }