public void testGetAssignmentByID()
        {
            // arrange
            const int ID  = 2;
            const int ID2 = 3;
            const int ID3 = 6;

            // act

            var result1 = _service.getAssignmentByID(ID);
            var result2 = _service.getAssignmentByID(ID2);
            var result3 = _service.getAssignmentByID(ID3);

            // assert

            Assert.AreEqual(2, result1.ID);
            Assert.AreEqual(3, result2.ID);
            Assert.AreEqual(6, result3.ID);
            Assert.AreEqual("Strings together", result1.name);
            Assert.AreEqual("Find blah", result2.name);
            Assert.AreEqual("Get highest number", result3.name);
        }
Example #2
0
 // GET: Solutions/Details/5
 public ActionResult Details(int id)
 {
     ViewBag.AssId = id;
     return(View(aService.getAssignmentByID(id)));
 }