コード例 #1
0
  private void prepareData() {
    catVersion = catalogVersionService.getCatalogVersion("hwcatalog", "Online");
    catalogVersionService.addSessionCatalogVersion(catVersion);

    user = userService.getUserForUID("ariel");
    userService.setCurrentUser(user);
    cart = cartService.getSessionCart();
    commonI18NService.setCurrentCurrency(commonI18NService.getCurrency("EUR"));
    product1 = productService.getProductForCode(catVersion, "HW2110-0012");
  }
  @Override
  @Before
  public void setUp() throws Exception {
    super.setUp();

    final CatalogVersionModel version =
        catalogVersionService.getCatalogVersion("hwcatalog", "Online");
    catalogVersionService.addSessionCatalogVersion(version);
    baseProduct = productService.getProductForCode(version, "HW2110-0019");
    partnerProduct = productService.getProductForCode(version, "HW2200-0561");
    user = userService.getUserForUID("demo");
    userService.setCurrentUser(user);
    currency = commonI18NService.getCurrency("EUR");
    commonI18NService.setCurrentCurrency(currency);
  }