summaryrefslogtreecommitdiff
path: root/src/section-3/CartesianCoordinateSystemTest.java
blob: 6696ce1cd6fc357e17db12212ac24f050e82254c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package ca.mokhan.assignment1;

import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;

public class CartesianCoordinateSystemTest extends TestCase {
  private CartesianCoordinateSystem subject;

  public CartesianCoordinateSystemTest(String testName) {
    super(testName);
    this.subject = new CartesianCoordinateSystem();
  }

  public static Test suite() {
    return new TestSuite(CartesianCoordinateSystemTest.class);
  }

  public void testDistanceBetweenPoints() {
    assertEquals(7.28, subject.calculateDistance(-2, -3, -4, 4));
  }
}