mirror of
https://github.com/DerTyp7/bowling-kata-java.git
synced 2025-10-29 12:52:12 +01:00
add beforeEach to tests
This commit is contained in:
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
@@ -1,11 +1,17 @@
|
|||||||
package de.tealfire;
|
package de.tealfire;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
public class BowlingTest {
|
public class BowlingTest {
|
||||||
|
private Bowling bowling;
|
||||||
|
@BeforeEach
|
||||||
|
public void setUp() {
|
||||||
|
bowling = new Bowling();
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testScoreGutterGame() {
|
public void testScoreGutterGame() {
|
||||||
Bowling bowling = new Bowling();
|
|
||||||
for (int i = 0; i < 20; i++) {
|
for (int i = 0; i < 20; i++) {
|
||||||
bowling.roll(0);
|
bowling.roll(0);
|
||||||
}
|
}
|
||||||
@@ -14,7 +20,6 @@ public class BowlingTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testScoreGameOfOnes() {
|
public void testScoreGameOfOnes() {
|
||||||
Bowling bowling = new Bowling();
|
|
||||||
for (int i = 0; i < 20; i++) {
|
for (int i = 0; i < 20; i++) {
|
||||||
bowling.roll(1);
|
bowling.roll(1);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user