Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        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);
        }