Java 类org.jfree.chart.renderer.GrayPaintScale 实例源码

项目:parabuild-ci    文件:PaintScaleLegendTests.java   
/**
 * Two objects that are equal are required to return the same hashCode. 
 */
public void testHashcode() {
    PaintScaleLegend l1 = new PaintScaleLegend(new GrayPaintScale(), 
            new NumberAxis("X"));
    PaintScaleLegend l2 = new PaintScaleLegend(new GrayPaintScale(), 
            new NumberAxis("X"));
    assertTrue(l1.equals(l2));
    int h1 = l1.hashCode();
    int h2 = l2.hashCode();
    assertEquals(h1, h2);
}
项目:parabuild-ci    文件:XYBlockRendererTests.java   
/**
 * Test that the equals() method distinguishes all fields.
 */
public void testEquals() {

    // default instances
    XYBlockRenderer r1 = new XYBlockRenderer();
    XYBlockRenderer r2 = new XYBlockRenderer();
    assertTrue(r1.equals(r2));
    assertTrue(r2.equals(r1));

    // blockHeight
    r1.setBlockHeight(2.0);
    assertFalse(r1.equals(r2));
    r2.setBlockHeight(2.0);
    assertTrue(r1.equals(r2));

    // blockWidth
    r1.setBlockWidth(2.0);
    assertFalse(r1.equals(r2));
    r2.setBlockWidth(2.0);
    assertTrue(r1.equals(r2));

    // paintScale
    r1.setPaintScale(new GrayPaintScale(0.0, 1.0));
    assertFalse(r1.equals(r2));
    r2.setPaintScale(new GrayPaintScale(0.0, 1.0));
    assertTrue(r1.equals(r2));

}
项目:ccu-historian    文件:PaintScaleLegendTest.java   
/**
 * Two objects that are equal are required to return the same hashCode.
 */
@Test
public void testHashcode() {
    PaintScaleLegend l1 = new PaintScaleLegend(new GrayPaintScale(),
            new NumberAxis("X"));
    PaintScaleLegend l2 = new PaintScaleLegend(new GrayPaintScale(),
            new NumberAxis("X"));
    assertTrue(l1.equals(l2));
    int h1 = l1.hashCode();
    int h2 = l2.hashCode();
    assertEquals(h1, h2);
}
项目:ccu-historian    文件:PaintScaleLegendTest.java   
/**
 * Confirm that cloning works.
 */
@Test
public void testCloning() throws CloneNotSupportedException {
    PaintScaleLegend l1 = new PaintScaleLegend(new GrayPaintScale(),
            new NumberAxis("X"));
    PaintScaleLegend l2 = (PaintScaleLegend) l1.clone();
    assertTrue(l1 != l2);
    assertTrue(l1.getClass() == l2.getClass());
    assertTrue(l1.equals(l2));
}
项目:ccu-historian    文件:PaintScaleLegendTest.java   
/**
 * Serialize an instance, restore it, and check for equality.
 */
@Test
public void testSerialization() {
    PaintScaleLegend l1 = new PaintScaleLegend(new GrayPaintScale(),
            new NumberAxis("X"));
    PaintScaleLegend l2 = (PaintScaleLegend) TestUtilities.serialised(l1);
    assertEquals(l1, l2);
}
项目:ccu-historian    文件:XYBlockRendererTest.java   
/**
 * Test that the equals() method distinguishes all fields.
 */
@Test
public void testEquals() {

    // default instances
    XYBlockRenderer r1 = new XYBlockRenderer();
    XYBlockRenderer r2 = new XYBlockRenderer();
    assertTrue(r1.equals(r2));
    assertTrue(r2.equals(r1));

    // blockHeight
    r1.setBlockHeight(2.0);
    assertFalse(r1.equals(r2));
    r2.setBlockHeight(2.0);
    assertTrue(r1.equals(r2));

    // blockWidth
    r1.setBlockWidth(2.0);
    assertFalse(r1.equals(r2));
    r2.setBlockWidth(2.0);
    assertTrue(r1.equals(r2));

    // paintScale
    r1.setPaintScale(new GrayPaintScale(0.0, 1.0));
    assertFalse(r1.equals(r2));
    r2.setPaintScale(new GrayPaintScale(0.0, 1.0));
    assertTrue(r1.equals(r2));

}
项目:jfreechart    文件:PaintScaleLegendTest.java   
/**
 * Two objects that are equal are required to return the same hashCode.
 */
@Test
public void testHashcode() {
    PaintScaleLegend l1 = new PaintScaleLegend(new GrayPaintScale(),
            new NumberAxis("X"));
    PaintScaleLegend l2 = new PaintScaleLegend(new GrayPaintScale(),
            new NumberAxis("X"));
    assertTrue(l1.equals(l2));
    int h1 = l1.hashCode();
    int h2 = l2.hashCode();
    assertEquals(h1, h2);
}
项目:jfreechart    文件:PaintScaleLegendTest.java   
/**
 * Confirm that cloning works.
 */
@Test
public void testCloning() throws CloneNotSupportedException {
    PaintScaleLegend l1 = new PaintScaleLegend(new GrayPaintScale(),
            new NumberAxis("X"));
    PaintScaleLegend l2 = (PaintScaleLegend) l1.clone();
    assertTrue(l1 != l2);
    assertTrue(l1.getClass() == l2.getClass());
    assertTrue(l1.equals(l2));
}
项目:jfreechart    文件:PaintScaleLegendTest.java   
/**
 * Serialize an instance, restore it, and check for equality.
 */
@Test
public void testSerialization() {
    PaintScaleLegend l1 = new PaintScaleLegend(new GrayPaintScale(),
            new NumberAxis("X"));
    PaintScaleLegend l2 = (PaintScaleLegend) TestUtils.serialised(l1);
    assertEquals(l1, l2);
}
项目:jfreechart    文件:XYBlockRendererTest.java   
/**
 * Test that the equals() method distinguishes all fields.
 */
@Test
public void testEquals() {

    // default instances
    XYBlockRenderer r1 = new XYBlockRenderer();
    XYBlockRenderer r2 = new XYBlockRenderer();
    assertTrue(r1.equals(r2));
    assertTrue(r2.equals(r1));

    // blockHeight
    r1.setBlockHeight(2.0);
    assertFalse(r1.equals(r2));
    r2.setBlockHeight(2.0);
    assertTrue(r1.equals(r2));

    // blockWidth
    r1.setBlockWidth(2.0);
    assertFalse(r1.equals(r2));
    r2.setBlockWidth(2.0);
    assertTrue(r1.equals(r2));

    // paintScale
    r1.setPaintScale(new GrayPaintScale(0.0, 1.0));
    assertFalse(r1.equals(r2));
    r2.setPaintScale(new GrayPaintScale(0.0, 1.0));
    assertTrue(r1.equals(r2));

}
项目:aya-lang    文件:PaintScaleLegendTest.java   
/**
 * Two objects that are equal are required to return the same hashCode.
 */
@Test
public void testHashcode() {
    PaintScaleLegend l1 = new PaintScaleLegend(new GrayPaintScale(),
            new NumberAxis("X"));
    PaintScaleLegend l2 = new PaintScaleLegend(new GrayPaintScale(),
            new NumberAxis("X"));
    assertTrue(l1.equals(l2));
    int h1 = l1.hashCode();
    int h2 = l2.hashCode();
    assertEquals(h1, h2);
}
项目:aya-lang    文件:PaintScaleLegendTest.java   
/**
 * Confirm that cloning works.
 */
@Test
public void testCloning() throws CloneNotSupportedException {
    PaintScaleLegend l1 = new PaintScaleLegend(new GrayPaintScale(),
            new NumberAxis("X"));
    PaintScaleLegend l2 = (PaintScaleLegend) l1.clone();
    assertTrue(l1 != l2);
    assertTrue(l1.getClass() == l2.getClass());
    assertTrue(l1.equals(l2));
}
项目:aya-lang    文件:PaintScaleLegendTest.java   
/**
 * Serialize an instance, restore it, and check for equality.
 */
@Test
public void testSerialization() {
    PaintScaleLegend l1 = new PaintScaleLegend(new GrayPaintScale(),
            new NumberAxis("X"));
    PaintScaleLegend l2 = (PaintScaleLegend) TestUtilities.serialised(l1);
    assertEquals(l1, l2);
}
项目:aya-lang    文件:XYBlockRendererTest.java   
/**
 * Test that the equals() method distinguishes all fields.
 */
@Test
public void testEquals() {

    // default instances
    XYBlockRenderer r1 = new XYBlockRenderer();
    XYBlockRenderer r2 = new XYBlockRenderer();
    assertTrue(r1.equals(r2));
    assertTrue(r2.equals(r1));

    // blockHeight
    r1.setBlockHeight(2.0);
    assertFalse(r1.equals(r2));
    r2.setBlockHeight(2.0);
    assertTrue(r1.equals(r2));

    // blockWidth
    r1.setBlockWidth(2.0);
    assertFalse(r1.equals(r2));
    r2.setBlockWidth(2.0);
    assertTrue(r1.equals(r2));

    // paintScale
    r1.setPaintScale(new GrayPaintScale(0.0, 1.0));
    assertFalse(r1.equals(r2));
    r2.setPaintScale(new GrayPaintScale(0.0, 1.0));
    assertTrue(r1.equals(r2));

}
项目:nabs    文件:PaintScaleLegendTests.java   
/**
 * Two objects that are equal are required to return the same hashCode. 
 */
public void testHashcode() {
    PaintScaleLegend l1 = new PaintScaleLegend(new GrayPaintScale(), 
            new NumberAxis("X"));
    PaintScaleLegend l2 = new PaintScaleLegend(new GrayPaintScale(), 
            new NumberAxis("X"));
    assertTrue(l1.equals(l2));
    int h1 = l1.hashCode();
    int h2 = l2.hashCode();
    assertEquals(h1, h2);
}
项目:nabs    文件:XYBlockRendererTests.java   
/**
 * Test that the equals() method distinguishes all fields.
 */
public void testEquals() {

    // default instances
    XYBlockRenderer r1 = new XYBlockRenderer();
    XYBlockRenderer r2 = new XYBlockRenderer();
    assertTrue(r1.equals(r2));
    assertTrue(r2.equals(r1));

    // blockHeight
    r1.setBlockHeight(2.0);
    assertFalse(r1.equals(r2));
    r2.setBlockHeight(2.0);
    assertTrue(r1.equals(r2));

    // blockWidth
    r1.setBlockWidth(2.0);
    assertFalse(r1.equals(r2));
    r2.setBlockWidth(2.0);
    assertTrue(r1.equals(r2));

    // paintScale
    r1.setPaintScale(new GrayPaintScale(0.0, 1.0));
    assertFalse(r1.equals(r2));
    r2.setPaintScale(new GrayPaintScale(0.0, 1.0));
    assertTrue(r1.equals(r2));

}
项目:ECG-Viewer    文件:PaintScaleLegendTest.java   
/**
 * Two objects that are equal are required to return the same hashCode.
 */
@Test
public void testHashcode() {
    PaintScaleLegend l1 = new PaintScaleLegend(new GrayPaintScale(),
            new NumberAxis("X"));
    PaintScaleLegend l2 = new PaintScaleLegend(new GrayPaintScale(),
            new NumberAxis("X"));
    assertTrue(l1.equals(l2));
    int h1 = l1.hashCode();
    int h2 = l2.hashCode();
    assertEquals(h1, h2);
}
项目:ECG-Viewer    文件:PaintScaleLegendTest.java   
/**
 * Confirm that cloning works.
 */
@Test
public void testCloning() throws CloneNotSupportedException {
    PaintScaleLegend l1 = new PaintScaleLegend(new GrayPaintScale(),
            new NumberAxis("X"));
    PaintScaleLegend l2 = (PaintScaleLegend) l1.clone();
    assertTrue(l1 != l2);
    assertTrue(l1.getClass() == l2.getClass());
    assertTrue(l1.equals(l2));
}
项目:ECG-Viewer    文件:PaintScaleLegendTest.java   
/**
 * Serialize an instance, restore it, and check for equality.
 */
@Test
public void testSerialization() {
    PaintScaleLegend l1 = new PaintScaleLegend(new GrayPaintScale(),
            new NumberAxis("X"));
    PaintScaleLegend l2 = (PaintScaleLegend) TestUtilities.serialised(l1);
    assertEquals(l1, l2);
}
项目:ECG-Viewer    文件:XYBlockRendererTest.java   
/**
 * Test that the equals() method distinguishes all fields.
 */
@Test
public void testEquals() {

    // default instances
    XYBlockRenderer r1 = new XYBlockRenderer();
    XYBlockRenderer r2 = new XYBlockRenderer();
    assertTrue(r1.equals(r2));
    assertTrue(r2.equals(r1));

    // blockHeight
    r1.setBlockHeight(2.0);
    assertFalse(r1.equals(r2));
    r2.setBlockHeight(2.0);
    assertTrue(r1.equals(r2));

    // blockWidth
    r1.setBlockWidth(2.0);
    assertFalse(r1.equals(r2));
    r2.setBlockWidth(2.0);
    assertTrue(r1.equals(r2));

    // paintScale
    r1.setPaintScale(new GrayPaintScale(0.0, 1.0));
    assertFalse(r1.equals(r2));
    r2.setPaintScale(new GrayPaintScale(0.0, 1.0));
    assertTrue(r1.equals(r2));

}
项目:astor    文件:PaintScaleLegendTests.java   
/**
 * Two objects that are equal are required to return the same hashCode.
 */
public void testHashcode() {
    PaintScaleLegend l1 = new PaintScaleLegend(new GrayPaintScale(),
            new NumberAxis("X"));
    PaintScaleLegend l2 = new PaintScaleLegend(new GrayPaintScale(),
            new NumberAxis("X"));
    assertTrue(l1.equals(l2));
    int h1 = l1.hashCode();
    int h2 = l2.hashCode();
    assertEquals(h1, h2);
}
项目:astor    文件:GrayPaintScaleTests.java   
/**
 * Simple check for the default constructor.
 */
public void testConstructor() {
    GrayPaintScale gps = new GrayPaintScale();
    assertEquals(0.0, gps.getLowerBound(), EPSILON);
    assertEquals(1.0, gps.getUpperBound(), EPSILON);
    assertEquals(255, gps.getAlpha());
}
项目:astor    文件:GrayPaintScaleTests.java   
/**
 * Some checks for the getPaint() method.
 */
public void testGetPaint() {
    GrayPaintScale gps = new GrayPaintScale();
    Color c = (Color) gps.getPaint(0.0);
    assertTrue(c.equals(Color.black));
    c = (Color) gps.getPaint(1.0);
    assertTrue(c.equals(Color.white));

    // check lookup values that are outside the bounds - see bug report
    // 1767315
    c = (Color) gps.getPaint(-0.5);
    assertTrue(c.equals(Color.black));
    c = (Color) gps.getPaint(1.5);
    assertTrue(c.equals(Color.white));
}
项目:astor    文件:XYBlockRendererTests.java   
/**
 * Test that the equals() method distinguishes all fields.
 */
public void testEquals() {

    // default instances
    XYBlockRenderer r1 = new XYBlockRenderer();
    XYBlockRenderer r2 = new XYBlockRenderer();
    assertTrue(r1.equals(r2));
    assertTrue(r2.equals(r1));

    // blockHeight
    r1.setBlockHeight(2.0);
    assertFalse(r1.equals(r2));
    r2.setBlockHeight(2.0);
    assertTrue(r1.equals(r2));

    // blockWidth
    r1.setBlockWidth(2.0);
    assertFalse(r1.equals(r2));
    r2.setBlockWidth(2.0);
    assertTrue(r1.equals(r2));

    // paintScale
    r1.setPaintScale(new GrayPaintScale(0.0, 1.0));
    assertFalse(r1.equals(r2));
    r2.setPaintScale(new GrayPaintScale(0.0, 1.0));
    assertTrue(r1.equals(r2));

}
项目:group-five    文件:PaintScaleLegendTest.java   
/**
 * Two objects that are equal are required to return the same hashCode.
 */
@Test
public void testHashcode() {
    PaintScaleLegend l1 = new PaintScaleLegend(new GrayPaintScale(),
            new NumberAxis("X"));
    PaintScaleLegend l2 = new PaintScaleLegend(new GrayPaintScale(),
            new NumberAxis("X"));
    assertTrue(l1.equals(l2));
    int h1 = l1.hashCode();
    int h2 = l2.hashCode();
    assertEquals(h1, h2);
}
项目:group-five    文件:PaintScaleLegendTest.java   
/**
 * Confirm that cloning works.
 */
@Test
public void testCloning() throws CloneNotSupportedException {
    PaintScaleLegend l1 = new PaintScaleLegend(new GrayPaintScale(),
            new NumberAxis("X"));
    PaintScaleLegend l2 = (PaintScaleLegend) l1.clone();
    assertTrue(l1 != l2);
    assertTrue(l1.getClass() == l2.getClass());
    assertTrue(l1.equals(l2));
}
项目:group-five    文件:PaintScaleLegendTest.java   
/**
 * Serialize an instance, restore it, and check for equality.
 */
@Test
public void testSerialization() {
    PaintScaleLegend l1 = new PaintScaleLegend(new GrayPaintScale(),
            new NumberAxis("X"));
    PaintScaleLegend l2 = (PaintScaleLegend) TestUtilities.serialised(l1);
    assertEquals(l1, l2);
}
项目:group-five    文件:XYBlockRendererTest.java   
/**
 * Test that the equals() method distinguishes all fields.
 */
@Test
public void testEquals() {

    // default instances
    XYBlockRenderer r1 = new XYBlockRenderer();
    XYBlockRenderer r2 = new XYBlockRenderer();
    assertTrue(r1.equals(r2));
    assertTrue(r2.equals(r1));

    // blockHeight
    r1.setBlockHeight(2.0);
    assertFalse(r1.equals(r2));
    r2.setBlockHeight(2.0);
    assertTrue(r1.equals(r2));

    // blockWidth
    r1.setBlockWidth(2.0);
    assertFalse(r1.equals(r2));
    r2.setBlockWidth(2.0);
    assertTrue(r1.equals(r2));

    // paintScale
    r1.setPaintScale(new GrayPaintScale(0.0, 1.0));
    assertFalse(r1.equals(r2));
    r2.setPaintScale(new GrayPaintScale(0.0, 1.0));
    assertTrue(r1.equals(r2));

}
项目:buffer_bci    文件:PaintScaleLegendTest.java   
/**
 * Two objects that are equal are required to return the same hashCode.
 */
@Test
public void testHashcode() {
    PaintScaleLegend l1 = new PaintScaleLegend(new GrayPaintScale(),
            new NumberAxis("X"));
    PaintScaleLegend l2 = new PaintScaleLegend(new GrayPaintScale(),
            new NumberAxis("X"));
    assertTrue(l1.equals(l2));
    int h1 = l1.hashCode();
    int h2 = l2.hashCode();
    assertEquals(h1, h2);
}
项目:buffer_bci    文件:PaintScaleLegendTest.java   
/**
 * Confirm that cloning works.
 */
@Test
public void testCloning() throws CloneNotSupportedException {
    PaintScaleLegend l1 = new PaintScaleLegend(new GrayPaintScale(),
            new NumberAxis("X"));
    PaintScaleLegend l2 = (PaintScaleLegend) l1.clone();
    assertTrue(l1 != l2);
    assertTrue(l1.getClass() == l2.getClass());
    assertTrue(l1.equals(l2));
}
项目:buffer_bci    文件:PaintScaleLegendTest.java   
/**
 * Serialize an instance, restore it, and check for equality.
 */
@Test
public void testSerialization() {
    PaintScaleLegend l1 = new PaintScaleLegend(new GrayPaintScale(),
            new NumberAxis("X"));
    PaintScaleLegend l2 = (PaintScaleLegend) TestUtilities.serialised(l1);
    assertEquals(l1, l2);
}
项目:buffer_bci    文件:XYBlockRendererTest.java   
/**
 * Test that the equals() method distinguishes all fields.
 */
@Test
public void testEquals() {

    // default instances
    XYBlockRenderer r1 = new XYBlockRenderer();
    XYBlockRenderer r2 = new XYBlockRenderer();
    assertTrue(r1.equals(r2));
    assertTrue(r2.equals(r1));

    // blockHeight
    r1.setBlockHeight(2.0);
    assertFalse(r1.equals(r2));
    r2.setBlockHeight(2.0);
    assertTrue(r1.equals(r2));

    // blockWidth
    r1.setBlockWidth(2.0);
    assertFalse(r1.equals(r2));
    r2.setBlockWidth(2.0);
    assertTrue(r1.equals(r2));

    // paintScale
    r1.setPaintScale(new GrayPaintScale(0.0, 1.0));
    assertFalse(r1.equals(r2));
    r2.setPaintScale(new GrayPaintScale(0.0, 1.0));
    assertTrue(r1.equals(r2));

}
项目:proyecto-teoria-control-utn-frro    文件:PaintScaleLegendTest.java   
/**
 * Two objects that are equal are required to return the same hashCode.
 */
@Test
public void testHashcode() {
    PaintScaleLegend l1 = new PaintScaleLegend(new GrayPaintScale(),
            new NumberAxis("X"));
    PaintScaleLegend l2 = new PaintScaleLegend(new GrayPaintScale(),
            new NumberAxis("X"));
    assertTrue(l1.equals(l2));
    int h1 = l1.hashCode();
    int h2 = l2.hashCode();
    assertEquals(h1, h2);
}
项目:proyecto-teoria-control-utn-frro    文件:PaintScaleLegendTest.java   
/**
 * Confirm that cloning works.
 */
@Test
public void testCloning() throws CloneNotSupportedException {
    PaintScaleLegend l1 = new PaintScaleLegend(new GrayPaintScale(),
            new NumberAxis("X"));
    PaintScaleLegend l2 = (PaintScaleLegend) l1.clone();
    assertTrue(l1 != l2);
    assertTrue(l1.getClass() == l2.getClass());
    assertTrue(l1.equals(l2));
}
项目:proyecto-teoria-control-utn-frro    文件:PaintScaleLegendTest.java   
/**
 * Serialize an instance, restore it, and check for equality.
 */
@Test
public void testSerialization() {
    PaintScaleLegend l1 = new PaintScaleLegend(new GrayPaintScale(),
            new NumberAxis("X"));
    PaintScaleLegend l2 = (PaintScaleLegend) TestUtilities.serialised(l1);
    assertEquals(l1, l2);
}
项目:proyecto-teoria-control-utn-frro    文件:XYBlockRendererTest.java   
/**
 * Test that the equals() method distinguishes all fields.
 */
@Test
public void testEquals() {

    // default instances
    XYBlockRenderer r1 = new XYBlockRenderer();
    XYBlockRenderer r2 = new XYBlockRenderer();
    assertTrue(r1.equals(r2));
    assertTrue(r2.equals(r1));

    // blockHeight
    r1.setBlockHeight(2.0);
    assertFalse(r1.equals(r2));
    r2.setBlockHeight(2.0);
    assertTrue(r1.equals(r2));

    // blockWidth
    r1.setBlockWidth(2.0);
    assertFalse(r1.equals(r2));
    r2.setBlockWidth(2.0);
    assertTrue(r1.equals(r2));

    // paintScale
    r1.setPaintScale(new GrayPaintScale(0.0, 1.0));
    assertFalse(r1.equals(r2));
    r2.setPaintScale(new GrayPaintScale(0.0, 1.0));
    assertTrue(r1.equals(r2));

}
项目:Memetic-Algorithm-for-TSP    文件:PaintScaleLegendTest.java   
/**
 * Two objects that are equal are required to return the same hashCode.
 */
@Test
public void testHashcode() {
    PaintScaleLegend l1 = new PaintScaleLegend(new GrayPaintScale(),
            new NumberAxis("X"));
    PaintScaleLegend l2 = new PaintScaleLegend(new GrayPaintScale(),
            new NumberAxis("X"));
    assertTrue(l1.equals(l2));
    int h1 = l1.hashCode();
    int h2 = l2.hashCode();
    assertEquals(h1, h2);
}
项目:Memetic-Algorithm-for-TSP    文件:PaintScaleLegendTest.java   
/**
 * Confirm that cloning works.
 */
@Test
public void testCloning() throws CloneNotSupportedException {
    PaintScaleLegend l1 = new PaintScaleLegend(new GrayPaintScale(),
            new NumberAxis("X"));
    PaintScaleLegend l2 = (PaintScaleLegend) l1.clone();
    assertTrue(l1 != l2);
    assertTrue(l1.getClass() == l2.getClass());
    assertTrue(l1.equals(l2));
}
项目:Memetic-Algorithm-for-TSP    文件:PaintScaleLegendTest.java   
/**
 * Serialize an instance, restore it, and check for equality.
 */
@Test
public void testSerialization() {
    PaintScaleLegend l1 = new PaintScaleLegend(new GrayPaintScale(),
            new NumberAxis("X"));
    PaintScaleLegend l2 = (PaintScaleLegend) TestUtilities.serialised(l1);
    assertEquals(l1, l2);
}
项目:Memetic-Algorithm-for-TSP    文件:XYBlockRendererTest.java   
/**
 * Test that the equals() method distinguishes all fields.
 */
@Test
public void testEquals() {

    // default instances
    XYBlockRenderer r1 = new XYBlockRenderer();
    XYBlockRenderer r2 = new XYBlockRenderer();
    assertTrue(r1.equals(r2));
    assertTrue(r2.equals(r1));

    // blockHeight
    r1.setBlockHeight(2.0);
    assertFalse(r1.equals(r2));
    r2.setBlockHeight(2.0);
    assertTrue(r1.equals(r2));

    // blockWidth
    r1.setBlockWidth(2.0);
    assertFalse(r1.equals(r2));
    r2.setBlockWidth(2.0);
    assertTrue(r1.equals(r2));

    // paintScale
    r1.setPaintScale(new GrayPaintScale(0.0, 1.0));
    assertFalse(r1.equals(r2));
    r2.setPaintScale(new GrayPaintScale(0.0, 1.0));
    assertTrue(r1.equals(r2));

}