Daniel Horowitz 6 年之前
父節點
當前提交
50af547fa3
共有 4 個檔案被更改,包括 63 行新增1 行删除
  1. 26
    1
      pom.xml
  2. 19
    0
      src/main/java/DiceTest.java
  3. 5
    0
      src/main/java/Simulation.java
  4. 13
    0
      src/main/java/SimulationTest.java

+ 26
- 1
pom.xml 查看文件

@@ -7,6 +7,31 @@
7 7
     <groupId>com.zipcodewilmington</groupId>
8 8
     <artifactId>Dicey-Lab</artifactId>
9 9
     <version>1.0-SNAPSHOT</version>
10
+    <dependencies>
11
+        <dependency>
12
+            <groupId>junit</groupId>
13
+            <artifactId>junit</artifactId>
14
+            <version>4.12</version>
15
+        </dependency>
16
+        <dependency>
17
+            <groupId>junit</groupId>
18
+            <artifactId>junit</artifactId>
19
+            <version>RELEASE</version>
20
+        </dependency>
21
+    </dependencies>
10 22
 
11 23
 
12
-</project>
24
+</project>
25
+
26
+<!--<?xml version="1.0" encoding="UTF-8"?>-->
27
+<!--<project xmlns="http://maven.apache.org/POM/4.0.0"-->
28
+         <!--xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"-->
29
+         <!--xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">-->
30
+    <!--<modelVersion>4.0.0</modelVersion>-->
31
+
32
+    <!--<groupId>com.zipcodewilmington</groupId>-->
33
+    <!--<artifactId>Dicey-Lab</artifactId>-->
34
+    <!--<version>1.0-SNAPSHOT</version>-->
35
+
36
+
37
+<!--</project>-->

+ 19
- 0
src/main/java/DiceTest.java 查看文件

@@ -0,0 +1,19 @@
1
+import org.junit.Assert;
2
+import org.junit.Test;
3
+
4
+import static org.junit.Assert.*;
5
+
6
+public class DiceTest {
7
+
8
+    @Test
9
+    public void rollDice() {
10
+        Dice dice = new Dice();
11
+
12
+        Integer actual = dice.rollDice(2);
13
+
14
+        Assert.assertTrue(actual >= 2 && actual <= 12);
15
+
16
+
17
+
18
+    }
19
+}

+ 5
- 0
src/main/java/Simulation.java 查看文件

@@ -30,5 +30,10 @@ public class Simulation extends Dice {
30 30
 
31 31
         }
32 32
 
33
+    public static void main(String[] args) {
34
+
35
+
36
+    }
37
+
33 38
     }
34 39
 

+ 13
- 0
src/main/java/SimulationTest.java 查看文件

@@ -0,0 +1,13 @@
1
+import org.junit.Test;
2
+
3
+import static org.junit.Assert.*;
4
+
5
+public class SimulationTest {
6
+
7
+    @Test
8
+    public void runSimulation() {
9
+
10
+
11
+
12
+    }
13
+}