public void GetWarehouseRoot_success() { Warehouse hop = new Warehouse() { Code = "AUTA05", Description = "This WH is awesome", HopType = "Warehouse", NextHops = new List <WarehouseNextHops>() { new WarehouseNextHops() { HopACode = "AUTA05", HopBCode = "BNDA04", HopB = new Warehouse() { Code = "BNDA04" } } } }; string code = _dal.Create(hop); var hop2 = _dal.GetWarehouseRoot(); Assert.NotNull(hop2); }
public Warehouse ExportHierarchy() { try { var root = _sqlRepo.GetWarehouseRoot(); return(_mapper.Map <Warehouse>(root)); } catch (DAL.DALException exc) { _logger.LogError(exc.ToString()); throw new BLException($"{exc.GetType()} Exception in {System.Reflection.MethodBase.GetCurrentMethod().Name}", exc); } catch (Exception exc) { _logger.LogError(exc.ToString()); throw new BLException($"{exc.GetType()} Exception in {System.Reflection.MethodBase.GetCurrentMethod().Name}", exc); } }