From f4d1022fcade1f6d4ffdf7607270579007a9a369 Mon Sep 17 00:00:00 2001 From: "github-classroom[bot]" <66690702+github-classroom[bot]@users.noreply.github.com> Date: Mon, 23 Sep 2024 14:22:33 +0000 Subject: [PATCH 1/3] GitHub Classroom Feedback --- .github/.keep | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .github/.keep diff --git a/.github/.keep b/.github/.keep new file mode 100644 index 0000000..e69de29 From d350036bf92a88b9cafc2935c5e800d4f7891fd5 Mon Sep 17 00:00:00 2001 From: "github-classroom[bot]" <66690702+github-classroom[bot]@users.noreply.github.com> Date: Mon, 23 Sep 2024 14:22:33 +0000 Subject: [PATCH 2/3] Setting up GitHub Classroom Feedback From d31bde90a5159c2f704808d6cdfe5d8823ad830a Mon Sep 17 00:00:00 2001 From: Trailmix05 <126606406+Trailmix05@users.noreply.github.com> Date: Mon, 23 Sep 2024 17:00:55 +0200 Subject: [PATCH 3/3] TD04 --- TD04/.mvn/jvm.config | 0 TD04/.mvn/maven.config | 0 TD04/pom.xml | 21 +++++++++++ TD04/src/main/java/fr/ivars/App.java | 22 ++++++++++++ TD04/src/test/java/fr/ivars/AppTest.java | 45 ++++++++++++++++++++++++ 5 files changed, 88 insertions(+) create mode 100644 TD04/.mvn/jvm.config create mode 100644 TD04/.mvn/maven.config create mode 100644 TD04/pom.xml create mode 100644 TD04/src/main/java/fr/ivars/App.java create mode 100644 TD04/src/test/java/fr/ivars/AppTest.java diff --git a/TD04/.mvn/jvm.config b/TD04/.mvn/jvm.config new file mode 100644 index 0000000..e69de29 diff --git a/TD04/.mvn/maven.config b/TD04/.mvn/maven.config new file mode 100644 index 0000000..e69de29 diff --git a/TD04/pom.xml b/TD04/pom.xml new file mode 100644 index 0000000..a74ef37 --- /dev/null +++ b/TD04/pom.xml @@ -0,0 +1,21 @@ + + 4.0.0 + fr.ivars + TD04 + jar + 1.0-SNAPSHOT + + 1.8 + 1.8 + fr.ivars + http://maven.apache.org + + + junit + junit + 3.8.1 + test + + + \ No newline at end of file diff --git a/TD04/src/main/java/fr/ivars/App.java b/TD04/src/main/java/fr/ivars/App.java new file mode 100644 index 0000000..b806b8b --- /dev/null +++ b/TD04/src/main/java/fr/ivars/App.java @@ -0,0 +1,22 @@ +package fr.ivars; + +/** + * Hello world! + * + */ +public class App +{ + public static void main( String[] args ) + { + System.out.println(hello()); + } + + public static String hello() { + return "Hello World!" ; + } + + public static String hello(String param) { + return param ; + } + +} diff --git a/TD04/src/test/java/fr/ivars/AppTest.java b/TD04/src/test/java/fr/ivars/AppTest.java new file mode 100644 index 0000000..6fc37f9 --- /dev/null +++ b/TD04/src/test/java/fr/ivars/AppTest.java @@ -0,0 +1,45 @@ +package fr.ivars; + +import junit.framework.Test; +import junit.framework.TestCase; +import junit.framework.TestSuite; +/** + * Unit test for simple App. + */ +public class AppTest + extends TestCase +{ + /** + * Create the test case + * + * @param testName name of the test case + */ + public AppTest( String testName ) + { + super( testName ); + } + + /** + * @return the suite of tests being tested + */ + public static Test suite() + { + return new TestSuite( AppTest.class ); + } + + /** + * Test the return with empty parameter + */ + public void testHelloEmptyParameter() + { + assertEquals("Hello World!", App.hello()); + } + + /** + * Test the return with a parameter + */ + public void testHelloParameter() + { + assertEquals("Hello JMB!", App.hello("Hello JMB!")); + } +}