Skip to content

Commit

Permalink
#56 Got rid of module sample-project
Browse files Browse the repository at this point in the history
  • Loading branch information
jlink committed Jan 27, 2016
1 parent adf7572 commit 3adb983
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 473 deletions.
14 changes: 3 additions & 11 deletions documentation/src/docs/asciidoc/running-tests.adoc
Expand Up @@ -285,20 +285,12 @@ If you have multiple JUnit 5 tests you can create a test suite.

[source,java,indent=0]
[subs="verbatim"]
.A JUnit 5 suite run through JUnit 4
----
package com.example;
import org.junit.gen5.junit4runner.JUnit5;
import org.junit.gen5.junit4runner.JUnit5.Packages;
import org.junit.runner.RunWith;
@RunWith(JUnit5.class)
@Packages("com.example")
public class JUnit4SamplesSuite {
}
include::{testDir}/example/JUnit4SampleSuite.java[tags=user_guide]
----

The `JUnit4SamplesSuite` will discover and run all tests in the `com.example` package
The `JUnit4SamplesSuite` will discover and run all tests in the `example` package
and its subpackages.

There are more configuration options for discovering and filtering tests than just
Expand Down
Expand Up @@ -8,24 +8,27 @@
* http://www.eclipse.org/legal/epl-v10.html
*/

package com.example;
package example;

import java.util.HashMap;

import org.junit.gen5.api.Test;
import org.junit.gen5.api.TestReporter;

public class ReportingTestCase {
public class ExtendedReportingTests {

@Test
void testWithReporting(TestReporter testReporter) {
void reportSingleValue(TestReporter testReporter) {
testReporter.publishEntry("a key", "a value");
}

@Test
void reportSeveralValues(TestReporter testReporter) {
HashMap<String, String> values = new HashMap<>();
values.put("user name", "dk38");
values.put("award year", "1974");

testReporter.publishEntry(values);

}

}
Expand Up @@ -8,13 +8,15 @@
* http://www.eclipse.org/legal/epl-v10.html
*/

package com.example;
package example;

import org.junit.gen5.junit4.runner.Classes;
// tag::user_guide[]
import org.junit.gen5.junit4.runner.JUnit5;
import org.junit.gen5.junit4.runner.Packages;
import org.junit.runner.RunWith;

@RunWith(JUnit5.class)
@Classes({ SampleTestCase.class, SucceedingTestCase.class, JUnit4TestCase.class })
public class JUnit4SamplesSuite {
@Packages({ "example" })
public class JUnit4SampleSuite {
}
// end::user_guide[]
41 changes: 0 additions & 41 deletions sample-project/build.gradle

This file was deleted.

This file was deleted.

33 changes: 0 additions & 33 deletions sample-project/src/test/java/com/example/Fast.java

This file was deleted.

41 changes: 0 additions & 41 deletions sample-project/src/test/java/com/example/JUnit4TestCase.java

This file was deleted.

122 changes: 0 additions & 122 deletions sample-project/src/test/java/com/example/SampleTestCase.java

This file was deleted.

0 comments on commit 3adb983

Please sign in to comment.