public void IndexActionShouldReturnProperPastContestsCount() { var controller = new HomeController(OjsData); var result = controller.Index() as ViewResult; var model = result.Model as IndexViewModel; Assert.AreEqual(3, model.PastContests.Count()); }
public void IndexActionShouldReturnProperVisibleActiveContests() { var controller = new HomeController(this.OjsData); var result = controller.Index() as ViewResult; var model = result.Model as IndexViewModel; Assert.AreEqual(2, model.ActiveContests.Count()); }
public void IndexActionShouldReturnProperPastContestNames() { var controller = new HomeController(OjsData); var result = controller.Index() as ViewResult; var model = result.Model as IndexViewModel; foreach (var contest in model.PastContests) { Assert.AreEqual("Past-Visible", contest.Name); } }
public void IndexActionShouldReturnViewModel() { var controller = new HomeController(EmptyOjsData); var result = controller.Index() as ViewResult; var model = result.Model as IndexViewModel; Assert.AreEqual(0, model.ActiveContests.Count()); Assert.AreEqual(0, model.PastContests.Count()); Assert.AreEqual(0, model.FutureContests.Count()); }