Skip to content

Commit f2d3944

Browse files
committed
Create RequestTest.java
1 parent 68c08c6 commit f2d3944

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
package io.codebottle.api.test;
2+
3+
import io.codebottle.api.CodeBottle;
4+
import io.codebottle.api.model.Snippet;
5+
import org.junit.Before;
6+
import org.junit.Test;
7+
8+
import static org.junit.Assert.assertNotNull;
9+
10+
public class RequestTest {
11+
private CodeBottle codeBottle;
12+
13+
@Before
14+
public void setUp() {
15+
codeBottle = CodeBottle.builder()
16+
.build()
17+
.waitForLazyLoading();
18+
}
19+
20+
@Test
21+
public void testRequestSnippetByID() {
22+
final Snippet snippet = codeBottle.requestSnippetByID("1b6c6604d6").join();
23+
24+
assertNotNull("Requested Snippet is null!", snippet);
25+
}
26+
27+
@Test
28+
public void testRequestRevisionByID() {
29+
final Snippet.Revision revision = codeBottle.requestSnippetRevisionByID("1b6c6604d6", 1).join();
30+
31+
assertNotNull("Requested Revision is null!", revision);
32+
}
33+
}

0 commit comments

Comments
 (0)