Skip to content

Commit

Permalink
Removed unused import + formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
marceloverdijk committed Aug 6, 2019
1 parent b44b6d0 commit 2c396d9
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

package com.rivescript;

import jdk.internal.jline.internal.TestAccessible;
import org.junit.Test;

import java.io.IOException;
Expand All @@ -35,6 +34,7 @@
* Tests for the RiveScript classpath load methods.
*/
public class RiveScriptResourceTests {

/**
* This method tests the loadInputStream() method of RiveScript. This implies
* usage of the loadReader() method as well, as it delegates internally.
Expand All @@ -44,7 +44,7 @@ public class RiveScriptResourceTests {
@Test
public void testLoadFromInputStream() throws IOException {
RiveScript engine=new RiveScript();
try(InputStream is=RiveScript.class.getResourceAsStream("/test.rive")) {
try (InputStream is = RiveScript.class.getResourceAsStream("/test.rive")) {
engine.loadInputStream(is);
engine.sortReplies();
assertEquals(engine.reply("anyone", "hello"), "Hi there!");
Expand All @@ -62,7 +62,7 @@ public void testLoadFromInputStream() throws IOException {
@Test
public void testLoadFromNull() throws IOException {
RiveScript engine=new RiveScript();
try(InputStream is=RiveScript.class.getResourceAsStream("/notthere.rive")) {
try (InputStream is = RiveScript.class.getResourceAsStream("/notthere.rive")) {
assertNull(is);
engine.loadInputStream(is);
throw new AssertionError("Should have received error from loadInputStream with null input");
Expand Down

0 comments on commit 2c396d9

Please sign in to comment.