This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.File; | |
import javax.security.auth.kerberos.KerberosPrincipal; | |
import javax.security.auth.login.LoginContext; | |
import javax.security.auth.login.LoginException; | |
import org.junit.BeforeClass; | |
import org.junit.ClassRule; | |
import org.junit.Test; | |
import org.junit.rules.TemporaryFolder; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.invariantproperties.sandbox.securityManager; | |
import java.net.InetSocketAddress; | |
import java.net.SocketPermission; | |
import java.security.Permission; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AdvancedTestCase extends TestCase { | |
public void run(TestResult result) { | |
AdvancedTestListener l = AdvancedTestListenerFactory.INSTANCE.newInstance(); | |
result.addListener(l); | |
l.setName(getName()); | |
// normally do this with reflection | |
MyTestedClass orig = ((MyAdvancedTest) this).obj; | |
MyFacadeClass facade = new MyFacadeClass(orig); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.IOException; | |
import java.io.InvalidObjectException; | |
import java.io.ObjectInputStream; | |
import java.io.ObjectOutputStream; | |
import java.io.Serializable; | |
import java.util.Arrays; | |
import javax.crypto.Cipher; | |
import javax.crypto.Mac; | |
import javax.crypto.spec.IvParameterSpec; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Simple code to create an embedded H2 server and launch associated web console. | |
*/ | |
import java.sql.*; | |
import org.h2.jdbcx.JdbcConnectionPool; | |
import org.h2.tools.Server; | |
private static final String URL = "jdbc:h2:~/test;AUTO_SERVER=TRUE"; | |
private static final String USERNAME = "sa"; | |
private static final String PASSWORD = ""; |
NewerOlder