package name.valery1707.kazPersonId;

import org.junit.Test;

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

public class PrivatePersonIdTest {

	/**
	 * <a href="https://serj.ws/salyk">Public source</a>
	 */
	@Test
	public void testPublicIds() throws Exception {
		PrivatePersonId id;

		id = new PrivatePersonId("871008401427");
		assertThat(id.isValid()).isTrue();
		assertThat(id.getBirthDate().toString()).isEqualTo("1987-10-08");
		assertThat(id.getSex()).isSameAs(Sex.FEMALE);

		id = new PrivatePersonId("760212350620");
		assertThat(id.isValid()).isTrue();
		assertThat(id.getBirthDate().toString()).isEqualTo("1976-02-12");
		assertThat(id.getSex()).isSameAs(Sex.MALE);

		id = new PrivatePersonId("800416300257");
		assertThat(id.isValid()).isTrue();
		assertThat(id.getBirthDate().toString()).isEqualTo("1980-04-16");
		assertThat(id.getSex()).isSameAs(Sex.MALE);

		id = new PrivatePersonId("680503450037");
		assertThat(id.isValid()).isTrue();
		assertThat(id.getBirthDate().toString()).isEqualTo("1968-05-03");
		assertThat(id.getSex()).isSameAs(Sex.FEMALE);
	}
}
@@ -1079,10 +1079,486 @@
 ALE);%0A%09%7D
+%0A%0A%09@Test%0A%09public void testCenturyBit() throws Exception %7B%0A%09%09PrivatePersonId id;%0A%0A%09%09id = new PrivatePersonId(%22800416100254%22);%0A%09%09assertThat(id.isValid()).isTrue();%0A%09%09assertThat(id.getBirthDate().toString()).isEqualTo(%221880-04-16%22);%0A%09%09assertThat(id.getSex()).isSameAs(Sex.MALE);%0A%0A%09%09id = new PrivatePersonId(%22680503250034%22);%0A%09%09assertThat(id.isValid()).isTrue();%0A%09%09assertThat(id.getBirthDate().toString()).isEqualTo(%221868-05-03%22);%0A%09%09assertThat(id.getSex()).isSameAs(Sex.FEMALE);%0A%09%7D
 %0A%7D

Test century bit significance