mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-06-13 07:04:51 +02:00
25 lines
733 B
Java
25 lines
733 B
Java
// SPDX-FileCopyrightText: 2022 Paul Schaub <vanitasvitae@fsfe.org>
|
|
//
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package org.pgpainless.algorithm;
|
|
|
|
import org.junit.jupiter.api.Test;
|
|
|
|
import static org.junit.jupiter.api.Assertions.assertFalse;
|
|
import static org.junit.jupiter.api.Assertions.assertTrue;
|
|
|
|
public class HSRegexInterpreterFactoryTest {
|
|
|
|
@Test
|
|
public void dummyRegexTest() {
|
|
HSRegexInterpreterFactory factory = new HSRegexInterpreterFactory();
|
|
RegexInterpreterFactory.setInstance(factory);
|
|
Regex regex = RegexInterpreterFactory.create("Alice|Bob");
|
|
|
|
assertTrue(regex.matches("Alice"));
|
|
assertTrue(regex.matches("Bob"));
|
|
assertFalse(regex.matches("Charlie"));
|
|
}
|
|
}
|