public void DeleteUAN() { // Arrange UANController controller = new UANController(); var actResult = controller.Delete(1); // Act var result = actResult as OkNegotiatedContentResult <bool>; // Assert Assert.IsNotNull(result); Assert.IsTrue(result.Content == true); }
public void getUAN() { // Arrange UANController controller = new UANController(); var actResult = controller.Get(1); // Act var result = actResult as OkNegotiatedContentResult <UAN>; // Assert Assert.IsNotNull(result); Assert.IsTrue(result.Content.ID == 1); }
public void PostUAN() { // Arrange UANController controller = new UANController(); UAN UANObj = new UAN { Number = "123456", Comments = "Good Work", }; var actResult = controller.Post(UANObj); // Act var result = actResult as OkNegotiatedContentResult <UAN>; // Assert Assert.IsNotNull(result); Assert.IsTrue(result.Content.ID > 0); }
public void PutUAN() { // Arrange UANController controller = new UANController(); UAN UANObj = new UAN { Number = "Put request sucessfull", Comments = "Good Work", ID = 1 }; var actResult = controller.Put(1, UANObj); // Act var result = actResult as OkNegotiatedContentResult <UAN>; // Assert Assert.IsNotNull(result); Assert.IsTrue(result.Content.Number.Equals("Put request sucessfull")); }