package hundsfickerei.schafkopf.server.model;

import org.junit.Test;

import java.util.ArrayList;
import java.util.List;

public class GameTest {

    @Test
    public void testRandomSoloPlayerGame() {
        Game game = new Game();
        List<Player> players = new ArrayList<>();
        for (int i = 0; i < 4; i++) {
            players.add(new RandomSoloPlayer(game));
        }
        game.init(players);
        game.start();
        System.out.println("Points:");
        for (Player player : players) {
            System.out.println(player.hashCode() + " " + player.getPoints());
        }

    }

}

@@ -116,16 +116,145 @@
 .List;%0A%0A
+import static org.hamcrest.Matchers.equalTo;%0Aimport static org.hamcrest.Matchers.is;%0Aimport static org.junit.Assert.assertThat;%0A%0A
 public c
@@ -570,37 +570,19 @@
     
-System.out.println(%22Points:%22)
+int sum = 0
 ;%0A  
@@ -635,50 +635,17 @@
     
-System.out.println(player.hashCode() + %22 %22
+sum = sum
  + p
@@ -661,17 +661,16 @@
 Points()
-)
 ;%0A      
@@ -673,16 +673,58 @@
       %7D%0A
+        assertThat(sum, is(equalTo(120)));
 %0A    %7D%0A%0A

add first hamcrest test