File tree Expand file tree Collapse file tree 3 files changed +31
-2
lines changed 
src/test/java/org/javamoney/moneta Expand file tree Collapse file tree 3 files changed +31
-2
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ http://javamoney.github.io/ri.html
1111
1212This module is licenced under the the [ Apache 2 Licence] ( https://www.apache.org/licenses/LICENSE-2.0.html ) .
1313
14- [ ![ Build Status] ( https://api.travis-ci.org/JavaMoney/jsr354-ri.png?branch=master )] ( https://travis-ci.org/JavaMoney/jsr354-ri ) 
15- [ ![ Coverage Status] ( https://coveralls.io/repos/JavaMoney/jsr354-ri/badge.png )] ( https://coveralls.io/r/JavaMoney/jsr354-ri ) 
14+ [ ![ Build Status] ( https://api.travis-ci.org/JavaMoney/jsr354-ri.png?branch=master )] ( https://travis-ci.org/JavaMoney/jsr354-ri )  [ ![ License] ( http://img.shields.io/badge/license-Apache2-red.svg )] ( http://opensource.org/licenses/apache-2.0 ) 
1615
1716[ ![ Built with Maven] ( http://maven.apache.org/images/logos/maven-feather.png )] ( http://maven.org/ ) 
Original file line number Diff line number Diff line change @@ -1167,4 +1167,19 @@ public void testDivide_WrongCurrency() {
11671167        Money  m2  = Money .of (BigDecimal .TEN , "CHF" );
11681168        m1 .subtract (m2 );
11691169    }
1170+ 
1171+     @ Test (expectedExceptions  = ArithmeticException .class )
1172+     public  void  testCreatingFromDoubleNan (){
1173+     	Money .of (Double .NaN , "XXX" );
1174+     }
1175+ 
1176+     @ Test (expectedExceptions  = ArithmeticException .class )
1177+     public  void  testCreatingFromDoublePositiveInfinity (){
1178+     	Money .of (Double .POSITIVE_INFINITY , "XXX" );
1179+     }
1180+ 
1181+     @ Test (expectedExceptions  = ArithmeticException .class )
1182+     public  void  testCreatingFromDoubleNegativeInfinity (){
1183+     	Money .of (Double .NEGATIVE_INFINITY , "XXX" );
1184+     }
11701185}
Original file line number Diff line number Diff line change @@ -1109,4 +1109,19 @@ public void testDivide_WrongCurrency() {
11091109        m1 .subtract (m2 );
11101110    }
11111111
1112+     @ Test (expectedExceptions  = ArithmeticException .class )
1113+     public  void  testCreatingFromDoubleNan (){
1114+     	RoundedMoney .of (Double .NaN , "XXX" );
1115+     }
1116+ 
1117+     @ Test (expectedExceptions  = ArithmeticException .class )
1118+     public  void  testCreatingFromDoublePositiveInfinity (){
1119+     	RoundedMoney .of (Double .POSITIVE_INFINITY , "XXX" );
1120+     }
1121+ 
1122+     @ Test (expectedExceptions  = ArithmeticException .class )
1123+     public  void  testCreatingFromDoubleNegativeInfinity (){
1124+     	RoundedMoney .of (Double .NEGATIVE_INFINITY , "XXX" );
1125+     }
1126+ 
11121127}
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments