public void UploadFailedTest() { IHttpFormUploader mockUploader = new MockThrowingFormUploader(new WebException("Internal 500 Error")); PhotoPoster photoPoster = new PhotoPoster(_MockAccessToken, mockUploader); string result = photoPoster.PostPhoto(_MockPhotoData, _MockCaption); }
public void BadAccessTokenTest() { IHttpFormUploader mockUploader = new MockThrowingFormUploader(new WebException("this is a (400) Bad Request.")); PhotoPoster photoPoster = new PhotoPoster(_MockAccessToken, mockUploader); string result = photoPoster.PostPhoto(_MockPhotoData, _MockCaption); }