Commit 979c233c authored by Arne Schmidt's avatar Arne Schmidt
Browse files

Test geändert

parent d9623af3
......@@ -5,11 +5,11 @@ package de.hochschule_trier.sis;
*
*/
public class App {
public static void main( String[] args ) {
System.out.println( "Hello World!" );
}
public int one() {
return (int) Math.round(Math.random());
}
public static void main(String[] args) {
System.out.println("Hello World!");
}
public boolean maybe() {
return ((int) Math.round(Math.random()) == 1);
}
}
......@@ -7,33 +7,29 @@ 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 );
}
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 );
}
/**
* @return the suite of tests being tested
*/
public static Test suite() {
return new TestSuite(AppTest.class);
}
/**
* Rigourous Test :-)
*/
public void testApp()
{
App app = new App();
assertEquals(1, app.one());
}
/**
* Rigourous Test :-)
*/
public void testApp() {
App app = new App();
assertTrue(app.maybe());
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment