Package org.eclipse.core.resources

Examples of org.eclipse.core.resources.IResourceProxy


public class JavaPackageVisitorTest extends TestCase {

  public void testVisitSimple() throws Exception {
    JavaPackageVisitor visitor = new JavaPackageVisitor(null, null);

    IResourceProxy proxy = createMock(IResourceProxy.class);
    expect(proxy.getType()).andReturn(IResource.FILE);
    replay(proxy);
    assertFalse(visitor.visit(proxy));
    verify(proxy);
  }
View Full Code Here


  public void testVisitFolderParentFolderPathEqualsPath() throws Exception {
    List<String> javaPackages = null;
    String parentFolderPath = "Something";
    JavaPackageVisitor visitor = new JavaPackageVisitor(javaPackages, parentFolderPath);

    IResourceProxy proxy = createMock(IResourceProxy.class);
    expect(proxy.getType()).andReturn(IResource.FOLDER);
    expect(proxy.requestFullPath()).andReturn(new Path(parentFolderPath));
    replay(proxy);
    assertTrue(visitor.visit(proxy));
    verify(proxy);
  }
View Full Code Here

    List<String> javaPackages = new ArrayList<String>();
    String parentFolderPath = "Something";
    String additionalPath = "Else";
    JavaPackageVisitor visitor = new JavaPackageVisitor(javaPackages, parentFolderPath);

    IResourceProxy proxy = createMock(IResourceProxy.class);
    expect(proxy.getType()).andReturn(IResource.FOLDER);
    expect(proxy.requestFullPath()).andReturn(
        new Path(parentFolderPath + System.getProperty("file.separator") + additionalPath));
    replay(proxy);
    assertTrue(visitor.visit(proxy));
    assertEquals(1, javaPackages.size());
    assertEquals(additionalPath, javaPackages.get(0));
View Full Code Here

TOP

Related Classes of org.eclipse.core.resources.IResourceProxy

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.