| 1 17 18 24 package javax.resource.spi.security; 25 26 import junit.framework.TestCase; 27 28 34 public class PasswordCredentialTest extends TestCase { 35 public void testConstructor() { 36 char[] secret = new char[] {'S','e','c','r','e','t'}; 37 PasswordCredential credential = new PasswordCredential("blah", secret); 38 assertNotSame("Password shoud be cloned.", 39 secret, credential.getPassword()); 40 } 41 42 public void testGetPassword() { 43 char[] secret = new char[] {'S','e','c','r','e','t'}; 44 PasswordCredential credential = new PasswordCredential("blah", secret); 45 assertNotSame("Password should be cloned.", 46 credential.getPassword(), credential.getPassword()); 47 } 48 } 49 | Popular Tags |