Package purrpackagedemo.misctest

Source Code of purrpackagedemo.misctest.StrayEllipseTest

package purrpackagedemo.misctest;

import junit.framework.Assert;

import org.junit.Test;

import purrpackagedemo.Point;
import purrpackagedemo.Transformation.Rotation;
import purrpackagedemo.round.Ellipse;

/**
* To demonstrate what coverage policies can do, this is placed in a different
* package.
*/
public class StrayEllipseTest extends Assert {

  @Test
  public void testWhatever() {
   
    assertFalse( new Ellipse( Point.ORIGIN, new Point( 1, 1 ), 3 ).contains( new Point( 7, 7 )));
    try {
      Ellipse e = new Ellipse( Point.ORIGIN, null, 1 );
      fail(e.toString());
    } catch (IllegalArgumentException e) {
    }
  }
 
  @Test
  public void testAccidentally() {
    Point p = new Point( 0, -1 );
    Rotation r = new Rotation( Math.PI / 2);
    System.out.println( r.apply( p ));
   

  }

}
TOP

Related Classes of purrpackagedemo.misctest.StrayEllipseTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.