public void should_use_mock_http_file_to_upload() { SetupHttpMock(); var jsonResult = _documentController.Add() as JsonResult; var uploadViewModel = jsonResult.Data as UploadViewModel; Assert.AreEqual(uploadViewModel.Status, ErrorMessages.Success); Assert.AreEqual(uploadViewModel.ErrorMessage, ErrorMessages.GetErrorMessages(ErrorMessages.Success)); }
public void should_go_throw_add_process() { SetupMockLocal(); var contract = _controller.Add(); Assert.IsNotNull(contract); var result = _controller.Delete(contract.Id.ToString()); Assert.IsTrue(result); }
private List <DocumentObject> TestUpload() { var jsonResult = _documentController.Add() as JsonResult; var uploadViewModel = jsonResult.Data as UploadViewModel; Assert.AreEqual(uploadViewModel.Status, ErrorMessages.Success); Assert.AreEqual(uploadViewModel.ErrorMessage, ErrorMessages.GetErrorMessages(ErrorMessages.Success)); return(uploadViewModel.Documents); }