package ru.ematveev.point;

import org.junit.Test;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.*;
import static org.hamcrest.number.IsCloseTo.closeTo;

public class PointTest{

	@Test
	public void distanceToTest(){

		Point a = new Point(5, 2);
		Point b = new Point(5, 8);
		double result = a.distanceTo(b);
		assertThat(result, closeTo(6d, 0.001));
	}

	@Test
	public void areaTest(){

			Point a = new Point(4, 2);
			Point b = new Point(5, 8);
			Point c = new Point(3, 6);
			double result = new Triangle(a, b, c).area();
			assertThat(result, closeTo(5d, 0.001));
	}
}


@@ -591,12 +591,149 @@
 01));%0A%09%7D
+%0A%0A%09@Test%0A%09public void maxTest()%7B%0A%0A%09%09double maxvalue = new MaxValue(3.0, 4.0, 5.0).max();%0A%0A%09%09assertThat(maxvalue, closeTo(5d, 0.001));%0A%0A%09%7D
 %0A%7D%0A%0A

add PointTest