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

Commit

Permalink
Change matcher for IT to hasItems()
Browse files Browse the repository at this point in the history
  • Loading branch information
skiddykong committed Aug 9, 2017
1 parent da35108 commit 6ed7b4c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import static org.apache.commons.lang.StringUtils.substringBefore;
import static org.hamcrest.Matchers.containsInAnyOrder;
import static org.hamcrest.Matchers.hasItems;
import static org.junit.Assert.assertThat;

import java.net.URI;
Expand All @@ -21,13 +22,7 @@ public class JsonFilesScanningTest {
public void shouldProcessInternalAndExternalJsonFiles() throws Exception {

List<String> recordedJsonTitles = Files.readAllLines(recordedJsonTitlesFile());

System.out.println("JsonFilesScanningTest: Printing out json-titles.txt");

recordedJsonTitles.stream()
.forEach(s -> System.out.println("JsonFilesScanningTest: Json Value Found" + s));

assertThat(recordedJsonTitles, containsInAnyOrder("one", "two"));
assertThat(recordedJsonTitles, hasItems("one", "two"));
}

private Path recordedJsonTitlesFile() throws URISyntaxException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@


import static org.apache.commons.lang.StringUtils.substringBefore;
import static org.hamcrest.Matchers.containsInAnyOrder;
import static org.hamcrest.Matchers.hasItems;
import static org.junit.Assert.assertThat;

import uk.gov.justice.raml.maven.test.RamlTitleAppendingGenerator;

import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
Expand All @@ -23,7 +21,7 @@ public class RamlFilesScanningTest {
public void shouldProcessInternalAndExternalRamlFiles() throws Exception {

List<String> recordedRamlTitles = Files.readAllLines(recordedRamlTitlesFile());
assertThat(recordedRamlTitles, containsInAnyOrder("external-1.raml", "external-2.raml", "internal-1.raml"));
assertThat(recordedRamlTitles, hasItems("external-1.raml", "external-2.raml", "internal-1.raml"));
}

private Path recordedRamlTitlesFile() throws URISyntaxException {
Expand Down

0 comments on commit 6ed7b4c

Please sign in to comment.