Package ch.agent.t2.time

Examples of ch.agent.t2.time.Day


  }
 
  public void testGetMissingValue_1() {
    try {
      Series<Double> s = makeSeries(makeTimeSeries());
      TimeIndex t = s.getTimeDomain().time("2011-06-15");
      assertEquals(Double.NaN, s.getValue(t));
    } catch (Exception e) {
      fail(e.toString());
    }
  }
View Full Code Here


  }
 
  public void testGetMissingValue_2() {
    try {
      Series<Double> s = makeSeries(makeTimeSeries());
      TimeIndex t = s.getTimeDomain().time("2011-06-15");
      assertEquals(Double.NaN, s.getValue(t));
    } catch (Exception e) {
      fail(e.toString());
    }
  }
View Full Code Here

  }
 
  public void testGetValue() {
    try {
      Series<Double> s = makeSeries(makeTimeSeries());
      TimeIndex t = s.getTimeDomain().time("2011-07-01");
      assertEquals(201107.01, s.getValue(t));
    } catch (Exception e) {
      fail(e.toString());
    }
  }
View Full Code Here

  }
 
  public void testGetLastValue_2() {
    try {
      Series<Double> s = makeSeries(makeTimeSeries());
      TimeIndex t = s.getTimeDomain().time("2011-04-30");
      Observation<Double> obs = s.getLastObservation(t);
      assertNull(obs);
    } catch (Exception e) {
      fail(e.toString());
    }
View Full Code Here

  }
 
  public void testGetFirstValue_1() {
    try {
      Series<Double> s = makeSeries(makeTimeSeries());
      TimeIndex t = s.getTimeDomain().time("2011-06-01");
      assertEquals(201106.01, s.getFirstObservation(t).getValue());
    } catch (Exception e) {
      fail(e.toString());
    }
  }
View Full Code Here

  }
 
  public void testGetFirstValue_2() {
    try {
      Series<Double> s = makeSeries(makeTimeSeries());
      TimeIndex t = s.getTimeDomain().time("2011-05-31");
      assertEquals(201106.01, s.getFirstObservation(t).getValue());
    } catch (Exception e) {
      fail(e.toString());
    }
  }
View Full Code Here

  }
 
  public void testGetFirstValue_3() {
    try {
      Series<Double> s = makeSeries(makeTimeSeries());
      TimeIndex t = s.getTimeDomain().time("2011-07-31");
      assertNull(s.getFirstObservation(t));
    } catch (Exception e) {
      fail(e.toString());
    }
  }
View Full Code Here

  }
 
  public void testGetLastValue_4() {
    try {
      Series<Double> s = makeSeries(makeTimeSeries2());
      TimeIndex t = s.getTimeDomain().time("2011-06-04");
      assertEquals(201106.02,  s.getLastObservation(t).getValue());
    } catch (Exception e) {
      fail(e.toString());
    }
  }
View Full Code Here

  }
 
  public void testGetLastValue_5() {
    try {
      Series<Double> s = makeSeries(makeTimeSeries2());
      TimeIndex t = s.getTimeDomain().time("2011-05-31");
      assertEquals(201105.31,  s.getLastObservation(t).getValue());
    } catch (Exception e) {
      fail(e.toString());
    }
  }
View Full Code Here

  }
 
  public void testGetFirstValue_4() {
    try {
      Series<Double> s = makeSeries(makeTimeSeries2());
      TimeIndex t = s.getTimeDomain().time("2011-06-01");
      assertEquals(201106.01,  s.getFirstObservation(t).getValue());
    } catch (Exception e) {
      fail(e.toString());
    }
  }
View Full Code Here

TOP

Related Classes of ch.agent.t2.time.Day

Copyright © 2018 www.massapicom. 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.