public void ConstructorTest() { //Act var restClient = new SwiftRestClient(restClientMock.Object); //Assert Assert.IsNotNull(restClient); }
public void ServiceIntegrationTest() { //Arrange const string hostName = "https://app.getswift.co/api/v2/deliveries"; //TODO: Add to configuration SwiftRestClient client = new SwiftRestClient(new RestSharp.RestClient(hostName)); //Act var results = client.Execute(hostName, new RestRequest()); //Assert Assert.IsNotNull(results); Assert.AreEqual(results.StatusCode, HttpStatusCode.OK); Assert.AreNotEqual(results.Content, string.Empty); }
public void TestInitialize() { restClientMock = new Mock <IRestClient>(MockBehavior.Strict); restClientMock.Setup(rcm => rcm.AddHandler(contentTypes, It.IsAny <JsonDeserializer>())); testSubject = new SwiftRestClient(restClientMock.Object); }