Package org.joda.time

Examples of org.joda.time.Interval


  }

  @Test(expected = NullPointerException.class)
  public void constructorShouldThrowAnExceptionIfLaunchConfigurationIsNull() {
    new LaunchEvent(
        new Interval(0, 1),
        mock(ILaunch.class),
        null,
        mock(ILaunchConfigurationType.class),
        Collections.<IPath> emptySet());
  }
View Full Code Here


  }

  @Test(expected = NullPointerException.class)
  public void constructorShouldThrowAnExceptionIfLaunchConfigurationTypeIsNull() {
    new LaunchEvent(
        new Interval(0, 1),
        mock(ILaunch.class),
        mock(ILaunchConfiguration.class),
        null,
        Collections.<IPath> emptySet());
  }
View Full Code Here

  }

  @Test(expected = NullPointerException.class)
  public void constructorShouldThrowAnExceptionIfLaunchIsNull() {
    new LaunchEvent(
        new Interval(0, 1),
        null,
        mock(ILaunchConfiguration.class),
        mock(ILaunchConfigurationType.class),
        Collections.<IPath> emptySet());
  }
View Full Code Here

  }

  @Test(expected = UnsupportedOperationException.class)
  public void getFilePathsShouldReturnAnUnmodifiableCollection() {
    LaunchEvent event = new LaunchEvent(
        new Interval(0, 1),
        mock(ILaunch.class),
        mock(ILaunchConfiguration.class),
        mock(ILaunchConfigurationType.class),
        new HashSet<IPath>());
    event.getFilePaths().add(new Path("/Should throw exception."));
View Full Code Here

  @Test
  public void getLaunchShouldReturnTheLaunch() {
    ILaunch launch = mock(ILaunch.class);
    LaunchEvent event = new LaunchEvent(
        new Interval(0, 1),
        launch,
        mock(ILaunchConfiguration.class),
        mock(ILaunchConfigurationType.class),
        Collections.<IPath> emptySet());
View Full Code Here

  @Test
  public void getLaunchConfigurationShouldReturnTheLaunchConfiguration() {
    ILaunchConfiguration config = mock(ILaunchConfiguration.class);
    LaunchEvent event = new LaunchEvent(
        new Interval(0, 1),
        mock(ILaunch.class),
        config,
        mock(ILaunchConfigurationType.class),
        Collections.<IPath> emptySet());
View Full Code Here

  @Test
  public void getLaunchConfigurationTypeShouldReturnTheLaunchConfigurationType() {
    ILaunchConfigurationType type = mock(ILaunchConfigurationType.class);
    LaunchEvent event = new LaunchEvent(
        new Interval(0, 1),
        mock(ILaunch.class),
        mock(ILaunchConfiguration.class),
        type,
        Collections.<IPath> emptySet());
View Full Code Here

    TasksUi.getTaskActivityManager().activateTask(task);
  }

  @Override
  protected TaskFileEvent createEvent() {
    return new TaskFileEvent(new Interval(0, 1), new Path("/a/b/c"), task);
  }
View Full Code Here

      String start = activity.withStatus().getStart();
      String end = activity.withStatus().getEnd();
      if (start != null && end != null) {
        DateTime startTime = new DateTime(start);
        DateTime endTime = new DateTime(end);
        Interval interval = new Interval(startTime, endTime);
        if (interval.toDurationMillis() != duration) {
          logger.info("status did not match constraints. "
              + "Changed end time to match the duration of "
              + duration + " ms");

          // duration does not match. adjust the end time
View Full Code Here

    }
    DateTime activityEnd = null;
    if (activity.withStatus().getEnd() != null) {
      activityEnd = new DateTime(activity.withStatus().getEnd());
    }
    Interval activityInterval = null;
    if (activityStart != null && activityEnd != null) {
      activityInterval = new Interval(activityStart, activityEnd);
    }

    // calculate solutions
    List<Weight> solutions = calculateSolutions();
    if (solutions.size() > 0) {
View Full Code Here

TOP

Related Classes of org.joda.time.Interval

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.