use of bio.terra.janitor.model.AzurePublicIp in project terra-cloud-resource-lib by DataBiosphere.
the class ComputeRequestDataTest method serializeCreatePublicIp.
@Test
public void serializeCreatePublicIp() {
CreatePublicIpRequestData createPublicIp = CreatePublicIpRequestData.builder().setName("my-ip").setTenantId("my-tenant").setSubscriptionId("my-sub").setResourceGroupName("my-rg").setRegion(Region.US_EAST).setIpAllocationMethod(IpAllocationMethod.DYNAMIC).build();
assertEquals(ComputeManagerOperation.AZURE_CREATE_PUBLIC_IP, createPublicIp.cloudOperation());
assertEquals("{\"tenantId\":\"my-tenant\",\"subscriptionId\":\"my-sub\",\"resourceGroupName\":\"my-rg\"," + "\"name\":\"my-ip\",\"region\":\"eastus\"," + "\"ipAllocationMethod\":\"Dynamic\"}", createPublicIp.serialize().toString());
assertEquals(Optional.of(new CloudResourceUid().azurePublicIp(new AzurePublicIp().resourceGroup(azureResourceGroup(createPublicIp)).ipName("my-ip"))), createPublicIp.resourceUidCreation());
}
Aggregations