<commit_before><commit_msg>Test BasePersonId#isValid()<commit_after>package name.valery1707.kazPersonId;

import org.junit.Test;

import static com.google.common.truth.Truth.assertThat;

public class BasePersonIdTest {

	@Test
	public void testIsValid() throws Exception {
		BasePersonId id;

		id = new JuridicalPersonId(null);
		assertThat(id.isValidPattern()).isFalse();
		assertThat(id.isValidCRC()).isFalse();
		assertThat(id.isValid()).isFalse();

		id = new JuridicalPersonId("");
		assertThat(id.isValidPattern()).isFalse();
		assertThat(id.isValidCRC()).isFalse();
		assertThat(id.isValid()).isFalse();

		id = new JuridicalPersonId("0123456789AB");
		assertThat(id.isValidPattern()).isFalse();
		assertThat(id.isValidCRC()).isFalse();
		assertThat(id.isValid()).isFalse();

		id = new JuridicalPersonId("940140000380");
		assertThat(id.isValidPattern()).isTrue();
		assertThat(id.isValidCRC()).isFalse();
		assertThat(id.isValid()).isFalse();
	}
}
{'fraction_non_alphanumeric': 0.16614420062695925, 'fraction_numerical': 0.027168234064785787, 'mean_word_length': 6.426356589147287, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5831016', 'n_tokens_mistral': 350, 'n_tokens_neox': 319, 'n_words': 43}