Search in sources :

Example 6 with TempFiles

use of com.thoughtworks.go.util.TempFiles in project gocd by gocd.

the class X509CertificateGeneratorTest method setup.

@Before
public void setup() {
    tempFiles = new TempFiles();
    keystore = new File(tempFiles.createUniqueFolder("X509CertificateGeneratorTest"), "keystore");
}
Also used : File(java.io.File) TempFiles(com.thoughtworks.go.util.TempFiles) Before(org.junit.Before)

Example 7 with TempFiles

use of com.thoughtworks.go.util.TempFiles in project gocd by gocd.

the class BackupServiceTest method setUp.

@Before
public void setUp() throws Exception {
    systemEnvironment = mock(SystemEnvironment.class);
    tempFiles = new TempFiles();
    when(systemEnvironment.getConfigDir()).thenReturn(tempFiles.createUniqueFile("config_dir").getAbsolutePath());
    serverVersion = mock(ServerVersion.class);
    configRepo = mock(ConfigRepository.class);
    databaseStrategy = mock(Database.class);
    when(configRepo.doLocked(Matchers.<ThrowingFn<Object, Exception>>any())).thenCallRealMethod();
}
Also used : SystemEnvironment(com.thoughtworks.go.util.SystemEnvironment) ServerVersion(com.thoughtworks.go.server.util.ServerVersion) ConfigRepository(com.thoughtworks.go.service.ConfigRepository) Database(com.thoughtworks.go.database.Database) TempFiles(com.thoughtworks.go.util.TempFiles) Before(org.junit.Before)

Aggregations

TempFiles (com.thoughtworks.go.util.TempFiles)7 Before (org.junit.Before)7 SystemEnvironment (com.thoughtworks.go.util.SystemEnvironment)3 ZipUtil (com.thoughtworks.go.util.ZipUtil)2 ScmMaterial (com.thoughtworks.go.config.materials.ScmMaterial)1 Database (com.thoughtworks.go.database.Database)1 MaterialRepository (com.thoughtworks.go.server.persistence.MaterialRepository)1 ServerVersion (com.thoughtworks.go.server.util.ServerVersion)1 ServerHealthService (com.thoughtworks.go.serverhealth.ServerHealthService)1 ConfigRepository (com.thoughtworks.go.service.ConfigRepository)1 File (java.io.File)1 ZipInputStream (java.util.zip.ZipInputStream)1