static PriceDraftDsl of(final Price template) { return PriceDraftDsl.of(template); } }
static PriceDraftDsl of(final Price template) { return PriceDraftDsl.of(template); } }
static PriceDraftDsl of(final Price template) { return PriceDraftDsl.of(template); } }
@JsonIgnore public static PriceDraftDsl of(final BigDecimal amount, final CurrencyUnit currencyUnit) { return of(MoneyImpl.of(amount, currencyUnit)); }
@JsonIgnore public static PriceDraftDsl of(final BigDecimal amount, final CurrencyUnit currencyUnit) { return of(MoneyImpl.of(amount, currencyUnit)); }
@JsonIgnore public static PriceDraftDsl of(final BigDecimal amount, final CurrencyUnit currencyUnit) { return of(MoneyImpl.of(amount, currencyUnit)); }
@Test public void withCountryCode() { final PriceDraft draft = PriceDraftDsl.of(MoneyImpl.ofCents(123, "EUR")).withCountryCode("DE"); assertThat(draft.getCountry()).isEqualTo(CountryCode.DE); }
@Test public void withCustomerGroupId() { final String customerGroupId = "foo"; final PriceDraft draft = PriceDraftDsl.of(MoneyImpl.ofCents(123, "EUR")).withCustomerGroupId(customerGroupId); assertThat(draft.getCustomerGroup().getId()).isEqualTo(customerGroupId); } }