public void ResultData_Read_InValid_Data_Bogus_Should_Fail() { // Arrange var myController = new ResultDataController(); // Act var result = myController.Read("bogus"); // Assert Assert.IsNotNull(result); }
public void ResultData_Read_Valid_Data_Should_Pass() { // Arrange var myController = new ResultDataController(); var myData = BiliWeb.Backend.ResultDataBackend.Instance.Index().FirstOrDefault(); // Act var result = myController.Read(myData.ID) as ViewResult; // Assert Assert.IsNotNull(result.Model); }
public void ResultData_Read_Get_Data_Null_Should_Fail() { // Arrange var myController = new ResultDataController(); // Act var result = myController.Read(null); // Reset // Assert Assert.IsNotNull(result); }
public void ResultData_Read_Get_InValid_Data_Null_Should_Fail() { // Arrange var myController = new ResultDataController(); // Act var result = (NotFoundResult)myController.Read(null); // Reset // Assert Assert.AreEqual(404, result.StatusCode); }