File tree Expand file tree Collapse file tree 3 files changed +3
-24
lines changed
src/test/java/ch/jalu/configme
beanmapper/leafvaluehandler Expand file tree Collapse file tree 3 files changed +3
-24
lines changed Original file line number Diff line number Diff line change 229229 <groupId >org.mockito</groupId >
230230 <artifactId >mockito-core</artifactId >
231231 <scope >test</scope >
232- <version >4.11 .0</version >
232+ <version >5.20 .0</version >
233233 <exclusions >
234234 <exclusion >
235235 <artifactId >hamcrest-core</artifactId >
240240 <dependency >
241241 <groupId >org.mockito</groupId >
242242 <artifactId >mockito-junit-jupiter</artifactId >
243- <version >4.11 .0</version >
243+ <version >5.20 .0</version >
244244 <scope >test</scope >
245245 </dependency >
246246 </dependencies >
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ void shouldTransformNumbersToBigDecimal() {
6262 assertThat (bigNumberHandler .convert (bigDecimalType , -1131.25116 ), equalTo (new BigDecimal ("-1131.25116" )));
6363 assertThat (bigNumberHandler .convert (bigDecimalType , longImpreciseAsDouble ), equalTo (new BigDecimal ("5076541234567890123" )));
6464 assertThat (bigNumberHandler .convert (bigDecimalType , 2e50 ), equalTo (new BigDecimal ("2E+50" )));
65- assertThat (bigNumberHandler .convert (bigDecimalType , -1e18f ), equalTo (new BigDecimal ("-9.9999998430674944E +17" )));
65+ assertThat (bigNumberHandler .convert (bigDecimalType , -1e18f ), equalTo (new BigDecimal ("-9.999999843067494E +17" )));
6666 assertThat (bigNumberHandler .convert (bigDecimalType , (byte ) 101 ), equalTo (new BigDecimal ("101" )));
6767 assertThat (bigNumberHandler .convert (bigDecimalType , (short ) -32724 ), equalTo (new BigDecimal ("-32724" )));
6868
Original file line number Diff line number Diff line change @@ -67,25 +67,4 @@ void shouldThrowIfDirsCannotBeCreated() {
6767 ConfigMeException .class ,
6868 "Failed to create parent folder" );
6969 }
70-
71- @ Test
72- void shouldThrowIfFileCannotBeCreated () throws IOException {
73- // given
74- FileSystemProvider provider = mock (FileSystemProvider .class );
75- FileSystem fileSystem = mock (FileSystem .class );
76- given (fileSystem .provider ()).willReturn (provider );
77- Path child = mock (Path .class );
78- given (child .getFileSystem ()).willReturn (fileSystem );
79- doThrow (NoSuchFileException .class ).when (provider ).checkAccess (child ); // for Files#exists
80- doThrow (new IOException ("File creation not supported" )).when (provider ).newByteChannel (eq (child ), anySet (), any ());
81-
82- Path parent = temporaryFolder .resolve ("parent" );
83- given (child .getParent ()).willReturn (parent );
84-
85- // when / then
86- verifyException (
87- () -> Utils .createFileIfNotExists (child ),
88- ConfigMeException .class ,
89- "Failed to create file" );
90- }
9170}
You can’t perform that action at this time.
0 commit comments