public void EditGradesCurrnetTimestamp() { Grades grade = createUniqueGrade(); //GradesResult result = g.removeGrades(grade.GradeID, grade.TimeStamp); GradesResult result = g.editGrades(grade.GradeID, "", grade.MaxValue, grade.TimeStamp); Assert.AreEqual("", result.data.Name, "Ocena nie zostala zmieniona"); }
public ActionResult Save(int gradesId, string name, string maxValue, string stamp) { GradesAccess g = new GradesAccess(); string[] parts = stamp.Split('?'); byte[] transfer = new byte[8]; for (int i = 0; i < 8; i++) { transfer[i] = Convert.ToByte(parts[i]); } GradesResult r = g.editGrades(gradesId, name, maxValue, transfer); return(Json(r)); //################### NO DB TESTS ################### //GradesResult r = g.editGrades(gradesId, name, maxValue); //GradesResult r = new GradesResult { msg = null, data = new Grades { GradeID = gradesId } }; //return Json(r); //return Content("asdf" + realizationId + name + maxValue); }