本文整理汇总了Java中org.javamoney.moneta.internal.convert.ECBCurrentRateProvider类的典型用法代码示例。如果您正苦于以下问题:Java ECBCurrentRateProvider类的具体用法?Java ECBCurrentRateProvider怎么用?Java ECBCurrentRateProvider使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ECBCurrentRateProvider类属于org.javamoney.moneta.internal.convert包,在下文中一共展示了ECBCurrentRateProvider类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testGetExchangeRateProvider_Chained
import org.javamoney.moneta.internal.convert.ECBCurrentRateProvider; //导入依赖的package包/类
@Test
public void testGetExchangeRateProvider_Chained()
throws InterruptedException {
ExchangeRateProvider prov = MonetaryConversions
.getExchangeRateProvider("ECB");
assertTrue(Objects.nonNull(prov));
assertEquals(ECBCurrentRateProvider.class, prov.getClass());
// Test rate provided by IMF (derived)
Thread.sleep(5000L); // wait for provider to load...
ExchangeRate r = prov.getExchangeRate(Monetary.getCurrency("USD"),
Monetary.getCurrency("INR"));
assertTrue(Objects.nonNull(r));
assertTrue(r.isDerived());
// Test rate provided by ECB
r = prov.getExchangeRate(Monetary.getCurrency("EUR"),
Monetary.getCurrency("CHF"));
assertTrue(Objects.nonNull(r));
assertFalse(r.isDerived());
}
示例2: testGetExchangeRateProvider
import org.javamoney.moneta.internal.convert.ECBCurrentRateProvider; //导入依赖的package包/类
@Test
public void testGetExchangeRateProvider() {
ExchangeRateProvider prov = MonetaryConversions
.getExchangeRateProvider("ECB");
assertNotNull(prov);
assertEquals(ECBCurrentRateProvider.class, prov.getClass());
}
示例3: shouldReturnsECBCurrentRateProvider
import org.javamoney.moneta.internal.convert.ECBCurrentRateProvider; //导入依赖的package包/类
@Test
public void shouldReturnsECBCurrentRateProvider() {
ExchangeRateProvider prov = MonetaryConversions
.getExchangeRateProvider(ExchangeRateType.ECB);
assertNotNull(prov);
assertEquals(ECBCurrentRateProvider.class, prov.getClass());
}
示例4: testGetExchangeRateProvider
import org.javamoney.moneta.internal.convert.ECBCurrentRateProvider; //导入依赖的package包/类
@Test
public void testGetExchangeRateProvider() {
ExchangeRateProvider prov = MonetaryConversions
.getExchangeRateProvider("ECB");
assertTrue(Objects.nonNull(prov));
assertEquals(ECBCurrentRateProvider.class, prov.getClass());
}
示例5: shouldReturnsECBCurrentRateProvider
import org.javamoney.moneta.internal.convert.ECBCurrentRateProvider; //导入依赖的package包/类
@Test
public void shouldReturnsECBCurrentRateProvider() {
ExchangeRateProvider prov = MonetaryConversions
.getExchangeRateProvider(ExchangeRateType.ECB);
assertTrue(Objects.nonNull(prov));
assertEquals(ECBCurrentRateProvider.class, prov.getClass());
}
示例6: testGetExchangeRateProvider
import org.javamoney.moneta.internal.convert.ECBCurrentRateProvider; //导入依赖的package包/类
@Test
public void testGetExchangeRateProvider() {
ExchangeRateProvider prov = MonetaryConversions
.getExchangeRateProvider("ECB");
assertTrue(prov != null);
assertEquals(ECBCurrentRateProvider.class, prov.getClass());
}
示例7: shouldReturnsECBCurrentRateProvider
import org.javamoney.moneta.internal.convert.ECBCurrentRateProvider; //导入依赖的package包/类
@Test
public void shouldReturnsECBCurrentRateProvider() {
assertNotNull(provider);
assertEquals(provider.getClass(), ECBCurrentRateProvider.class);
}