// Path: valifi/src/test/java/com/mlykotom/valifi/ValiFiTest.java
// public class ValiFiTest {
// 	public static final String FIELD_ERROR_MSG = "field is not valid";
// 	private ValiFieldBase<String> mField;
// 
// 	/**
// 	 * WARNING: installing without context will crash when getting string, only for tests!
// 	 */
// 	public static void installWithoutContext() {
// 		ValiFi.install();
// 	}
// 
// 	@Before
// 	public void prepareField() {
// 		installWithoutContext();
// 		mField = new ValiFieldText();
// 	}
// 
// 	@Test
// 	public void checkLibraryInstalled() {
// 		assertThat(ValiFi.getInstance(), notNullValue());
// 	}
// 
// 	@Test
// 	public void checkLibraryInstalledByAddingValidator() {
// 		mField.addCustomValidator(R.string.validation_error_email, new ValiFieldBase.PropertyValidator<String>() {
// 			@Override
// 			public boolean isValid(@Nullable String value) {
// 				// it doesn't matter if it's valid, checking installation
// 				return false;
// 			}
// 		});
// 	}
// 
// 	@Test
// 	public void checkErrorResourcesMatchLength() {
// 		int errorResArrCount = ValiFi.getInstance().mParameters.mErrorResources.length;
// 		assertThat(errorResArrCount, is(ValiFi.Builder.ERROR_RES_COUNT));
// 	}
// 
// 	@Test
// 	public void checkPatternsMatchLength() {
// 		int patternsArrCount = ValiFi.getInstance().mParameters.mValidators.length;
// 		assertThat(patternsArrCount, is(ValiFi.Builder.PATTERN_COUNT));
// 	}
// 
// 	@Test
// 	public void checkErrorResourcesMathStrings() {
// 		assertThat(mField.getErrorRes(ValiFi.Builder.ERROR_RES_NOT_EMPTY), is(R.string.validation_error_empty));
// 		assertThat(mField.getErrorRes(ValiFi.Builder.ERROR_RES_LENGTH_MIN), is(R.string.validation_error_min_length));
// 		assertThat(mField.getErrorRes(ValiFi.Builder.ERROR_RES_LENGTH_MAX), is(R.string.validation_error_max_length));
// 		assertThat(mField.getErrorRes(ValiFi.Builder.ERROR_RES_LENGTH_RANGE), is(R.string.validation_error_range_length));
// 		assertThat(mField.getErrorRes(ValiFi.Builder.ERROR_RES_LENGTH_EXACT), is(R.string.validation_error_exact_length));
// 		assertThat(mField.getErrorRes(ValiFi.Builder.ERROR_RES_EMAIL), is(R.string.validation_error_email));
// 		assertThat(mField.getErrorRes(ValiFi.Builder.ERROR_RES_PHONE), is(R.string.validation_error_phone));
// 		assertThat(mField.getErrorRes(ValiFi.Builder.ERROR_RES_USERNAME), is(R.string.validation_error_username));
// 		assertThat(mField.getErrorRes(ValiFi.Builder.ERROR_RES_PASSWORD), is(R.string.validation_error_password));
// 		assertThat(mField.getErrorRes(ValiFi.Builder.ERROR_RES_YEARS_OLDER_THAN), is(R.string.validation_error_older_than_years));
// 	}
// }


import com.mlykotom.valifi.ValiFiTest;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import java.util.Arrays;
import java.util.Collection;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
package com.mlykotom.valifi.fields;





@RunWith(Parameterized.class)
public class ValiFieldCardTest {
	public static final String VALIDATOR_EMPTY_MESSAGE = "Credit card is not valid";
	private final String inputCard;
	private ValiFieldCard mField;

	public ValiFieldCardTest(String input) {
		this.inputCard = input;
	}

	@Parameterized.Parameters
	public static Collection creditCards() {
		return Arrays.asList(
				"4242424242424242",
				"4012888888881881",
				"4000056655665556",
				"5555555555554444",
				"5200828282828210",
				"5105105105105100",
				"378282246310005",
				"371449635398431",
				"6011111111111117",
				"6011000990139424",
// Path: valifi/src/test/java/com/mlykotom/valifi/ValiFiTest.java
// public class ValiFiTest {
// 	public static final String FIELD_ERROR_MSG = "field is not valid";
// 	private ValiFieldBase<String> mField;
// 
// 	/**
// 	 * WARNING: installing without context will crash when getting string, only for tests!
// 	 */
// 	public static void installWithoutContext() {
// 		ValiFi.install();
// 	}
// 
// 	@Before
// 	public void prepareField() {
// 		installWithoutContext();
// 		mField = new ValiFieldText();
// 	}
// 
// 	@Test
// 	public void checkLibraryInstalled() {
// 		assertThat(ValiFi.getInstance(), notNullValue());
// 	}
// 
// 	@Test
// 	public void checkLibraryInstalledByAddingValidator() {
// 		mField.addCustomValidator(R.string.validation_error_email, new ValiFieldBase.PropertyValidator<String>() {
// 			@Override
// 			public boolean isValid(@Nullable String value) {
// 				// it doesn't matter if it's valid, checking installation
// 				return false;
// 			}
// 		});
// 	}
// 
// 	@Test
// 	public void checkErrorResourcesMatchLength() {
// 		int errorResArrCount = ValiFi.getInstance().mParameters.mErrorResources.length;
// 		assertThat(errorResArrCount, is(ValiFi.Builder.ERROR_RES_COUNT));
// 	}
// 
// 	@Test
// 	public void checkPatternsMatchLength() {
// 		int patternsArrCount = ValiFi.getInstance().mParameters.mValidators.length;
// 		assertThat(patternsArrCount, is(ValiFi.Builder.PATTERN_COUNT));
// 	}
// 
// 	@Test
// 	public void checkErrorResourcesMathStrings() {
// 		assertThat(mField.getErrorRes(ValiFi.Builder.ERROR_RES_NOT_EMPTY), is(R.string.validation_error_empty));
// 		assertThat(mField.getErrorRes(ValiFi.Builder.ERROR_RES_LENGTH_MIN), is(R.string.validation_error_min_length));
// 		assertThat(mField.getErrorRes(ValiFi.Builder.ERROR_RES_LENGTH_MAX), is(R.string.validation_error_max_length));
// 		assertThat(mField.getErrorRes(ValiFi.Builder.ERROR_RES_LENGTH_RANGE), is(R.string.validation_error_range_length));
// 		assertThat(mField.getErrorRes(ValiFi.Builder.ERROR_RES_LENGTH_EXACT), is(R.string.validation_error_exact_length));
// 		assertThat(mField.getErrorRes(ValiFi.Builder.ERROR_RES_EMAIL), is(R.string.validation_error_email));
// 		assertThat(mField.getErrorRes(ValiFi.Builder.ERROR_RES_PHONE), is(R.string.validation_error_phone));
// 		assertThat(mField.getErrorRes(ValiFi.Builder.ERROR_RES_USERNAME), is(R.string.validation_error_username));
// 		assertThat(mField.getErrorRes(ValiFi.Builder.ERROR_RES_PASSWORD), is(R.string.validation_error_password));
// 		assertThat(mField.getErrorRes(ValiFi.Builder.ERROR_RES_YEARS_OLDER_THAN), is(R.string.validation_error_older_than_years));
// 	}
// }


// Path: valifi/src/test/java/com/mlykotom/valifi/fields/ValiFieldCardTest.java
import com.mlykotom.valifi.ValiFiTest;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import java.util.Arrays;
import java.util.Collection;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;

package com.mlykotom.valifi.fields;





@RunWith(Parameterized.class)
public class ValiFieldCardTest {
	public static final String VALIDATOR_EMPTY_MESSAGE = "Credit card is not valid";
	private final String inputCard;
	private ValiFieldCard mField;

	public ValiFieldCardTest(String input) {
		this.inputCard = input;
	}

	@Parameterized.Parameters
	public static Collection creditCards() {
		return Arrays.asList(
				"4242424242424242",
				"4012888888881881",
				"4000056655665556",
				"5555555555554444",
				"5200828282828210",
				"5105105105105100",
				"378282246310005",
				"371449635398431",
				"6011111111111117",
				"6011000990139424",
				"30569309025904",