public async void AddCustomerContactInfo_OK() { //Arrange var mockLogger = new Mock <ILogger <CustomerApi> >(); var mockHttpRequestFactory = new Mock <IHttpRequestFactory>(); mockHttpRequestFactory.Setup(x => x.Post(It.IsAny <string>(), It.IsAny <object>(), It.IsAny <string>())) .ReturnsAsync(new HttpResponseMessage { StatusCode = HttpStatusCode.OK }); var baseAddress = "BaseAddress"; var sut = new CustomerApi( mockLogger.Object, mockHttpRequestFactory.Object, baseAddress ); //Act await sut.AddCustomerContactInfoAsync(new AddCustomerContactInfoRequest { AccountNumber = "1", CustomerContactInfo = new Core.Abstractions.Api.CustomerApi.AddCustomerContactInfo.CustomerContactInfo { Channel = Core.Abstractions.Api.CustomerApi.AddCustomerContactInfo.Channel.Email, Value = "*****@*****.**" } } ); //Assert mockHttpRequestFactory.Verify(x => x.Post(It.IsAny <string>(), It.IsAny <object>(), It.IsAny <string>())); }