public VendorInfo(IConfiguration configuration, IAgentHealthReporter agentHealthReporter, IEnvironment environment, VendorHttpApiRequestor vendorHttpApiRequestor) { _configuration = configuration; _agentHealthReporter = agentHealthReporter; _environment = environment; _vendorHttpApiRequestor = vendorHttpApiRequestor; }
public void Setup() { _configuration = Mock.Create <IConfiguration>(); _agentHealthReporter = Mock.Create <IAgentHealthReporter>(); _environment = Mock.Create <IEnvironment>(); _vendorHttpApiRequestor = Mock.Create <VendorHttpApiRequestor>(); }
public void CallVendorApi_LogsException() { using (var logging = new TestUtilities.Logging()) { var requestor = new VendorHttpApiRequestor(); var response = requestor.CallVendorApi(BogusUri, "bogus"); Assert.That(response, Is.Null); Assert.True(logging.HasMessageThatContains("CallVendorApi")); } }