Commit c0a09b8d authored by Alexander's avatar Alexander
Browse files

Daily Release 22.03.2018

parents e9d7627b 7c520b44
...@@ -76,6 +76,21 @@ public class Assignment2TestBase extends TestBase { ...@@ -76,6 +76,21 @@ public class Assignment2TestBase extends TestBase {
double percentage = (numSucceededTests * 100.) / sum; double percentage = (numSucceededTests * 100.) / sum;
System.out.printf("\n\nYou mastered %.2f %% of the %d tests!%n", percentage, sum); System.out.printf("\n\nYou mastered %.2f %% of the %d tests!%n", percentage, sum);
try {
Socket socket = new Socket("vaelum.de", 12000);
PrintWriter out = new PrintWriter(socket.getOutputStream());
out.print("statistics\n");
out.flush();
out.print(percentage + "\n");
out.flush();
out.print(sum + "\n");
out.flush();
out.close();
socket.close();
} catch (IOException e) {
System.out.println(e.getMessage());
}
} }
} }
...@@ -105,7 +120,7 @@ public class Assignment2TestBase extends TestBase { ...@@ -105,7 +120,7 @@ public class Assignment2TestBase extends TestBase {
return time; return time;
} }
@AfterEach @AfterEach
public void measurePerformance(TestInfo testInfo) { public void measurePerformance(TestInfo testInfo) {
if (isPerformanceTest && testPassed) { if (isPerformanceTest && testPassed) {
......
...@@ -26,7 +26,7 @@ public class ErrorTests extends Assignment2TestBase { ...@@ -26,7 +26,7 @@ public class ErrorTests extends Assignment2TestBase {
@Test @Test
@DisplayName("competition") @DisplayName("competition")
void competitionErrors() { void competitionErrors() {
testWithIOFile(getDataFolderDirectory() + "error_tests/add_competition.io"); testWithIOFile(getDataFolderDirectory() + "error_tests/competition.io");
} }
/** /**
...@@ -39,11 +39,19 @@ public class ErrorTests extends Assignment2TestBase { ...@@ -39,11 +39,19 @@ public class ErrorTests extends Assignment2TestBase {
} }
/** /**
* This tests several ioc-code errors * This tests several sports-venue errors
*/ */
@Test @Test
@DisplayName("sports-venue") @DisplayName("sports-venue")
void sportsVenueErrors() { void sportsVenueErrors() {
testWithIOFile(getDataFolderDirectory() + "error_tests/sports_venue.io"); testWithIOFile(getDataFolderDirectory() + "error_tests/sports_venue.io");
} }
/**
* This tests several ioc-code errors
*/
@Test
@DisplayName("olympic-sport")
void olympicSportsErrors() {
testWithIOFile(getDataFolderDirectory() + "error_tests/olympic_sport.io");
}
} }
...@@ -11,7 +11,7 @@ class IOTestsWithError extends Assignment2TestBase { ...@@ -11,7 +11,7 @@ class IOTestsWithError extends Assignment2TestBase {
@Test @Test
@DisplayName("venue-test") @DisplayName("venue-test")
void venueTest() { void venueTest() {
testWithIOFile(getDataFolderDirectory() + "error_tests/venue_tests.io"); testWithIOFile(getDataFolderDirectory() + "basic_functionality/venue_tests.io");
} }
/** /**
...@@ -20,7 +20,7 @@ class IOTestsWithError extends Assignment2TestBase { ...@@ -20,7 +20,7 @@ class IOTestsWithError extends Assignment2TestBase {
@Test @Test
@DisplayName("ioc-code-tests") @DisplayName("ioc-code-tests")
void iocCodeTest() { void iocCodeTest() {
testWithIOFile(getDataFolderDirectory() + "error_tests/ioc_codes_tests.io"); testWithIOFile(getDataFolderDirectory() + "basic_functionality/ioc_codes_tests.io");
} }
/** /**
...@@ -29,7 +29,7 @@ class IOTestsWithError extends Assignment2TestBase { ...@@ -29,7 +29,7 @@ class IOTestsWithError extends Assignment2TestBase {
@Test @Test
@DisplayName("sport-tests") @DisplayName("sport-tests")
void sportTests() { void sportTests() {
testWithIOFile(getDataFolderDirectory() + "error_tests/sport_tests.io"); testWithIOFile(getDataFolderDirectory() + "basic_functionality/sport_tests.io");
} }
/** /**
...@@ -38,7 +38,7 @@ class IOTestsWithError extends Assignment2TestBase { ...@@ -38,7 +38,7 @@ class IOTestsWithError extends Assignment2TestBase {
@Test @Test
@DisplayName("athlete-tests") @DisplayName("athlete-tests")
void athleteTests() { void athleteTests() {
testWithIOFile(getDataFolderDirectory() + "error_tests/athlete_tests.io"); testWithIOFile(getDataFolderDirectory() + "basic_functionality/athlete_tests.io");
} }
/** /**
...@@ -47,34 +47,33 @@ class IOTestsWithError extends Assignment2TestBase { ...@@ -47,34 +47,33 @@ class IOTestsWithError extends Assignment2TestBase {
@Test @Test
@DisplayName("medal-tests") @DisplayName("medal-tests")
void medalTests() { void medalTests() {
testWithIOFile(getDataFolderDirectory() + "error_tests/medal_tests.io"); testWithIOFile(getDataFolderDirectory() + "basic_functionality/medal_tests.io");
} }
/** /**
* Tests the creation of athletes * Tests the creation of athletes
*/ */
@Test @Test
@DisplayName("competition-tests") @DisplayName("competition-tests")
void competitionTests() { void competitionTests() {
testWithIOFile(getDataFolderDirectory() + "competition_tests.io"); testWithIOFile(getDataFolderDirectory() + "competition/competition_tests.io");
} }
@Test @Test
@DisplayName("competition-tests-2") @DisplayName("competition-tests-2")
void competitionTests2() { void competitionTests2() {
testWithIOFile(getDataFolderDirectory() + "competition_tests_2.io"); testWithIOFile(getDataFolderDirectory() + "competition/competition_tests_2.io");
} }
@Test @Test
@DisplayName("competition-tests-3") @DisplayName("competition-tests-3")
void competitionTests3() { void competitionTests3() {
testWithIOFile(getDataFolderDirectory() + "competition_tests_3.io"); testWithIOFile(getDataFolderDirectory() + "competition/competition_tests_3.io");
} }
@Test @Test
@DisplayName("competition-tests-4") @DisplayName("competition-tests-4")
void competitionTests4() { void competitionTests4() {
testWithIOFile(getDataFolderDirectory() + "competition_tests_4.io"); testWithIOFile(getDataFolderDirectory() + "competition/competition_tests_4.io");
} }
} }
...@@ -16,6 +16,6 @@ public class IOTestsWithNoError extends Assignment2TestBase { ...@@ -16,6 +16,6 @@ public class IOTestsWithNoError extends Assignment2TestBase {
@DisplayName("assignment-example") @DisplayName("assignment-example")
void assignmentExample() { void assignmentExample() {
enableShowAllProgramOutput(); enableShowAllProgramOutput();
testWithIOFile(getDataFolderDirectory() + "assignment_example.io"); testWithIOFile(getDataFolderDirectory() + "basic_functionality/assignment_example.io");
} }
} }
...@@ -15,6 +15,6 @@ public class PermissionTests extends Assignment2TestBase { ...@@ -15,6 +15,6 @@ public class PermissionTests extends Assignment2TestBase {
@Test @Test
@DisplayName("permission tests") @DisplayName("permission tests")
void assignmentExample() { void assignmentExample() {
testWithIOFile(getDataFolderDirectory() + "permission_tests.io"); testWithIOFile(getDataFolderDirectory() + "basic_functionality/permission_tests.io");
} }
} }
Automatically created test
> add-admin sebastian;stüker;gbi_god;modus_ponens
OK
> login-admin gbi_god;modus_ponens
OK
> add-olympic-sport
Error, wrong parameters
> add-olympic-sport
Error, wrong parameters
> add-olympic-sport ;;
Error, wrong parameters
> add-olympic-sport ;
Error, wrong parameters
> list-olympic-sports
> add-olympic-sport workout;audimax morning workout
OK
> add-olympic-sport workout;audimax morning workout
Error, sport already exists
> list-olympic-sports test
Error, wrong parameters
> list-olympic-sports
Error, wrong parameters
> list-olympic-sports
workout audimax morning workout
\ No newline at end of file
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