public void ApiClientTestBaseSetUp() { _messageHandler = new HttpMessageHandlerStub(); ClientFactory = Substitute.For <IHttpClientFactory>(); ClientFactory.CreateClient(Arg.Any <string>()) .Returns(new HttpClient(_messageHandler) { BaseAddress = new Uri(HttpStubUri) }); }
public void ApiClientTestBaseSetUp() { _messageHandler = new HttpMessageHandlerStub(); ClientFactory = Substitute.For <IHttpClientFactory>(); ClientFactory.CreateClient(Arg.Any <string>()) .Returns(new HttpClient(_messageHandler) { BaseAddress = new Uri(HttpStubUri) }); _bearerToken = NewRandomString(); BearerTokenProvider = Substitute.For <IBearerTokenProvider>(); BearerTokenProvider.GetToken() .Returns(_bearerToken); }