use of org.apache.geode.distributed.ServerLauncher.Builder in project geode by apache.
the class ServerLauncherIntegrationTest method testBuilderSetWorkingDirectoryToFile.
@Test
public void testBuilderSetWorkingDirectoryToFile() throws Exception {
// given: a file instead of a directory
File tmpFile = this.temporaryFolder.newFile();
// when: setting WorkingDirectory to that file
when(new Builder()).setWorkingDirectory(tmpFile.getAbsolutePath());
// then: throw IllegalArgumentException
then(caughtException()).hasMessage(LocalizedStrings.Launcher_Builder_WORKING_DIRECTORY_NOT_FOUND_ERROR_MESSAGE.toLocalizedString("Server")).hasCause(new FileNotFoundException(tmpFile.getAbsolutePath()));
}
Aggregations