Package org.timepedia.chronoscope.client.data

Source Code of org.timepedia.chronoscope.client.data.XYDatasetTest

package org.timepedia.chronoscope.client.data;

import junit.framework.TestCase;

import org.timepedia.chronoscope.client.XYDataset;
import org.timepedia.chronoscope.client.Fixtures;

/**
*
*/
public class XYDatasetTest extends TestCase {

  public void testGetApproximateMinimumInterval() {
    MockXYDataset mxy = new MockXYDataset();
    assertTrue("Approximate minimum interval should be atleast less than twice as big as first two datapoints in Mock dataset",
        mxy.getApproximateMinimumInterval() <= 2 * (mxy.getX(1) - mxy.getX(0)));
   
    XYDataset xy = Fixtures.getPositiveDomainDescendingRange();
    assertTrue("Approximate minimum interval should be atleast less than twice as big as first two datapoints in Fixture dataset",
      xy.getApproximateMinimumInterval() <= 2 * (xy.getX(1) - mxy.getX(0)));
  }
}
TOP

Related Classes of org.timepedia.chronoscope.client.data.XYDatasetTest

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.