summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSOGYO\bvdoord <bvdoord@sogyo.nl>2021-02-16 12:52:42 +0100
committerSOGYO\bvdoord <bvdoord@sogyo.nl>2021-02-16 12:52:42 +0100
commit1cdc1b34b25e8d689b55e41851761241d893b10e (patch)
treeb4ee9e530d2f49df05d02c6f9e89d25633b8c645
parent51d1d5ac88e0b9def0423906deb5543c4439b125 (diff)
parent7b1b8a35db9699240b6c5243cd89ef0be7fd798a (diff)
Merge branch 'mvc' of http://git.sogyo.nl/academy/mastercourses/softwareengineering/exercises/mancala/mancala-java into mvc
-rw-r--r--README.md12
-rw-r--r--api/src/main/java/mancala/App.java1
-rw-r--r--domain/src/main/java/mancala/domain/Foo.java2
-rw-r--r--domain/src/test/java/mancala/domain/FooTest.java6
4 files changed, 11 insertions, 10 deletions
diff --git a/README.md b/README.md
index 859d23b..78573f5 100644
--- a/README.md
+++ b/README.md
@@ -87,25 +87,31 @@ To tell the build tool which files to compile, the above structure is used. In s
## Using Gradle
-You can either install Gradle on your machine and use the installation or use the Gradle wrapper files found next to this README.
+You can either install Gradle on your machine and use the installation or use the Gradle wrapper files found next to this README. Replace the `./gradlew` command with `gradle` if using the globally installed Gradle or `.\gradlew.bat` if you're running the Windows batch script.
```bash
# Building
./gradlew build
-# Testing
+# Testing (will fail with the initial code)
./gradlew test
# Running (only relevant for the MVC case)
./gradlew run
```
-Replace the `./gradlew` command with `gradle` if using the globally installed Gradle or `.\gradlew.bat` if you're running the Windows batch script.
+If you run the program, you will notice the build "progress" is stuck on 87% or so. That means your application is running and Gradle is waiting for it to succeed. You can ignore the progress bar when running the application; it should print some lines when it's ready.
## Assignment
For the lecture, see [the drive](https://drive.google.com/drive/u/0/folders/1PvC-HS8ty3mdtSaNdR5rt5-GwL-5_LaY).
+<<<<<<< HEAD
The global goal is to make a web front-end to your mancala back-end. A stub has been made. In api/src/test you can find examples of how you can test the api endpoints.
+=======
+
+The global goal is to make a web front-end to your mancala back-end. A stub has been made. In api/src/test you can find examples of how you can test the api endpoints.
+
+>>>>>>> 7b1b8a35db9699240b6c5243cd89ef0be7fd798a
- Familiarise yourself with the repository. Get the servers running and make sure you can connect to both servers. Enter two names in the boxes. You should see a "TODO" screen.
- Show the mancala game when it is started.
- If you want to use your own implementation, reference your implemenation in the `MancalaImpl` class.
diff --git a/api/src/main/java/mancala/App.java b/api/src/main/java/mancala/App.java
index 71fe2d7..8560e2d 100644
--- a/api/src/main/java/mancala/App.java
+++ b/api/src/main/java/mancala/App.java
@@ -33,6 +33,7 @@ public class App {
new ServletContextHandler(ServletContextHandler.SESSIONS);
context.setContextPath("/");
server.setHandler(context);
+ return context;
}
private static void registerServlets(ServletContextHandler context) {
diff --git a/domain/src/main/java/mancala/domain/Foo.java b/domain/src/main/java/mancala/domain/Foo.java
index 51045fe..bcce6fa 100644
--- a/domain/src/main/java/mancala/domain/Foo.java
+++ b/domain/src/main/java/mancala/domain/Foo.java
@@ -6,6 +6,6 @@ package mancala.domain;
public class Foo {
public int theAnswerToLifeTheUniverseAndEverything() {
- return 42;
+ return 41;
}
} \ No newline at end of file
diff --git a/domain/src/test/java/mancala/domain/FooTest.java b/domain/src/test/java/mancala/domain/FooTest.java
index 2861c43..fa784d3 100644
--- a/domain/src/test/java/mancala/domain/FooTest.java
+++ b/domain/src/test/java/mancala/domain/FooTest.java
@@ -20,10 +20,4 @@ public class FooTest {
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