当前位置: 首页>>代码示例>>Java>>正文


Java ECBCurrentRateProvider类代码示例

本文整理汇总了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());
}
 
开发者ID:JavaMoney,项目名称:jsr354-ri,代码行数:20,代码来源:MonetaryConversionTest.java

示例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());
}
 
开发者ID:JavaMoney,项目名称:jsr354-ri-bp,代码行数:8,代码来源:MonetaryConversionTest.java

示例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());
}
 
开发者ID:JavaMoney,项目名称:jsr354-ri-bp,代码行数:8,代码来源:ExchangeRateTypeTest.java

示例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());
}
 
开发者ID:JavaMoney,项目名称:jsr354-ri,代码行数:8,代码来源:MonetaryConversionTest.java

示例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());
}
 
开发者ID:JavaMoney,项目名称:jsr354-ri,代码行数:8,代码来源:ExchangeRateTypeTest.java

示例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());
}
 
开发者ID:JavaMoney,项目名称:javamoney-examples,代码行数:8,代码来源:MonetaryConversionTest.java

示例7: shouldReturnsECBCurrentRateProvider

import org.javamoney.moneta.internal.convert.ECBCurrentRateProvider; //导入依赖的package包/类
@Test
public void shouldReturnsECBCurrentRateProvider() {
    assertNotNull(provider);
    assertEquals(provider.getClass(), ECBCurrentRateProvider.class);
}
 
开发者ID:JavaMoney,项目名称:jsr354-ri-bp,代码行数:6,代码来源:ECBCurrentRateProviderTest.java


注:本文中的org.javamoney.moneta.internal.convert.ECBCurrentRateProvider类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。