BAEL-4193 - initial commit
initial commit in new module core-java-exceptions-3
This commit is contained in:
parent
ccad8d217f
commit
f00adab98c
6
core-java-modules/core-java-exceptions-3/README.md
Normal file
6
core-java-modules/core-java-exceptions-3/README.md
Normal file
@ -0,0 +1,6 @@
|
||||
## Core Java Exceptions
|
||||
|
||||
This module contains articles about core java exceptions
|
||||
|
||||
### Relevant articles:
|
||||
- [NoSuchMethodError in Java](https://www.baeldung.com/java-chained-exceptions)
|
34
core-java-modules/core-java-exceptions-3/pom.xml
Normal file
34
core-java-modules/core-java-exceptions-3/pom.xml
Normal file
@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.baeldung.exceptions</groupId>
|
||||
<artifactId>core-java-exceptions-3</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<name>core-java-exceptions-3</name>
|
||||
<packaging>jar</packaging>
|
||||
<parent>
|
||||
<groupId>com.baeldung.core-java-modules</groupId>
|
||||
<artifactId>core-java-modules</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>../</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<!-- test scoped -->
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<version>${assertj-core.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<!-- testing -->
|
||||
<assertj-core.version>3.10.0</assertj-core.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
@ -0,0 +1,11 @@
|
||||
package com.baeldung.exceptions.nosuchmethoderror;
|
||||
|
||||
public class MainMenu {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Today's Specials: " + getSpecials());
|
||||
}
|
||||
|
||||
public static String getSpecials() {
|
||||
return SpecialToday.getDesert();
|
||||
}
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
package com.baeldung.exceptions.nosuchmethoderror;
|
||||
public class SpecialToday {
|
||||
private static String desert = "Chocolate Cake";
|
||||
|
||||
public static String getDesert() {
|
||||
return desert;
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.baeldung.exceptions.nosuchmethoderror;
|
||||
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class MainMenuUnitTest {
|
||||
|
||||
@Test
|
||||
void whenGetSpecials_thenNotNull() {
|
||||
assertNotNull(MainMenu.getSpecials());
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user