public void ApprovePositionTest_Return_oneList_of_thePositionID() { //Arrange // create new request int newid = getNewRequestID("LTO"); // update the request and principal request down. var position = new PositionRequesting() { Operate = "Request Posting", UserID = "mif", SchoolYear = schoolyear, PositionID = newid }; RequestingPostExe.PostRequest(position, "0"); //Act var parameter = new ParametersForPosition() { SchoolYear = schoolyear, PositionID = newid.ToString(), }; int expect = newid; //Act var list = CommonListExecute.ApprovePosition(parameter); int resultCount = list.Count; int result = list[0].PositionID; //Assert Assert.AreEqual(expect, result, $" approve request position by id { result}"); Assert.IsTrue(resultCount >= 0, $" approve request posting List is { resultCount}"); }
public void PostRequestTest() { //Arrange int newid = getNewRequestID("LTO"); var position = new PositionRequesting() { Operate = "Request Posting", UserID = "mif", SchoolYear = schoolyear, PositionID = newid }; string expect = "Successfully"; //Act var result = RequestingPostExe.PostRequest(position, "0"); //Assert Assert.AreEqual(expect, result, $" Create New Request position { result} "); }