本文整理汇总了Java中org.javamoney.moneta.function.FastMoneyProducer类的典型用法代码示例。如果您正苦于以下问题:Java FastMoneyProducer类的具体用法?Java FastMoneyProducer怎么用?Java FastMoneyProducer使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
FastMoneyProducer类属于org.javamoney.moneta.function包,在下文中一共展示了FastMoneyProducer类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: shouldCreateSettingProducer
import org.javamoney.moneta.function.FastMoneyProducer; //导入依赖的package包/类
@Test
public void shouldCreateSettingProducer() {
MonetaryAmountDecimalFormat format = (MonetaryAmountDecimalFormat) MonetaryAmountDecimalFormatBuilder.newInstance().withProducer(new FastMoneyProducer())
.build();
assertEquals(format.getCurrencyUnit(), Monetary.getCurrency(Locale.getDefault()));
assertEquals(format.getProducer().getClass(), FastMoneyProducer.class);
assertEquals(format.getDecimalFormat().getCurrency().getCurrencyCode(),format.getCurrencyUnit().getCurrencyCode());
}
示例2: shouldCreateSettingCurrencyUnit
import org.javamoney.moneta.function.FastMoneyProducer; //导入依赖的package包/类
@Test
public void shouldCreateSettingCurrencyUnit() {
CurrencyUnit currencyUnit = Monetary.getCurrency("BRL");
MonetaryAmountDecimalFormat format = (MonetaryAmountDecimalFormat) MonetaryAmountDecimalFormatBuilder.newInstance().withProducer(new FastMoneyProducer())
.withCurrencyUnit(currencyUnit).build();
assertEquals(format.getCurrencyUnit(), currencyUnit);
assertEquals(format.getProducer().getClass(), FastMoneyProducer.class);
assertEquals(format.getDecimalFormat().getCurrency().getCurrencyCode(),format.getCurrencyUnit().getCurrencyCode());
}
示例3: setup
import org.javamoney.moneta.function.FastMoneyProducer; //导入依赖的package包/类
@BeforeMethod
public void setup() {
producer = new FastMoneyProducer();
currency = Monetary.getCurrency(Locale.getDefault());
}