Skip to content

Commit

Permalink
Merge pull request #41 from andreoss/issue-40
Browse files Browse the repository at this point in the history
For #40: Update parent
  • Loading branch information
yegor256 committed Nov 13, 2020
2 parents 1f8f1ee + 26650ff commit f370489
Show file tree
Hide file tree
Showing 21 changed files with 62 additions and 89 deletions.
14 changes: 3 additions & 11 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.2</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 @@ -176,11 +171,8 @@
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* Copyright (c) 2011-2017, jcabi.com
* All rights reserved.
*
Expand Down Expand Up @@ -42,8 +42,6 @@
*
* Based in {@link AllOf}
*
* @author Jose V. Dal Pra Junior (jrdalpra@gmail.com)
* @version $Id$
* @param <T> Type of argument
* @since 0.2.6
*/
Expand All @@ -58,12 +56,14 @@ final class AllOfThatPrintsOnlyWrongMatchers<T> extends DiagnosingMatcher<T> {
* Matchers that does not matches.
*/
private final transient List<Matcher<? super T>> wrong;

/**
* Construct that accept matchers to test.
* @param iterable Matchers that will be tested.
*/
AllOfThatPrintsOnlyWrongMatchers(
final Iterable<Matcher<? super T>> iterable) {
final Iterable<Matcher<? super T>> iterable
) {
super();
this.matchers = iterable;
this.wrong = new ArrayList<Matcher<? super T>>(Tv.THREE);
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/com/jcabi/matchers/JaxbConverter.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* Copyright (c) 2011-2017, jcabi.com
* All rights reserved.
*
Expand Down Expand Up @@ -78,8 +78,6 @@
* }
* }</pre>
*
* @author Yegor Bugayenko (yegor@tpc2.com)
* @version $Id$
* @since 0.1
*/
@ToString
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/com/jcabi/matchers/NoBrokenLinks.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* Copyright (c) 2011-2017, jcabi.com
* All rights reserved.
*
Expand Down Expand Up @@ -47,8 +47,6 @@
/**
* Finds broken links in HTML.
*
* @author Yegor Bugayenko (yegor@tpc2.com)
* @version $Id$
* @since 0.3.4
*/
@ToString
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* Copyright (c) 2011-2017, jcabi.com
* All rights reserved.
*
Expand Down Expand Up @@ -41,8 +41,6 @@
*
* <p>Objects of this class are immutable and thread-safe.
*
* @author Carlos Miranda (miranda.cma@gmail.com)
* @version $Id$
* @since 1.3
*/
@ToString
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/com/jcabi/matchers/RegexMatchers.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* Copyright (c) 2011-2017, jcabi.com
* All rights reserved.
*
Expand Down Expand Up @@ -39,8 +39,6 @@
/**
* Convenient matchers for checking Strings against regular expressions.
*
* @author Carlos Miranda (miranda.cma@gmail.com)
* @version $Id$
* @since 1.3
*/
@ToString
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* Copyright (c) 2011-2017, jcabi.com
* All rights reserved.
*
Expand Down Expand Up @@ -41,8 +41,6 @@
*
* <p>Objects of this class are immutable and thread-safe.
*
* @author Carlos Miranda (miranda.cma@gmail.com)
* @version $Id$
* @since 1.3
*/
@Immutable
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/com/jcabi/matchers/StringSource.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* Copyright (c) 2011-2017, jcabi.com
* All rights reserved.
*
Expand Down Expand Up @@ -46,8 +46,6 @@
*
* <p>Objects of this class are immutable and thread-safe.
*
* @author Yegor Bugayenko (yegor@tpc2.com)
* @version $Id$
* @since 0.1
*/
@EqualsAndHashCode(callSuper = false, of = "xml")
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/com/jcabi/matchers/W3CMatchers.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* Copyright (c) 2011-2017, jcabi.com
* All rights reserved.
*
Expand Down Expand Up @@ -37,8 +37,6 @@
/**
* Matchers for validating HTML and CSS content.
*
* @author Carlos Miranda (miranda.cma@gmail.com)
* @version $Id$
* @since 0.1
*/
@ToString
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/com/jcabi/matchers/W3CValidatorMatcher.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* Copyright (c) 2011-2017, jcabi.com
* All rights reserved.
*
Expand Down Expand Up @@ -43,8 +43,6 @@
*
* <p>Objects of this class are immutable and thread-safe.
*
* @author Carlos Miranda (miranda.cma@gmail.com)
* @version $Id$
* @since 0.1
*/
@Immutable
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/com/jcabi/matchers/XPathMatcher.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* Copyright (c) 2011-2017, jcabi.com
* All rights reserved.
*
Expand Down Expand Up @@ -41,8 +41,6 @@
*
* <p>Objects of this class are immutable and thread-safe.
*
* @author Yegor Bugayenko (yegor@tpc2.com)
* @version $Id$
* @since 0.3.7
* @param <T> Type of param
*/
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/com/jcabi/matchers/XhtmlMatchers.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* Copyright (c) 2011-2017, jcabi.com
* All rights reserved.
*
Expand Down Expand Up @@ -54,8 +54,6 @@
* XhtmlMatchers.hasXPath("/root/a[.='hello']")
* );</pre>
*
* @author Yegor Bugayenko (yegor@tpc2.com)
* @version $Id$
* @since 0.2.6
*/
@ToString
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/com/jcabi/matchers/package-info.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* Copyright (c) 2011-2017, jcabi.com
* All rights reserved.
*
Expand Down Expand Up @@ -39,8 +39,6 @@
* &lt;artifactId&gt;jcabi-matchers&lt;/artifactId&gt;
* &lt;/dependency&gt;</pre>
*
* @author Yegor Bugayenko (yegor@tpc2.com)
* @version $Id$
* @since 1.0
* @see <a href="http://matchers.jcabi.com/">project website</a>
*/
Expand Down
16 changes: 12 additions & 4 deletions src/test/java/com/jcabi/matchers/JaxbConverterTest.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* Copyright (c) 2011-2017, jcabi.com
* All rights reserved.
*
Expand Down Expand Up @@ -36,12 +36,10 @@
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}.
* @author Yegor Bugayenko (yegor@tpc2.com)
* @version $Id$
* @since 0.1
*/
public final class JaxbConverterTest {
Expand Down Expand Up @@ -121,6 +119,8 @@ public void convertsNonRootObjectWithNamespace() throws Exception {

/**
* Dummy test object.
*
* @since 0.1
*/
@XmlRootElement(name = "employee")
@XmlAccessorType(XmlAccessType.NONE)
Expand All @@ -129,13 +129,15 @@ private static final class Employee {
* Injected object.
*/
private transient Object injected = "some text";

/**
* Inject an object.
* @param obj The object to inject
*/
public void inject(final Object obj) {
this.injected = obj;
}

/**
* Injected object. This method is not used directly, but is used
* during JAXB converting of this object into XML, at
Expand All @@ -146,6 +148,7 @@ public void inject(final Object obj) {
public Object getInjected() {
return this.injected;
}

/**
* Returns a simple string. This method is not called directly, but
* is used in {@code convertsJaxbObjectToXml()} for JAXB converting
Expand All @@ -160,6 +163,8 @@ public String getName() {

/**
* Dummy test object.
*
* @since 0.1
*/
@XmlType(name = "foo", namespace = JaxbConverterTest.Foo.NAMESPACE)
@XmlAccessorType(XmlAccessType.NONE)
Expand All @@ -168,6 +173,7 @@ public static final class Foo {
* XML namespace.
*/
public static final String NAMESPACE = "foo-namespace";

/**
* Simple name.
* @return The name
Expand All @@ -180,6 +186,8 @@ public String getName() {

/**
* Dummy test object.
*
* @since 0.1
*/
@XmlType(name = "bar")
@XmlAccessorType(XmlAccessType.NONE)
Expand Down
6 changes: 2 additions & 4 deletions src/test/java/com/jcabi/matchers/NoBrokenLinksITCase.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* Copyright (c) 2011-2017, jcabi.com
* All rights reserved.
*
Expand Down Expand Up @@ -34,12 +34,10 @@
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}.
* @author Yegor Bugayenko (yegor@tpc2.com)
* @version $Id$
* @since 0.1
*/
public final class NoBrokenLinksITCase {
Expand Down
21 changes: 12 additions & 9 deletions src/test/java/com/jcabi/matchers/NoBrokenLinksTest.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* Copyright (c) 2011-2017, jcabi.com
* All rights reserved.
*
Expand Down Expand Up @@ -34,12 +34,11 @@
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}.
* @author Yegor Bugayenko (yegor@tpc2.com)
* @version $Id$
* @since 0.1
*/
public final class NoBrokenLinksTest {
Expand Down Expand Up @@ -106,11 +105,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
6 changes: 2 additions & 4 deletions src/test/java/com/jcabi/matchers/RegexMatchersTest.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* Copyright (c) 2011-2017, jcabi.com
* All rights reserved.
*
Expand Down Expand Up @@ -31,12 +31,10 @@

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

/**
* Test case for {@link RegexMatchers}.
* @author Carlos Miranda (miranda.cma@gmail.com)
* @version $Id$
* @since 1.3
*/
public final class RegexMatchersTest {
Expand Down
Loading

0 comments on commit f370489

Please sign in to comment.