예제 #1
0
            public void SavesTheUpload()
            {
                // Arrange
                var uploadTracker    = new Mock <IUploadTracker>();
                var uploadController = new UploadController(uploadTracker.Object)
                {
                    Request = new HttpRequestMessage()
                };

                // Act
                var upload = new RawUpload();

                uploadController.Get(upload);

                // Assert
                uploadTracker.Verify(tracker => tracker.Save(upload));
            }
예제 #2
0
 public HttpResponseMessage Get([FromUri(BinderType = typeof(RawUploadModelBinder))] RawUpload rawUpload)
 {
     _uploadTracker.Save(rawUpload);
     return(Request.CreateResponse(HttpStatusCode.OK));
 }