use of javax.money.MonetaryAmount in project jsr354-ri by JavaMoney.
the class MonetaryFunctionsFilterTest method isLessThanOrEqualToTest.
@Test
public void isLessThanOrEqualToTest() {
MonetaryAmount money = FastMoney.of(1, BRAZILIAN_REAL);
List<MonetaryAmount> justRealList = currencies().filter(isCurrency(BRAZILIAN_REAL).and(isLessThanOrEqualTo(money))).collect(Collectors.toList());
Assert.assertEquals(2, justRealList.size());
}
use of javax.money.MonetaryAmount in project jsr354-ri by JavaMoney.
the class MonetaryFunctionsFilterTest method isGreaterThanOrEqualToTest.
@Test
public void isGreaterThanOrEqualToTest() {
MonetaryAmount money = FastMoney.of(1, BRAZILIAN_REAL);
List<MonetaryAmount> justRealList = currencies().filter(isCurrency(BRAZILIAN_REAL).and(isGreaterThanOrEqualTo(money))).collect(Collectors.toList());
Assert.assertEquals(2, justRealList.size());
}
use of javax.money.MonetaryAmount in project jsr354-ri by JavaMoney.
the class MonetaryFunctionsFilterTest method isLessThanTest.
@Test
public void isLessThanTest() {
MonetaryAmount money = FastMoney.of(1, BRAZILIAN_REAL);
List<MonetaryAmount> justRealList = currencies().filter(isCurrency(BRAZILIAN_REAL).and(isLessThan(money))).collect(Collectors.toList());
Assert.assertEquals(1, justRealList.size());
}
use of javax.money.MonetaryAmount in project jsr354-ri by JavaMoney.
the class MonetaryFunctionsFilterTest method isBetweenTest.
@Test
public void isBetweenTest() {
MonetaryAmount min = FastMoney.of(0, BRAZILIAN_REAL);
MonetaryAmount max = FastMoney.of(10, BRAZILIAN_REAL);
List<MonetaryAmount> justRealList = currencies().filter(isCurrency(BRAZILIAN_REAL).and(isBetween(min, max))).collect(Collectors.toList());
Assert.assertEquals(3, justRealList.size());
}
use of javax.money.MonetaryAmount in project jsr354-ri by JavaMoney.
the class MonetaryFunctionsFilterTest method isGreaterThanTest.
@Test
public void isGreaterThanTest() {
MonetaryAmount money = FastMoney.of(1, BRAZILIAN_REAL);
List<MonetaryAmount> justRealList = currencies().filter(isCurrency(BRAZILIAN_REAL).and(isGreaterThan(money))).collect(Collectors.toList());
Assert.assertEquals(1, justRealList.size());
}
Aggregations