From cf0dfc31952950246acf45aec476d4e575f5e507 Mon Sep 17 00:00:00 2001 From: Carlos Patino Date: Thu, 3 Oct 2019 10:33:15 +0100 Subject: [PATCH] adding git ignore file, updating compatibility with latest maven and changing the test --- .gitignore | 2 ++ pom.xml | 2 ++ src/test/java/TestApp.java | 18 +++++++++++------- 3 files changed, 15 insertions(+), 7 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d4d196f --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +target/ +shippable/ diff --git a/pom.xml b/pom.xml index d2ff315..7e40c08 100644 --- a/pom.xml +++ b/pom.xml @@ -8,6 +8,8 @@ UTF-8 + 1.6 + 1.6 diff --git a/src/test/java/TestApp.java b/src/test/java/TestApp.java index 4688630..7566634 100644 --- a/src/test/java/TestApp.java +++ b/src/test/java/TestApp.java @@ -2,14 +2,18 @@ import main.App; public class TestApp extends TestCase { - public void testInsertAndGetData() { + public void testInsertAndGetDataIsEqual() { String result = ""; - try { - App app = new App(); - result = app.getData(); - } finally { - assertEquals("Hope this works!", result); - } + App app = new App(); + result = app.getData(); + assertEquals("Message is not the same", "Hope this works!", result); } + + public void testInsertAndGetDataNotEmpty() { + String result = ""; + App app = new App(); + result = app.getData(); + assertNotNull("Message is null", result); + } }