public void Validate_warehouse_model_should_return_true()
        {
            // Arrange
            WarehouseModel wh = new WarehouseModel()
            {
                Code = "WMOC", Description = "Mock Warehouse", Duration = 0.5m, Parent = null
            };

            // Act
            var result = _wl.ValidateWarehouseModel(wh);

            // Assert
            Assert.IsTrue(result);
        }
Esempio n. 2
0
 public bool ImportWarehouses(WarehouseModel warehouse)
 {
     try
     {
         // i.   Validation of data
         _warehouseLogic.ValidateWarehouseModel(warehouse);
         // ii.  Clear the existing DB(because of warehouses)
         _warehouseLogic.DeleteWarehouseTree();
         // iii. Write warehouse hierarchy to DB
         return(_warehouseLogic.AddWarehouseRoot(warehouse));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }