Ejemplo n.º 1
0
        public void TestCase()
        {
            BoxRepository rep = new BoxRepository();

            var boxes = rep.GetBoxes();

            var distribution = new Distribution(boxes);

            distribution.BoxDistribution();
        }
Ejemplo n.º 2
0
        public List <Box> CalculateBoxParts()
        {
            List <Box> boxList = repo.GetBoxes().OrderBy(r => r.Weight).ToList <Box>();

            int partCount = 2;

            foreach (Box nBox in boxList)
            {
                nBox.PartCount = partCount;
                partCount++;
            }

            return(boxList);
        }
Ejemplo n.º 3
0
        public IEnumerable <Box> Get()
        {
            BoxRepository repo = new BoxRepository();

            return(repo.GetBoxes());
        }