Ejemplo n.º 1
0
        public void ForItemsInAandCandB_ShouldReturn_RightCost()
        {
            var itemsToTest = new List<string> { "a5", "c7", "b3", "b4" };
            var service = new PickerService();
            service.CalculatePath(itemsToTest);

            Assert.True(service.Cost == 18);
        }
Ejemplo n.º 2
0
        public void ForTestCaseInReqs_ShouldReturn_RightCost()
        {
            var itemsToTest = new List<string> { "b3", "c7", "c9", "a3" };
            var service = new PickerService();
            service.CalculatePath(itemsToTest);

            Assert.True(service.Cost == 15);
        }
Ejemplo n.º 3
0
        public void ForOneItem_ShouldReturn_ZeroCost()
        {
            var itemsToTest = new List<string> { "a5" };
            var service = new PickerService();
            service.CalculatePath(itemsToTest);

            Assert.True(service.Cost == 0);
        }
Ejemplo n.º 4
0
        static void Main(string[] args)
        {
            var bayList = new List<string> { "a3", "c2", "b3"};
            var itemList = new List<string> { "rusty nail", "picture frame", "paint brush", "thermometer", "shovel" };
            var pickerService = new PickerService();

            pickerService.CalculatePath(bayList);
            Console.WriteLine(string.Join("->",pickerService.PickedItems));
            Console.WriteLine(string.Format("Items were {0} apart", pickerService.Cost));

            pickerService.CalculateBays(itemList);
            Console.WriteLine(string.Join("->", pickerService.PickedItems));
            Console.ReadKey();
        }