1
1
/*
2
- * Copyright (c) 2012, 2013 , Credit Suisse (Anatole Tresch), Werner Keil.
2
+ * Copyright (c) 2012, 2014 , Credit Suisse (Anatole Tresch), Werner Keil.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
5
5
* use this file except in compliance with the License. You may obtain a copy of
18
18
import static org .junit .Assert .assertEquals ;
19
19
20
20
import java .math .BigDecimal ;
21
- import java .math .RoundingMode ;
22
-
23
- import javax .money .MonetaryContext ;
24
21
import javax .money .MonetaryOperator ;
25
22
import javax .money .MonetaryRoundings ;
23
+ import javax .money .RoundingContext ;
26
24
27
25
import org .javamoney .moneta .Money ;
28
26
import org .junit .Ignore ;
@@ -35,8 +33,8 @@ public class FutureValueTest {
35
33
public void test () {
36
34
FutureValue f = FutureValue .of ();
37
35
Money money = Money .of (100 , "CHF" );
38
- MonetaryOperator rounding = MonetaryRoundings
39
- . getRounding ( new MonetaryContext .Builder ().setPrecision (2 )
36
+ MonetaryOperator rounding = MonetaryRoundings . getRounding (
37
+ new RoundingContext .Builder ().setScale (2 )
40
38
//.setRoundingMode(RoundingMode.HALF_EVEN)
41
39
.create ());
42
40
assertEquals (Money .of (BigDecimal .valueOf (95.24 ), "CHF" ), f .calculate (money ,new Rate (0.05 ), 1 )
0 commit comments