use of com.azure.cosmos.models.CosmosDatabaseResponse in project DataSpaceConnector by eclipse-dataspaceconnector.
the class CosmosContractDefinitionStoreIntegrationTest method prepareCosmosClient.
@BeforeAll
static void prepareCosmosClient() {
var client = CosmosTestClient.createClient();
typeManager = new TypeManager();
typeManager.registerTypes(ContractDefinition.class, ContractDefinitionDocument.class);
CosmosDatabaseResponse response = client.createDatabaseIfNotExists(DATABASE_NAME);
database = client.getDatabase(response.getProperties().getId());
}
use of com.azure.cosmos.models.CosmosDatabaseResponse in project DataSpaceConnector by eclipse-dataspaceconnector.
the class CosmosAssetIndexIntegrationTest method deleteDatabase.
@AfterAll
static void deleteDatabase() {
if (database != null) {
CosmosDatabaseResponse delete = database.delete();
assertThat(delete.getStatusCode()).isGreaterThanOrEqualTo(200).isLessThan(300);
}
}
use of com.azure.cosmos.models.CosmosDatabaseResponse in project DataSpaceConnector by eclipse-dataspaceconnector.
the class CosmosFederatedCacheNodeDirectoryIntegrationTest method deleteDatabase.
@AfterAll
static void deleteDatabase() {
if (database != null) {
CosmosDatabaseResponse delete = database.delete();
assertThat(delete.getStatusCode()).isGreaterThanOrEqualTo(200).isLessThan(300);
}
}
use of com.azure.cosmos.models.CosmosDatabaseResponse in project DataSpaceConnector by eclipse-dataspaceconnector.
the class CosmosPolicyStoreIntegrationTest method prepareCosmosClient.
@BeforeAll
static void prepareCosmosClient() {
var client = CosmosTestClient.createClient();
typeManager = new TypeManager();
CosmosDatabaseResponse response = client.createDatabaseIfNotExists(DATABASE_NAME);
database = client.getDatabase(response.getProperties().getId());
}
use of com.azure.cosmos.models.CosmosDatabaseResponse in project DataSpaceConnector by eclipse-dataspaceconnector.
the class CosmosAssetIndexIntegrationTest method prepareCosmosClient.
@BeforeAll
static void prepareCosmosClient() {
var client = CosmosTestClient.createClient();
CosmosDatabaseResponse response = client.createDatabaseIfNotExists(DATABASE_NAME);
database = client.getDatabase(response.getProperties().getId());
var containerIfNotExists = database.createContainerIfNotExists(CONTAINER_NAME, "/partitionKey");
container = database.getContainer(containerIfNotExists.getProperties().getId());
}
Aggregations