package task1_0.test;

import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.JUnitCore;
import org.junit.runner.Result;
import org.junit.runner.notification.Failure;

import task1_0.People;
import task1_0.Person;

public class PeopleTester extends Assert {

	//       
	public static void main(String[] args) {
		Result result = JUnitCore.runClasses(PeopleTester.class);
	    for (Failure failure : result.getFailures()) {
	      System.out.println(failure.toString());
	    }
	}

	@Test
	public void generateWithoutArgsTest() {
		for (int i = 0; i < 100; i++) {
			Person person = personFabric.generate();
			assertNotNull("Person object has been generated incorrectly : person age is out of range", person);
			System.out.println(person);
		}
	}

	@Test
	public void generateWithArgsTest() {
		//            :
		Person person = personFabric.generate("Jack", "Johnson", Person.MIN_AGE - 1);
		assertNull("Age restriction durring creating the Person object doesn't work correctly : person age less than min", person);
		person = personFabric.generate("Alex", "Stewart", Person.MAX_AGE + 1);
		assertNull("Age restriction durring creating the Person object doesn't work correctly : person age more than max", person);

		//    :
		for (int i = Person.MIN_AGE; i <= Person.MAX_AGE; i++) {
			person = personFabric.generate("Jack", "Johnson", i);
			assertNotNull("Unable to create person object with the age of " + i, person);
		}
	}

	private static final People personFabric = new People();
}
@@ -273,22 +273,45 @@
  %7B%0A%0A%09// 
-      
+%D0%94%D0%BB%D1%8F %D0%B7%D0%B0%D0%BF%D1%83%D1%81%D0%BA%D0%B0 %D0%B2 %D0%BF%D0%B0%D0%BA%D0%B5%D1%82%D0%BD%D0%BE%D0%BC %D1%80%D0%B5%D0%B6%D0%B8%D0%BC%D0%B5
 %0A%09public
@@ -836,21 +836,38 @@
 %09%09//
-            :
+%D0%95%D1%81%D0%BB%D0%B8 %D0%B2%D1%8B%D1%88%D0%BB%D0%BE %D0%B7%D0%B0 %D0%B3%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D1%8B %D0%B2%D0%BE%D0%B7%D1%80%D0%B0%D1%81%D1%82%D0%B0
 %0A%09%09P
@@ -1273,18 +1273,8 @@
 );%0A%0A
-%09%09//    :%0A
 %09%09fo
@@ -1532,9 +1532,10 @@
 ople();%0A
-
 %7D
+%0A

Update PeopleTester.java