public void Should_use_Basic_Authentication() { var mockRestClient = new Mock<IRestClient>(); mockRestClient.SetupAllProperties(); var client = new NakedDocsClient(mockRestClient.Object); Assert.That(mockRestClient.Object.Authenticator, Is.Not.Null); Assert.That(mockRestClient.Object.Authenticator, Is.TypeOf<HttpBasicAuthenticator>()); }
public void Should_call_ExecuteAsPost_on_RestSharp() { var mockRestClient = new Mock<IRestClient>(); mockRestClient.Setup(x => x.ExecuteAsPost<DocumentLinkResponse>(It.IsAny<IRestRequest>(), It.IsAny<string>())) .Returns(new RestResponse<DocumentLinkResponse>()).Verifiable(); var client = new NakedDocsClient(mockRestClient.Object); client.UploadDocument(string.Empty); mockRestClient.Verify(); }
public void SetUp() { _client = new NakedDocsClient(_username, _password); _documentId = Upload_Test_Document(); }
public void SetUp() { _client = new NakedDocsClient(_username, _password); _uploadResponse = null; }