更新项目的目录结构
This commit is contained in:
parent
a538fe5615
commit
acb5edfe03
@ -8,9 +8,14 @@ import org.junit.jupiter.api.TestInstance;
|
||||
import java.util.Arrays;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
||||
|
||||
|
||||
/**
|
||||
* String format to number with NumberFormatException
|
||||
*
|
||||
* @author YuCheng
|
||||
*/
|
||||
@TestInstance(TestInstance.Lifecycle.PER_METHOD)
|
||||
public class NumberFormatExceptionTest {
|
||||
|
||||
@ -20,16 +25,22 @@ public class NumberFormatExceptionTest {
|
||||
|
||||
@Test
|
||||
public void ConstructorNumberFormatException() {
|
||||
Exception exception = assertThrows(NumberFormatException.class, () -> {
|
||||
|
||||
// Exception exception = assertThrows(NumberFormatException.class, () -> {
|
||||
// new Integer("one");
|
||||
// });
|
||||
|
||||
assertThatThrownBy(() -> {
|
||||
new Integer("one");
|
||||
});
|
||||
}).isInstanceOf(NumberFormatException.class).hasMessageStartingWith("For input string");
|
||||
|
||||
System.out.println(exception);
|
||||
// System.out.println(exception);
|
||||
|
||||
Integer aIntegerObj = new Integer("one");
|
||||
Integer aIntegerObj = new Integer("1");
|
||||
|
||||
// Integer aIntegerObj = new Integer("one");
|
||||
Double doubleDecimalObj = new Double("two.2");
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
4
pom.xml
4
pom.xml
@ -43,7 +43,7 @@
|
||||
<!-- <module>jackson-modules</module>-->
|
||||
<!-- <module>jackson-simple</module>-->
|
||||
<!-- <module>parent-java</module>-->
|
||||
<!-- <module>testing-modules</module>-->
|
||||
<module>testing-modules</module>
|
||||
<module>toolkits</module>
|
||||
<!-- <module>xml</module>-->
|
||||
</modules>
|
||||
@ -97,7 +97,7 @@
|
||||
<mockito-core.version>3.12.4</mockito-core.version>
|
||||
<hamcrest.version>2.2</hamcrest.version>
|
||||
<hamcrest-all.version>1.3</hamcrest-all.version>
|
||||
<assertj.version>3.17.2</assertj.version>
|
||||
<assertj.version>3.23.1</assertj.version>
|
||||
<jmh-core.version>1.33</jmh-core.version>
|
||||
<jmh-generator.version>1.33</jmh-generator.version>
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
</parent>
|
||||
|
||||
<modules>
|
||||
<!-- <module>assertion-libraries</module>-->
|
||||
<module>assertion-libraries</module>
|
||||
<!-- <module>cucumber</module>-->
|
||||
<!-- <module>easy-random</module>-->
|
||||
<!-- <module>easymock</module>-->
|
||||
|
Loading…
x
Reference in New Issue
Block a user