diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2020-08-12 10:34:39 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2020-08-12 10:34:39 +0000 |
commit | 38285e0e1147042b519957958083e537e6d90fc9 (patch) | |
tree | 317bcc846acb2bc8365ca2aedb76d9066152de40 /testutil/src/test/java/com/yahoo/test/PatternMatchersTestCase.java | |
parent | 104f7547cb92ab39251308f15ddc45d515a48ae2 (diff) |
Minor unification of tests.
Diffstat (limited to 'testutil/src/test/java/com/yahoo/test/PatternMatchersTestCase.java')
-rw-r--r-- | testutil/src/test/java/com/yahoo/test/PatternMatchersTestCase.java | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/testutil/src/test/java/com/yahoo/test/PatternMatchersTestCase.java b/testutil/src/test/java/com/yahoo/test/PatternMatchersTestCase.java deleted file mode 100644 index b17d5b36252..00000000000 --- a/testutil/src/test/java/com/yahoo/test/PatternMatchersTestCase.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -package com.yahoo.test; - -import static org.junit.Assert.*; - -import java.util.Arrays; - -import org.junit.Test; - -/** - * Check CollectionPatternMatcher, LinePatternMatcher and PatternMatcher. - * - * @author <a href="mailto:steinar@yahoo-inc.com">Steinar Knutsen</a> - */ -public class PatternMatchersTestCase { - - @Test - public final void testCollections() { - CollectionPatternMatcher cm = new CollectionPatternMatcher("a.*"); - String[] coll = new String[] {}; - assertEquals(false, cm.matches(Arrays.asList(coll))); - coll = new String[] { "ba", "ab" }; - assertEquals(true, cm.matches(Arrays.asList(coll))); - } - - @Test - public final void testLines() { - LinePatternMatcher lp = new LinePatternMatcher("a"); - assertEquals(true, lp.matches("a\nab")); - assertEquals(false, lp.matches("ab\nb")); - } - - @Test - public final void testPatterns() { - PatternMatcher m = new PatternMatcher(".*a.*"); - assertEquals(true, m.matches("ab")); - assertEquals(false, m.matches("b")); - } - -} |