Package org.joda.time

Examples of org.joda.time.Interval


    createEvent(interval);
  }

  @Test
  public void testGetInterval() {
    Interval interval = new Interval(1, 2);
    assertEquals(interval, createEvent(interval).getInterval());
  }
View Full Code Here


*/
public class JavaEventTest extends ContinuousEventTest {
 
  @Test(expected = NullPointerException.class)
  public void testConstructor_javaElementNull() {
    createEvent(new Interval(0, 1), null);
  }
View Full Code Here

  }
 
  @Test
  public void testGetJavaElement() {
    IJavaElement element = JavaCore.create("=Enfo/src<enfo{EnfoPlugin.java");
    assertEquals(element, createEvent(new Interval(0, 1), element).getElement());
  }
View Full Code Here

       * "C:/a.txt". We want workspace paths wherever possible.
       */
      if (input instanceof IFileEditorInput) {
        // Contains a file in the workspace
        IFile file = ((IFileEditorInput) input).getFile();
        return new FileEvent(new Interval(start, end), file.getFullPath());

      } else if (input instanceof IURIEditorInput) {
        // A file outside of workspace
        URI uri = ((IURIEditorInput) input).getURI();
        IPath path = new Path(uri.getPath());
        return new FileEvent(new Interval(start, end), path);
      }
    }
    return null;
  }
View Full Code Here

    return DataHandler.getStorer(PartEvent.class);
  }

  @Override
  protected PartEvent tryCreateEvent(long start, long end, IWorkbenchPart part) {
    return new PartEvent(new Interval(start, end), part);
  }
View Full Code Here

    return (JavaEditor) page.openEditor(input, editor.getId());
  }

  @Override
  protected JavaEvent createEvent() {
    return new JavaEvent(new Interval(0, 1),
        JavaCore.create("=Enfo/src<enfo{EnfoPlugin.java"));
  }
View Full Code Here

@SuppressWarnings("restriction")
public class TaskFileEventTest extends FileEventTest {

  @Test(expected = NullPointerException.class)
  public void testConstructor_taskNull() {
    new TaskFileEvent(new Interval(0, 1), Path.fromPortableString("/p/a.txt"),
        null);
  }
View Full Code Here

  @Test
  public void testGetTask() {
    ITask task = new LocalTask("abc", "def");
    assertEquals(
        task,
        new TaskFileEvent(new Interval(0, 1), Path
            .fromPortableString("/p/a.txt"), task).getTask());
  }
View Full Code Here

    Set<IPath> filePaths = new HashSet<IPath>();
    filePaths.add(new Path("/a"));
    filePaths.add(new Path("/b"));
    filePaths.add(new Path("/c"));
    LaunchEvent event = new LaunchEvent(
        new Interval(0, 1),
        mock(ILaunch.class),
        mock(ILaunchConfiguration.class),
        mock(ILaunchConfigurationType.class),
        filePaths);
View Full Code Here

  }

  @Test(expected = NullPointerException.class)
  public void constructorShouldThrowAnExceptionIfFilePathsAreNull() {
    new LaunchEvent(
        new Interval(0, 1),
        mock(ILaunch.class),
        mock(ILaunchConfiguration.class),
        mock(ILaunchConfigurationType.class),
        null);
  }
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.