public void DeskOrientationEditSuccess() { Assert.IsTrue(_validator.ValidateDeskInfo(_deskNum, _topLeftX, _topLeftY, _orient)); bool validation = _testDesk.ChangeDeskPointAndOrientation(_deskNum, 3, 4, 1); Assert.IsTrue(validation); Assert.IsTrue(_validator.ValidateDeskInfo(_deskNum, 3, 4, 1)); }
// POST api/Desk/SetDeskOrientationAndPoint/{deskNumber} public HttpResponseMessage SetDeskOrientationAndPoint(JObject json) { double x = (double)json["x"]; double y = (double)json["y"]; double orientation = (double)json["orientation"]; string deskNumber = json["deskNumber"].ToString(); if (DeskDataBaseConnection.ChangeDeskPointAndOrientation(deskNumber, x, y, orientation)) { return(new HttpResponseMessage(HttpStatusCode.OK)); } else { HttpResponseMessage deskNotFound = new HttpResponseMessage(HttpStatusCode.NotFound); deskNotFound.Content = new StringContent("Desk not found."); return(deskNotFound); } }