public void AddSomeVolsInTestArea() { TestArea ta = TestArea.getInstance(); ta.AddVolunteer(new Human(ta.Serial(), "Джонни", "Вашингтон", 37, Race.American)); ta.AddVolunteer(new Human(ta.Serial(), "Жан Клод", "Ван Дамович", 46, Race.American)); ta.AddVolunteer(new Robot(ta.Serial(), "Киборг убийца", "ООО Какие люди", Architecture.KASint)); Assert.AreEqual(3, ta.Count); Assert.AreEqual(false, ta.Empty); }
public void UseIterator() { TestArea ta = TestArea.getInstance(); VolunteerIterator it = new VolunteerIterator(ta); Human vl = new Human(ta.Serial(), "Терминатор", "Ятуев", 19, Race.European); ta.AddVolunteer(vl); Assert.AreEqual(it.Last(), vl); }