コード例 #1
0
        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));
        }
コード例 #2
0
 public static Task <Deal> SaveAsync(this IHubSpotDealConnector connector, Deal deal) => connector.SaveAsync(deal);