// Path: library/src/test/java/com/comuto/validator/Utils.java
// public static void assertEmpty(String message, Iterable<?> iterable) {
//     if (iterable.iterator().hasNext()) {
//         failNotEmpty(message, iterable.toString());
//     }
// }
// 
// Path: library/src/test/java/com/comuto/validator/Utils.java
// public static void assertNotEmpty(String message, Iterable<?> iterable) {
//     if (!iterable.iterator().hasNext()) {
//         failEmpty(message);
//     }
// }


import java.util.regex.Pattern;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.annotation.Config;
import static com.comuto.validator.Utils.assertEmpty;
import static com.comuto.validator.Utils.assertNotEmpty;
package com.comuto.validator.constraint;



@RunWith(RobolectricTestRunner.class) @Config(manifest = Config.NONE) public class MatchConstraintTest
    extends BaseConstraintTest {
    private static final String PROPERTY_NAME = "property";
    private static final Pattern PATTERN = Pattern.compile("[a-z]+", Pattern.CASE_INSENSITIVE);
    private static final String VALID = "foo";
    private static final String INVALID = "-";

    @Test
    public void isValid() throws Exception {
// Path: library/src/test/java/com/comuto/validator/Utils.java
// public static void assertEmpty(String message, Iterable<?> iterable) {
//     if (iterable.iterator().hasNext()) {
//         failNotEmpty(message, iterable.toString());
//     }
// }
// 
// Path: library/src/test/java/com/comuto/validator/Utils.java
// public static void assertNotEmpty(String message, Iterable<?> iterable) {
//     if (!iterable.iterator().hasNext()) {
//         failEmpty(message);
//     }
// }


// Path: library/src/test/java/com/comuto/validator/constraint/MatchConstraintTest.java
import java.util.regex.Pattern;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.annotation.Config;
import static com.comuto.validator.Utils.assertEmpty;
import static com.comuto.validator.Utils.assertNotEmpty;

package com.comuto.validator.constraint;



@RunWith(RobolectricTestRunner.class) @Config(manifest = Config.NONE) public class MatchConstraintTest
    extends BaseConstraintTest {
    private static final String PROPERTY_NAME = "property";
    private static final Pattern PATTERN = Pattern.compile("[a-z]+", Pattern.CASE_INSENSITIVE);
    private static final String VALID = "foo";
    private static final String INVALID = "-";

    @Test
    public void isValid() throws Exception {
        assertEmpty("is valid with String", new MatchConstraint(VALID, PATTERN, PROPERTY_NAME).validate());