コード例 #1
0
        public void UploadFailedTest()
        {
            IHttpFormUploader mockUploader = new MockThrowingFormUploader(new WebException("Internal 500 Error"));

            PhotoPoster photoPoster = new PhotoPoster(_MockAccessToken, mockUploader);
            string result = photoPoster.PostPhoto(_MockPhotoData, _MockCaption);
        }
コード例 #2
0
        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);
        }