diff options
| author | Marco de Wild <mdwild@sogyo.nl> | 2021-01-14 11:48:54 +0100 |
|---|---|---|
| committer | Marco de Wild <mdwild@sogyo.nl> | 2021-01-14 11:48:54 +0100 |
| commit | e257ad73e868ccb9347b4013f17fefb1b03ec875 (patch) | |
| tree | 1ead2d6fe770397a5134dc603a3bdfc024d2500c /domain/src/test/java | |
Opzet voor de OO module gemaakt
Diffstat (limited to 'domain/src/test/java')
| -rw-r--r-- | domain/src/test/java/mancala/domain/FooTest.java | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/domain/src/test/java/mancala/domain/FooTest.java b/domain/src/test/java/mancala/domain/FooTest.java new file mode 100644 index 0000000..2861c43 --- /dev/null +++ b/domain/src/test/java/mancala/domain/FooTest.java @@ -0,0 +1,29 @@ +package mancala.domain; + +// Your test class should be in the same +// package as the class you're testing. +// Usually the test directory mirrors the +// main directory 1:1. So for each class in src/main, +// there is a class in src/test. + +// Import our test dependencies. We import the Test-attribute +// and a set of assertions. +import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.*; + +public class FooTest { + // Define a test starting with @Test. The test is like + // a small main method - you need to setup everything + // and you can write any arbitrary Java code in it. + @Test + public void aNormalBorlStartsWith4Stones() { + Foo foo = new Foo(); + assertEquals(42, foo.theAnswerToLifeTheUniverseAndEverything()); + } + + @Test + public void thisTestFailsUnfortunately() { + Foo foo = new Foo(); + assertEquals(3, foo.theAnswerToLifeTheUniverseAndEverything()); + } +}
\ No newline at end of file |
