public void GetVisitor_ExistingVisitor_ExpectVisitor() { HttpClient httpClient = HttpClientMockHelper.GetMockedHttpClient(JsonConvert.SerializeObject(new VisitorDto())); var visitorClient = new VisitorClient(httpClient); var result = visitorClient.GetVisitor(Guid.NewGuid()); Assert.NotNull(result); }
public void GetVisitor_NoVisitor_ExpectNull() { HttpClient httpClient = HttpClientMockHelper.GetMockedHttpClient(JsonConvert.SerializeObject(""), System.Net.HttpStatusCode.NotFound); var visitorClient = new VisitorClient(httpClient); var result = visitorClient.GetVisitor(Guid.NewGuid()); Assert.Null(result); }