Ejemplo n.º 1
0
        public void ForTestCaseInReqs_ShouldReturn_RightBay()
        {
            var expectedResult = "c1,b3,c7,c5,a6";
            var itemsToTest = new List<string> { "rusty nail", "picture frame", "paint brush", "thermometer", "shovel" };
            var service = new PickerService();
            service.CalculateBays(itemsToTest);

            var result = string.Join(",",service.PickedItems.ToArray());
            Assert.Equal(expectedResult, result);
        }
Ejemplo n.º 2
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();
        }