@@ -0,0 +1,1694 @@
+/*%0A * This program is part of the OpenLMIS logistics management information system platform software.%0A * Copyright %C2%A9 2017 VillageReach%0A *%0A * This program is free software: you can redistribute it and/or modify it under the terms%0A * of the GNU Affero General Public License as published by the Free Software Foundation, either%0A * version 3 of the License, or (at your option) any later version.%0A * %C2%A0%0A * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;%0A * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.%C2%A0%0A * See the GNU Affero General Public License for more details. You should have received a copy of%0A * the GNU Affero General Public License along with this program. If not, see%0A * http://www.gnu.org/licenses. %C2%A0For additional information contact info@OpenLMIS.org.%C2%A0%0A */%0A%0Apackage org.openlmis.referencedata.repository;%0A%0Aimport org.openlmis.referencedata.domain.Lot;%0Aimport org.openlmis.referencedata.domain.TradeItem;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0A%0Apublic class LotRepositoryIntegrationTest extends BaseCrudRepositoryIntegrationTest%3CLot%3E %7B%0A%0A  @Autowired%0A  private LotRepository repository;%0A%0A  @Autowired%0A  private TradeItemRepository tradeItemRepository;%0A%0A  @Override%0A  LotRepository getRepository() %7B%0A    return this.repository;%0A  %7D%0A%0A  @Override%0A  Lot generateInstance() %7B%0A    int instanceNumber = this.getNextInstanceNumber();%0A    TradeItem tradeItem = new TradeItem();%0A    tradeItem = tradeItemRepository.save(tradeItem);%0A%0A    Lot lot = new Lot();%0A    lot.setLotCode(%22code #%22 + instanceNumber);%0A    lot.setActive(true);%0A    lot.setTradeItem(tradeItem);%0A    return lot;%0A  %7D%0A%7D%0A

Add Lots repository IT