コード例 #1
0
        public IEnumerable <GenericSupplies> GetSupplies()
        {
            var allSupplies = new List <GenericSupplies>();

            // Get Humphries Supplies
            allSupplies.AddRange(_humphriesService.GetSupplies());
            // Get Mega Corp Supplies
            allSupplies.AddRange(_megaCorpService.GetSupplies());
            // Get the compiled List With Highest Price First
            return(allSupplies.OrderByDescending(z => z.Price));
        }
コード例 #2
0
        public void Has_Parsed_Generic_Supplies()
        {
            //Arrange
            var suppliedWithAudPrice = _megaCorpService.GetPriceInAUD();
            var genericSuppliesList = _megaCorpService.GetSupplies();

            //ACT
            var hasSameNumberOfRecords = suppliedWithAudPrice.Count() == genericSuppliesList.Count();

            //Assert
            Assert.IsTrue(hasSameNumberOfRecords);

        }