Skip to content

Commit

Permalink
fix unit test
Browse files Browse the repository at this point in the history
- refs: #10818
  • Loading branch information
cp-ps committed Mar 15, 2021
1 parent 74ffe98 commit 81531c5
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import de.metas.product.ProductId;
import de.metas.rest_api.externlasystem.dto.ExternalSystemService;
import de.metas.uom.UomId;
import de.metas.user.UserId;
import de.metas.vertical.healthcare.alberta.dao.AlbertaProductDAO;
import de.metas.vertical.healthcare.alberta.service.AlbertaProductService;
import io.github.jsonSnapshot.SnapshotMatcher;
Expand All @@ -21,6 +22,7 @@
import org.compiere.model.I_C_BPartner_Product;
import org.compiere.model.I_C_UOM;
import org.compiere.model.I_M_Product;
import org.compiere.util.Env;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
Expand Down Expand Up @@ -82,6 +84,7 @@ public void init()
{
AdempiereTestHelper.get().init();
createMasterData();
Env.setLoggedUserId(Env.getCtx(), UserId.METASFRESH);

final ProductsServicesFacade productsServicesFacade = new ProductsServicesFacade();
final AlbertaProductService albertaProductService = new AlbertaProductService(new AlbertaProductDAO());
Expand Down Expand Up @@ -144,10 +147,9 @@ public void getProducts_standardCase()
.ean("ean2")
.uomId(kgUomId)
.build();

//
// Call endpoint
final ResponseEntity<JsonGetProductsResponse> response = restController.getProducts(null, null, null, null);
final ResponseEntity<JsonGetProductsResponse> response = (ResponseEntity<JsonGetProductsResponse>)restController.getProducts(null, null, null, null);
assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK);

//
Expand Down

0 comments on commit 81531c5

Please sign in to comment.