Code example for SecurityPermission

Methods: getName

0
	/** 
	 * @tests java.security.Permission#getName() 
	 */ 
	public void test_getName() { 
		// test method java.security.permission.getName() 
		SecurityPermission permi = new SecurityPermission("testing getName()");
		String name = permi.getName();
		assertEquals("getName failed to obtain the correct name",
				"testing getName()", name);
 
		SecurityPermission permi2 = new SecurityPermission("93048Helloworld");
		assertEquals("getName failed to obtain correct name",
				"93048Helloworld", permi2.getName());
	} 
 
	/** 
	 * @tests java.security.Permission#newPermissionCollection() 
	 */ 
	public void test_newPermissionCollection() { 
		// test method java.security.permission.newPermissionCollection 
		Permission permi = new ConcretePermission();