Code example for Subject

Methods: getPrincipals, getPrivateCredentials, getPublicCredentials

0
 
 
/** 
 * Tests for <code>Subject</code> class constructors and methods. 
 *  
 */ 
@TestTargetClass(Subject.class) 
public class SubjectTest extends TestCase {
     
    SecurityManager old;
 
    @Override 
    protected void setUp() throws Exception { 
        old = System.getSecurityManager();
        super.setUp(); 
    } 
 
    @Override 
    protected void tearDown() throws Exception { 
        System.setSecurityManager(old);
        super.tearDown();