public async Task GetAsync_returns_converted_deal([Frozen] IDealTypeManager dealTypeManager, [Frozen] IHubSpotClient hubSpotClient, [Frozen] IDealSelector dealSelector, HubSpot.Deals.Deal convertedDeal, HubSpotDealConnector sut, IFixture fixture) { //Arrange Mock.Get(dealTypeManager).Setup(x => x.ConvertTo <HubSpot.Deals.Deal>(It.IsAny <HubSpot.Model.Deals.Deal>())).Returns(convertedDeal); //Act var result = await sut.GetAsync <HubSpot.Deals.Deal>(dealSelector); //Assert Assert.That(result, Is.EqualTo(convertedDeal)); }
public static Task <Deal> SaveAsync(this IHubSpotDealConnector connector, Deal deal) => connector.SaveAsync(deal);