@@ -0,0 +1,2271 @@
+package ch.heigvd.res.labs.roulette.net.client;%0A%0Aimport ch.heigvd.res.labs.roulette.data.Student;%0Aimport ch.heigvd.res.labs.roulette.net.protocol.RouletteV2Protocol;%0Aimport ch.heigvd.schoolpulse.TestAuthor;%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0Aimport org.junit.rules.ExpectedException;%0A%0Aimport java.io.IOException;%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0Aimport static org.junit.Assert.assertEquals;%0A%0A/**%0A * This class contains automated tests to validate the client and the server%0A * implementation of the Roulette Protocol (version 2)%0A *%0A * @author Arnold von Bauer Gauss%0A */%0Apublic class RouletteV2GaussianBlursTest %7B%0A%0A    @Rule%0A    public ExpectedException exception = ExpectedException.none();%0A%0A    @Rule%0A    public EphemeralClientServerPair roulettePair = new EphemeralClientServerPair(RouletteV2Protocol.VERSION);%0A%0A    @Test%0A    @TestAuthor(githubId = %22gaussianblurs%22)%0A    public void theServerShouldReturnTheCorrectVersionNumber() throws IOException %7B%0A        assertEquals(RouletteV2Protocol.VERSION, roulettePair.getClient().getProtocolVersion());%0A    %7D%0A%0A    @Test%0A    @TestAuthor(githubId = %22gaussianblurs%22)%0A    public void theServerShouldListenToTheCorrectPort() %7B%0A        assertEquals(RouletteV2Protocol.DEFAULT_PORT, roulettePair.getServer().getPort());%0A    %7D%0A%0A    @Test%0A    @TestAuthor(githubId = %22gaussianblurs%22)%0A    public void theServerShouldHaveZeroStudentsAfterClear() throws IOException %7B%0A        IRouletteV2Client client = (IRouletteV2Client) roulettePair.getClient();%0A        client.loadStudent(%22Albert%22);%0A        client.loadStudent(%22Gerard%22);%0A        client.loadStudent(%22Roger%22);%0A        client.clearDataStore();%0A        assertEquals(0, client.getNumberOfStudents());%0A    %7D%0A%0A    @Test%0A    @TestAuthor(githubId = %22gaussianblurs%22)%0A    public void theServerShouldListStudents() throws IOException %7B%0A        IRouletteV2Client client = (IRouletteV2Client) roulettePair.getClient();%0A        List%3CStudent%3E addStudents = new ArrayList%3C%3E();%0A        addStudents.add(new Student(%22Albert%22));%0A        addStudents.add(new Student(%22Gerard%22));%0A        addStudents.add(new Student(%22Roger%22));%0A        client.loadStudents(addStudents);%0A        List%3CStudent%3E students = client.listStudents();%0A        assertEquals(addStudents, students);%0A    %7D%0A%0A%7D%0A

Add specs for Roulette Protocol v2 (#80)