1 20 package org.apache.derbyTesting.junit; 21 22 import junit.extensions.TestSetup; 23 import junit.framework.Test; 24 25 31 final class ChangeUserSetup extends TestSetup { 32 33 private final String user; 34 private final String password; 35 private TestConfiguration old; 36 37 ChangeUserSetup(Test test, String user, String password) 38 { 39 super(test); 40 this.user = user; 41 this.password = password; 42 } 43 44 protected void setUp() 45 { 46 old = TestConfiguration.getCurrent(); 47 TestConfiguration config = new TestConfiguration(old, user, password); 48 TestConfiguration.setCurrent(config); 49 } 50 51 protected void tearDown() 52 { 53 TestConfiguration.setCurrent(old); 54 } 55 } 56 | Popular Tags |