Skip to content
This repository has been archived by the owner on May 26, 2020. It is now read-only.

Commit

Permalink
test added to increase code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
khanhassan committed Aug 11, 2017
1 parent bec7bd2 commit d4a97fa
Showing 1 changed file with 16 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,25 +1,18 @@
package uk.gov.justice.raml.io.files.parser;

import static java.nio.file.Paths.get;
import static java.util.Arrays.asList;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.allOf;
import static org.hamcrest.Matchers.hasEntry;
import static org.hamcrest.Matchers.hasItem;
import static org.hamcrest.Matchers.hasSize;
import org.junit.Test;

import javax.json.JsonObject;
import javax.json.JsonValue;
import java.net.URISyntaxException;
import java.nio.file.Path;
import java.util.Collection;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;

import javax.json.JsonObject;
import javax.json.JsonValue;

import org.junit.Test;
import static java.nio.file.Paths.get;
import static java.util.Arrays.asList;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.*;

public class JsonSchemaFileParserTest {

Expand Down Expand Up @@ -52,4 +45,13 @@ public void shouldParsePathsToJson() throws URISyntaxException {
)
);
}

@Test
public void shouldThrowFileNotFoundException() {
final Path baseDir = get("");
final List<Path> paths = asList(get("test-schema1.json"));
Collection<JsonObject> result = parser.parse(baseDir, paths);
assertThat(result, hasSize(1));
assertThat(result, hasItem(nullValue()));
}
}

0 comments on commit d4a97fa

Please sign in to comment.