public void CheckStorageOverflow_OneOrder_OverflowTrue()
        {
            ValidationService validationService = InitializeValidationService();

            List <OrderValidationModel> orders = new List <OrderValidationModel>();

            orders.Add(new OrderValidationModel(DateTime.Now, DateTime.Now.AddDays(5), 12));

            int storageVolume = 10;

            var result = validationService.CheckStorageOverflow(orders, storageVolume);

            Assert.True(result);
        }
        public void CheckStorageOverflow_ThreeOrders_OneRecursion_OverflowFalse()
        {
            ValidationService validationService = InitializeValidationService();

            List <OrderValidationModel> orders = new List <OrderValidationModel>();

            orders.Add(new OrderValidationModel(DateTime.Now, DateTime.Now.AddDays(7), 5));
            orders.Add(new OrderValidationModel(DateTime.Now, DateTime.Now.AddDays(3), 4));
            orders.Add(new OrderValidationModel(DateTime.Now.AddDays(4), DateTime.Now.AddDays(7), 4));

            int storageVolume = 10;

            var result = validationService.CheckStorageOverflow(orders, storageVolume);

            Assert.False(result);
        }
        public void CheckStorageOverflow_FourOrders_TwoRecursions_OverflowTrue()
        {
            ValidationService validationService = InitializeValidationService();

            List <OrderValidationModel> orders = new List <OrderValidationModel>();

            orders.Add(new OrderValidationModel(DateTime.Now, DateTime.Now.AddDays(7), 5));
            orders.Add(new OrderValidationModel(DateTime.Now, DateTime.Now.AddDays(3), 8));
            orders.Add(new OrderValidationModel(DateTime.Now, DateTime.Now.AddDays(2), 8));
            orders.Add(new OrderValidationModel(DateTime.Now.AddDays(4), DateTime.Now.AddDays(7), 8));

            int storageVolume = 20;

            var result = validationService.CheckStorageOverflow(orders, storageVolume);

            Assert.True(result);
        }