1 19 20 package org.netbeans.modules.apisupport.project.queries; 21 22 import org.netbeans.api.java.queries.AccessibilityQuery; 23 import org.netbeans.modules.apisupport.project.TestBase; 24 25 29 public class AccessibilityQueryImplTest extends TestBase { 30 31 public AccessibilityQueryImplTest(String name) { 32 super(name); 33 } 34 35 public void testPublicPackages() throws Exception { 36 assertEquals(Boolean.TRUE, AccessibilityQuery.isPubliclyAccessible(nbCVSRoot().getFileObject("ant/project/src/org/netbeans/spi/project/support/ant"))); 37 assertEquals(Boolean.FALSE, AccessibilityQuery.isPubliclyAccessible(nbCVSRoot().getFileObject("ant/project/src/org/netbeans/modules/project/ant"))); 38 } 39 40 public void testFriendPackages() throws Exception { 41 assertEquals(Boolean.TRUE, AccessibilityQuery.isPubliclyAccessible(nbCVSRoot().getFileObject("ant/freeform/src/org/netbeans/modules/ant/freeform/spi"))); 42 assertEquals(Boolean.FALSE, AccessibilityQuery.isPubliclyAccessible(nbCVSRoot().getFileObject("ant/freeform/src/org/netbeans/modules/ant/freeform"))); 43 } 44 45 47 public void testOtherSourceRoots() throws Exception { 48 assertEquals(null, AccessibilityQuery.isPubliclyAccessible(nbCVSRoot().getFileObject("ant/src-bridge/org/apache/tools/ant/module/bridge/impl"))); 49 } 50 51 } 52 | Popular Tags |