public async void Get_ResponseIsnull_ReturnsNull() { var(collator, queryBuilder) = GetDependencies(null); OfferProvider offerProvider = new OfferProvider(queryBuilder, collator.Object); IEnumerable <OfferItem> offer = await offerProvider.GetOffer(null); Assert.Null(offer); }
public async void Get_ResponseContainsOffer_ReturnsOffer() { OfferItem[] responseOffer = { new OfferItem(1, "TestAgent"), new OfferItem(1, "TestAgent2") }; var(collator, queryBuilder) = GetDependencies(responseOffer); OfferProvider offerProvider = new OfferProvider(queryBuilder, collator.Object); IEnumerable <OfferItem> offer = await offerProvider.GetOffer(null); Assert.Equal(responseOffer, offer); }