Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }