Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 1 #40

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added .github/.keep
Empty file.
Empty file added TD04/.mvn/jvm.config
Empty file.
Empty file added TD04/.mvn/maven.config
Empty file.
21 changes: 21 additions & 0 deletions TD04/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>fr.ivars</groupId>
<artifactId>TD04</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target></properties>
<name>fr.ivars</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
22 changes: 22 additions & 0 deletions TD04/src/main/java/fr/ivars/App.java
Original file line number Diff line number Diff line change
@@ -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 ;
}

}
45 changes: 45 additions & 0 deletions TD04/src/test/java/fr/ivars/AppTest.java
Original file line number Diff line number Diff line change
@@ -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!"));
}
}