Skip to content

Commit

Permalink
matchers and fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Jan 23, 2025
1 parent 080db1b commit 8a97f18
Show file tree
Hide file tree
Showing 15 changed files with 81 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package org.eolang.lints;
package fixtures;

import com.jcabi.xml.XML;
import java.io.File;
Expand Down
30 changes: 30 additions & 0 deletions src/test/java/fixtures/package-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2016-2025 Objectionary.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

/**
* Fixtures.
*
* @since 0.0.1
*/
package fixtures;
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package org.eolang.lints;
package matchers;

import java.util.ArrayList;
import java.util.List;
import org.eolang.lints.Defect;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
import org.hamcrest.Matcher;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package org.eolang.lints;
package matchers;

import com.jcabi.xml.XML;
import java.util.Collection;
import java.util.LinkedList;
import org.eolang.lints.Defect;
import org.eolang.lints.Severity;
import org.hamcrest.BaseMatcher;
import org.hamcrest.Description;
import org.hamcrest.Matcher;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package org.eolang.lints;
package matchers;

import java.io.IOException;
import java.util.Arrays;
Expand All @@ -44,7 +44,7 @@
*
* @since 0.0.34
*/
final class GrammarMatcher extends BaseMatcher<String> {
public final class GrammarMatcher extends BaseMatcher<String> {

/**
* The item to be matched.
Expand Down
30 changes: 30 additions & 0 deletions src/test/java/matchers/package-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2016-2025 Objectionary.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

/**
* Matchers.
*
* @since 0.0.1
*/
package matchers;
1 change: 1 addition & 0 deletions src/test/java/org/eolang/lints/LtByXslTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import java.nio.file.Paths;
import java.util.Set;
import java.util.stream.Collectors;
import matchers.DefectsMatcher;
import org.cactoos.bytes.BytesOf;
import org.cactoos.bytes.UncheckedBytes;
import org.cactoos.io.ResourceOf;
Expand Down
1 change: 1 addition & 0 deletions src/test/java/org/eolang/lints/ProgramsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import matchers.DefectMatcher;
import org.cactoos.list.ListOf;
import org.cactoos.set.SetOf;
import org.eolang.parser.EoSyntax;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
package org.eolang.lints.comments;

import java.io.IOException;
import matchers.DefectMatcher;
import org.cactoos.list.ListOf;
import org.eolang.lints.Defect;
import org.eolang.lints.DefectMatcher;
import org.eolang.parser.EoSyntax;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@
import com.jcabi.xml.XMLDocument;
import com.yegor256.Mktmp;
import com.yegor256.MktmpResolver;
import fixtures.ParsedEo;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import matchers.DefectMatcher;
import org.cactoos.map.MapEntry;
import org.cactoos.map.MapOf;
import org.eolang.lints.Defect;
import org.eolang.lints.DefectMatcher;
import org.eolang.lints.ParsedEo;
import org.eolang.lints.Programs;
import org.eolang.parser.EoSyntax;
import org.hamcrest.MatcherAssert;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
package org.eolang.lints.errors;

import com.jcabi.xml.XML;
import fixtures.ParsedEo;
import matchers.DefectMatcher;
import org.cactoos.map.MapEntry;
import org.cactoos.map.MapOf;
import org.eolang.lints.Defect;
import org.eolang.lints.DefectMatcher;
import org.eolang.lints.ParsedEo;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.jupiter.api.Test;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
package org.eolang.lints.errors;

import com.jcabi.xml.XML;
import fixtures.ParsedEo;
import matchers.DefectMatcher;
import org.cactoos.map.MapEntry;
import org.cactoos.map.MapOf;
import org.eolang.lints.Defect;
import org.eolang.lints.DefectMatcher;
import org.eolang.lints.ParsedEo;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.jupiter.api.Test;
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/eolang/lints/misc/LtTestIsNotVerbTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
package org.eolang.lints.misc;

import com.yegor256.MayBeSlow;
import fixtures.ParsedEo;
import matchers.DefectMatcher;
import org.eolang.lints.Defect;
import org.eolang.lints.DefectMatcher;
import org.eolang.lints.ParsedEo;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.jupiter.api.Test;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import matchers.DefectMatcher;
import org.cactoos.map.MapEntry;
import org.cactoos.map.MapOf;
import org.eolang.lints.Defect;
import org.eolang.lints.DefectMatcher;
import org.eolang.lints.Programs;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@

import com.jcabi.xml.XML;
import com.jcabi.xml.XMLDocument;
import matchers.DefectMatcher;
import org.cactoos.map.MapEntry;
import org.cactoos.map.MapOf;
import org.eolang.lints.DefectMatcher;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.jupiter.api.Test;
Expand Down

0 comments on commit 8a97f18

Please sign in to comment.