1 package org.netbeans.modules.classfile; 2 8 9 import junit.framework.TestCase; 10 11 15 public class AccessTest extends TestCase { 16 17 public AccessTest(String testName) { 18 super(testName); 19 } 20 21 24 public void testIsStatic() { 25 int access = Access.STATIC; 26 assertTrue(Access.isStatic(access)); 27 assertFalse(Access.isStatic(~access)); 28 } 29 30 33 public void testIsPublic() { 34 int access = Access.PUBLIC; 35 assertTrue(Access.isPublic(access)); 36 assertFalse(Access.isPublic(~access)); 37 } 38 39 42 public void testIsProtected() { 43 int access = Access.PROTECTED; 44 assertTrue(Access.isProtected(access)); 45 assertFalse(Access.isProtected(~access)); 46 } 47 48 51 public void testIsPackagePrivate() { 52 assertTrue(Access.isPackagePrivate(0)); 53 assertFalse(Access.isPackagePrivate(Access.PUBLIC)); 54 assertFalse(Access.isPackagePrivate(Access.PROTECTED)); 55 assertFalse(Access.isPackagePrivate(Access.PRIVATE)); 56 } 57 58 61 public void testIsPrivate() { 62 int access = Access.PRIVATE; 63 assertTrue(Access.isPrivate(access)); 64 assertFalse(Access.isPrivate(~access)); 65 } 66 } 67 | Popular Tags |