Skip to content

Commit

Permalink
(jcabi#40) Upgrade parent & fix compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
andreoss committed Jun 28, 2020
1 parent 21ba4f9 commit 998b292
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 19 deletions.
17 changes: 10 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<parent>
<groupId>com.jcabi</groupId>
<artifactId>jcabi</artifactId>
<version>1.23</version>
<version>1.25.1</version>
</parent>
<artifactId>jcabi-matchers</artifactId>
<version>2.0-SNAPSHOT</version>
Expand Down Expand Up @@ -71,12 +71,7 @@
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<artifactId>hamcrest</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -196,6 +191,14 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
2 changes: 1 addition & 1 deletion src/test/java/com/jcabi/matchers/JaxbConverterTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
import javax.xml.bind.annotation.XmlType;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.Test;
import org.junit.jupiter.api.Test;

/**
* Test case for {@link JaxbConverter}.
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/com/jcabi/matchers/NoBrokenLinksITCase.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import org.apache.commons.lang3.StringUtils;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.Test;
import org.junit.jupiter.api.Test;

/**
* Integration case for {@link NoBrokenLinks}.
Expand Down
17 changes: 11 additions & 6 deletions src/test/java/com/jcabi/matchers/NoBrokenLinksTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
import org.apache.commons.lang3.StringUtils;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.Test;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

/**
* Test case for {@link NoBrokenLinks}.
Expand Down Expand Up @@ -106,11 +107,15 @@ public void passesWithoutBrokenLinks() throws Exception {
* NoBrokenLinks can throw for a broken HTML.
* @throws Exception If something goes wrong inside
*/
@Test(expected = IllegalArgumentException.class)
public void throwsWhenHtmlIsBroken() throws Exception {
MatcherAssert.assertThat(
new FakeRequest().withBody("not HTML at all").fetch(),
new NoBrokenLinks(new URI("#"))
@Test
public void throwsWhenHtmlIsBroken() {
Assertions.assertThrows(
IllegalArgumentException.class,
() ->
MatcherAssert.assertThat(
new FakeRequest().withBody("not HTML at all").fetch(),
new NoBrokenLinks(new URI("#"))
)
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/test/java/com/jcabi/matchers/RegexMatchersTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.Test;
import org.junit.jupiter.api.Test;

/**
* Test case for {@link RegexMatchers}.
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/com/jcabi/matchers/StringSourceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import org.apache.commons.lang3.StringUtils;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.w3c.dom.Node;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/com/jcabi/matchers/W3CMatchersTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import org.apache.commons.lang3.StringUtils;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.Test;
import org.junit.jupiter.api.Test;

/**
* Test case for {@link W3CMatchers}.
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/com/jcabi/matchers/XhtmlMatchersTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
import org.apache.commons.lang3.StringUtils;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.w3c.dom.Document;
import org.w3c.dom.Element;

Expand Down

0 comments on commit 998b292

Please sign in to comment.