From d168388c9a2c62291dd9173e44de5d6d2b8fa96e Mon Sep 17 00:00:00 2001 From: Gianmarco Pettinato Date: Sun, 3 Apr 2022 20:03:17 +0200 Subject: [PATCH] super important library --- .gitignore | 1 + pom.xml | 75 +++++++++++++++++++ .../gitlesson/demolibrary/TestLibrary.java | 11 +++ .../com/gitlesson/demolibrary/AppTest.java | 21 ++++++ 4 files changed, 108 insertions(+) create mode 100644 .gitignore create mode 100644 pom.xml create mode 100644 src/main/java/com/gitlesson/demolibrary/TestLibrary.java create mode 100644 src/test/java/com/gitlesson/demolibrary/AppTest.java diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1de5659 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +target \ No newline at end of file diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..fbb7538 --- /dev/null +++ b/pom.xml @@ -0,0 +1,75 @@ + + + + 4.0.0 + + com.gitlesson.demolibrary + demolibrary + 1.0-SNAPSHOT + + demolibrary + + http://www.example.com + + + UTF-8 + 1.7 + 1.7 + + + + + junit + junit + 4.11 + test + + + + + + + + + maven-clean-plugin + 3.1.0 + + + + maven-resources-plugin + 3.0.2 + + + maven-compiler-plugin + 3.8.0 + + + maven-surefire-plugin + 2.22.1 + + + maven-jar-plugin + 3.0.2 + + + maven-install-plugin + 2.5.2 + + + maven-deploy-plugin + 2.8.2 + + + + maven-site-plugin + 3.7.1 + + + maven-project-info-reports-plugin + 3.0.0 + + + + + diff --git a/src/main/java/com/gitlesson/demolibrary/TestLibrary.java b/src/main/java/com/gitlesson/demolibrary/TestLibrary.java new file mode 100644 index 0000000..f8d80b1 --- /dev/null +++ b/src/main/java/com/gitlesson/demolibrary/TestLibrary.java @@ -0,0 +1,11 @@ +package com.gitlesson.demolibrary; + +/** + * Hello world! + * + */ +public class TestLibrary { + public static String getText() { + return "Hello from library!"; + } +} diff --git a/src/test/java/com/gitlesson/demolibrary/AppTest.java b/src/test/java/com/gitlesson/demolibrary/AppTest.java new file mode 100644 index 0000000..4e31155 --- /dev/null +++ b/src/test/java/com/gitlesson/demolibrary/AppTest.java @@ -0,0 +1,21 @@ +package com.gitlesson.demolibrary; + +import static org.junit.Assert.assertEquals; + +import org.junit.Test; + +/** + * Unit test for simple App. + */ +public class AppTest { + private String ExpectedString = "Hello from library!"; + + /** + * Rigorous Test :-) + */ + @Test + public void shouldAnswerWithTrue() { + String result = TestLibrary.getText(); + assertEquals(ExpectedString, result); + } +}