<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">import static org.junit.jupiter.api.Assertions.*;

import org.junit.jupiter.api.Test;
import java.util.Arrays;

/**
 * Point Test.
 *
 * @author Dee Weikle
 * @version 1/13/2019
 * I have abided by the JMU Honor Code.
 */
public class PointTest
{

  @Test
  public void testGetX()
  {
    Point testPoint;
    testPoint = new Point(5.0, 6.0);
    assertEquals(5.0, testPoint.getX(), .0001);
  }

  @Test
  public void testGetY()
  {
    Point testPoint;
    testPoint = new Point(5.0, 6.0);
    assertEquals(6.0, testPoint.getY(), .0001);
  }

  @Test
  public void testSetX()
  {
    Point testPoint;
    testPoint = new Point(5.0, 6.0);
    testPoint.setX(21.2);
    assertEquals(21.2, testPoint.getX(), .0001);
  }

  @Test
  public void testSetY()
  {
    Point testPoint;
    testPoint = new Point(5.0, 6.0);
    testPoint.setY(19.2);
    assertEquals(19.2, testPoint.getY(), .0001);
  }

  @Test
  public void testToString()
  {
    Point testPoint;
    testPoint = new Point(5.0, 6.0);
    assertEquals("(5.0, 6.0)", testPoint.toString());
  }

  @Test
  public void testEquals()
  {
    Point testPoint;
    testPoint = new Point(5.0, 6.0);
    Point otherPointEqual = new Point(5.0, 6.0);
    Point p2 = new Point(6.0, 6.0);
    Point p3 = new Point(5.0, 7.0);
    assertTrue(testPoint.equals(otherPointEqual));
    assertFalse(testPoint.equals(p2));
    assertFalse(testPoint.equals(p3));
  }

  @Test
  public void testEqualsNonPoint()
  {
    Point testPoint;
    testPoint = new Point(5.0, 6.0);
    assertFalse(testPoint.equals("hello"));
  }

}
</pre></body></html>