package com.scorpiac.javarant;

import org.testng.annotations.Test;

public class DevRantIT {
}

@@ -59,38 +59,1348 @@
 ons.
-Test;%0A%0Apublic class DevRantIT %7B
+BeforeClass;%0Aimport org.testng.annotations.Test;%0A%0Aimport java.util.Arrays;%0A%0Aimport static org.testng.Assert.assertEquals;%0A%0Apublic class DevRantIT %7B%0A    private DevRant devRant;%0A%0A    @BeforeClass%0A    public void beforeClass() %7B%0A        // TODO: use Wiremock.%0A        devRant = new DevRant();%0A    %7D%0A%0A    @Test%0A    public void testGetRant() %7B%0A        Rant rant = devRant.getRant(686001).get();%0A%0A        assertEquals(rant.getId(), 686001);%0A        assertEquals(rant.getText(), %22I only just noticed this is on the git man page :P%22);%0A        assertEquals(rant.getScore(), 84);%0A        assertEquals(rant.getTags(), Arrays.asList(%22terminal%22, %22manual%22, %22git%22));%0A        assertEquals(rant.getVoteState(), VoteState.NONE);%0A%0A        // Comments.%0A        assertEquals(rant.getCommentCount(), 5);%0A        assertEquals(rant.getComments().size(), 5);%0A        assertEquals(rant.getComments().get(0).getId(), 686175);%0A%0A        // Image.%0A        assertEquals(rant.getImage().getWidth(), 530);%0A        assertEquals(rant.getImage().getHeight(), 134);%0A        assertEquals(rant.getImage().getLink(), %22https://img.devrant.io/devrant/rant/r_686001_VfN7X.jpg%22);%0A%0A        // User.%0A        /*assertEquals(rant.getUser().getId(), 102959);%0A        assertEquals(rant.getUser().getUsername(), %22LucaScorpion%22);%0A        assertEquals(rant.getUser().getScore(), 3831);*/%0A    %7D
 %0A%7D%0A

Improve DevRantIT