Beispiel #1
0
        public void TestCorrectAgenciesOrder()
        {
            var providerMock = new Mock <IProvider>();

            providerMock.Setup(m => m.Get(It.IsAny <RequestModel>())).Returns(_properties);

            IService fundaService = new FundaService(providerMock.Object);

            var top10Agencies = fundaService.GetTop10Agencies(new RequestModel()).ToList();


            Assert.AreEqual(top10Agencies[1].MakelaarId, 2);
        }
Beispiel #2
0
        public void TestIncorrectRequest()
        {
            var      fundaProvider = new FundaProvider();
            IService fundaService  = new FundaService(fundaProvider);

            var request = new RequestModel()
            {
                Type = "koop",
                Stad = "null"
            };

            var top10Agencies = fundaService.GetTop10Agencies(request).ToList();

            Assert.IsFalse(top10Agencies.Any());
        }