diff --git a/sdk/synapse/azure-resourcemanager-synapse/CHANGELOG.md b/sdk/synapse/azure-resourcemanager-synapse/CHANGELOG.md index 3ad29b29a18da..04814b8c2e66f 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/CHANGELOG.md +++ b/sdk/synapse/azure-resourcemanager-synapse/CHANGELOG.md @@ -1,6 +1,8 @@ # Release History -## 1.0.0-beta.8 (Unreleased) +## 1.0.0-beta.1 (2023-06-14) + +- Azure Resource Manager Synapse client library for Java. This package contains Microsoft Azure SDK for Synapse Management SDK. Azure Synapse Analytics Management Client. Package tag package-composite-v2. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/synapse/azure-resourcemanager-synapse/README.md b/sdk/synapse/azure-resourcemanager-synapse/README.md index bd08c7448d53b..ac8fbe27f95c9 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/README.md +++ b/sdk/synapse/azure-resourcemanager-synapse/README.md @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-synapse - 1.0.0-beta.7 + 1.0.0-beta.8 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/synapse/azure-resourcemanager-synapse/SAMPLE.md b/sdk/synapse/azure-resourcemanager-synapse/SAMPLE.md index 2a89c62b49efb..2291c63441720 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/SAMPLE.md +++ b/sdk/synapse/azure-resourcemanager-synapse/SAMPLE.md @@ -6557,7 +6557,7 @@ public final class WorkspaceManagedSqlServerUsagesListSamples { ```java import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated; +import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentRecurringScansProperties; import java.util.Arrays; /** Samples for WorkspaceManagedSqlServerVulnerabilityAssessments CreateOrUpdate. */ @@ -6622,7 +6622,7 @@ public final class WorkspaceManagedSqlServerVulnerabilityAssessmentsCreateOrUpda .withStorageContainerSasKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") .withStorageAccountAccessKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") .withRecurringScans( - new VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated() + new VulnerabilityAssessmentRecurringScansProperties() .withIsEnabled(true) .withEmailSubscriptionAdmins(true) .withEmails(Arrays.asList("email1@mail.com", "email2@mail.com"))) diff --git a/sdk/synapse/azure-resourcemanager-synapse/pom.xml b/sdk/synapse/azure-resourcemanager-synapse/pom.xml index b655c46ed728d..9454ad528ebc9 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/pom.xml +++ b/sdk/synapse/azure-resourcemanager-synapse/pom.xml @@ -1,3 +1,8 @@ + 4.0.0 @@ -38,7 +43,8 @@ UTF-8 - true + 0 + 0 diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/SynapseManager.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/SynapseManager.java index d53bda1519c43..d6c2c84bf1633 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/SynapseManager.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/SynapseManager.java @@ -500,7 +500,7 @@ public SynapseManager authenticate(TokenCredential credential, AzureProfile prof .append("-") .append("com.azure.resourcemanager.synapse") .append("/") - .append("1.0.0-beta.7"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/SqlPoolMetadataSyncConfigsClient.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/SqlPoolMetadataSyncConfigsClient.java index 47add27f717fc..e2878672e0e37 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/SqlPoolMetadataSyncConfigsClient.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/SqlPoolMetadataSyncConfigsClient.java @@ -23,6 +23,8 @@ public interface SqlPoolMetadataSyncConfigsClient { * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on + * status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the metadata sync configuration for a SQL pool along with {@link Response}. */ @@ -40,6 +42,8 @@ Response getWithResponse( * @param sqlPoolName SQL pool name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on + * status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the metadata sync configuration for a SQL pool. */ @@ -58,6 +62,8 @@ Response getWithResponse( * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on + * status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return metadata sync configuration along with {@link Response}. */ @@ -80,6 +86,8 @@ Response createWithResponse( * @param metadataSyncConfiguration Metadata sync configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on + * status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return metadata sync configuration. */ diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/SqlPoolsClient.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/SqlPoolsClient.java index b77ac83ebe621..b24cc6083a5e5 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/SqlPoolsClient.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/SqlPoolsClient.java @@ -144,6 +144,8 @@ SqlPoolInner update( * @param sqlPoolInfo The SQL pool to create. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on + * status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of sQL pool. */ @@ -163,6 +165,8 @@ SyncPoller, SqlPoolInner> beginCreate( * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on + * status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of sQL pool. */ @@ -181,6 +185,8 @@ SyncPoller, SqlPoolInner> beginCreate( * @param sqlPoolInfo The SQL pool to create. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on + * status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return sQL pool. */ @@ -199,6 +205,8 @@ SyncPoller, SqlPoolInner> beginCreate( * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on + * status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return sQL pool. */ diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerVulnerabilityAssessmentInner.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerVulnerabilityAssessmentInner.java index d4e453a869a76..49b94e4fc0a33 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerVulnerabilityAssessmentInner.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerVulnerabilityAssessmentInner.java @@ -6,7 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated; +import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentRecurringScansProperties; import com.fasterxml.jackson.annotation.JsonProperty; /** A server vulnerability assessment. */ @@ -113,7 +113,7 @@ public ServerVulnerabilityAssessmentInner withStorageAccountAccessKey(String sto * * @return the recurringScans value. */ - public VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated recurringScans() { + public VulnerabilityAssessmentRecurringScansProperties recurringScans() { return this.innerProperties() == null ? null : this.innerProperties().recurringScans(); } @@ -124,7 +124,7 @@ public VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated recurringSca * @return the ServerVulnerabilityAssessmentInner object itself. */ public ServerVulnerabilityAssessmentInner withRecurringScans( - VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated recurringScans) { + VulnerabilityAssessmentRecurringScansProperties recurringScans) { if (this.innerProperties() == null) { this.innerProperties = new ServerVulnerabilityAssessmentProperties(); } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerVulnerabilityAssessmentProperties.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerVulnerabilityAssessmentProperties.java index d7a1cd2699803..3bb31b992fbdd 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerVulnerabilityAssessmentProperties.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/fluent/models/ServerVulnerabilityAssessmentProperties.java @@ -6,7 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated; +import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentRecurringScansProperties; import com.fasterxml.jackson.annotation.JsonProperty; /** Properties of a server Vulnerability Assessment. */ @@ -37,7 +37,7 @@ public final class ServerVulnerabilityAssessmentProperties { * The recurring scans settings */ @JsonProperty(value = "recurringScans") - private VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated recurringScans; + private VulnerabilityAssessmentRecurringScansProperties recurringScans; /** Creates an instance of ServerVulnerabilityAssessmentProperties class. */ public ServerVulnerabilityAssessmentProperties() { @@ -116,7 +116,7 @@ public ServerVulnerabilityAssessmentProperties withStorageAccountAccessKey(Strin * * @return the recurringScans value. */ - public VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated recurringScans() { + public VulnerabilityAssessmentRecurringScansProperties recurringScans() { return this.recurringScans; } @@ -127,7 +127,7 @@ public VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated recurringSca * @return the ServerVulnerabilityAssessmentProperties object itself. */ public ServerVulnerabilityAssessmentProperties withRecurringScans( - VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated recurringScans) { + VulnerabilityAssessmentRecurringScansProperties recurringScans) { this.recurringScans = recurringScans; return this; } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/AzureADOnlyAuthenticationsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/AzureADOnlyAuthenticationsClientImpl.java index cdd74bb710248..9679bf712a9aa 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/AzureADOnlyAuthenticationsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/AzureADOnlyAuthenticationsClientImpl.java @@ -68,8 +68,7 @@ public final class AzureADOnlyAuthenticationsClientImpl implements AzureADOnlyAu public interface AzureADOnlyAuthenticationsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/azureADOnlyAuthentications/{azureADOnlyAuthenticationName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/azureADOnlyAuthentications/{azureADOnlyAuthenticationName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -84,8 +83,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/azureADOnlyAuthentications/{azureADOnlyAuthenticationName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/azureADOnlyAuthentications/{azureADOnlyAuthenticationName}") @ExpectedResponses({200, 201, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> create( @@ -101,8 +99,7 @@ Mono>> create( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/azureADOnlyAuthentications") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/azureADOnlyAuthentications") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/BigDataPoolsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/BigDataPoolsClientImpl.java index 77e7e0dbb8709..667655c942d5f 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/BigDataPoolsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/BigDataPoolsClientImpl.java @@ -68,8 +68,7 @@ public final class BigDataPoolsClientImpl implements BigDataPoolsClient { public interface BigDataPoolsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/bigDataPools/{bigDataPoolName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/bigDataPools/{bigDataPoolName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -84,8 +83,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/bigDataPools/{bigDataPoolName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/bigDataPools/{bigDataPoolName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> update( @@ -101,8 +99,7 @@ Mono> update( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/bigDataPools/{bigDataPoolName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/bigDataPools/{bigDataPoolName}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -119,8 +116,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/bigDataPools/{bigDataPoolName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/bigDataPools/{bigDataPoolName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -135,8 +131,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/bigDataPools") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/bigDataPools") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByWorkspace( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/DataMaskingPoliciesClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/DataMaskingPoliciesClientImpl.java index a0ed2ea6e7734..b9a31039770ed 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/DataMaskingPoliciesClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/DataMaskingPoliciesClientImpl.java @@ -55,8 +55,7 @@ public final class DataMaskingPoliciesClientImpl implements DataMaskingPoliciesC public interface DataMaskingPoliciesService { @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/dataMaskingPolicies/{dataMaskingPolicyName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/dataMaskingPolicies/{dataMaskingPolicyName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( @@ -73,8 +72,7 @@ Mono> createOrUpdate( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/dataMaskingPolicies/{dataMaskingPolicyName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/dataMaskingPolicies/{dataMaskingPolicyName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/DataMaskingRulesClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/DataMaskingRulesClientImpl.java index 5d32f6f6640ea..3ab135937cde2 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/DataMaskingRulesClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/DataMaskingRulesClientImpl.java @@ -60,9 +60,7 @@ public final class DataMaskingRulesClientImpl implements DataMaskingRulesClient public interface DataMaskingRulesService { @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules" - + "/{dataMaskingRuleName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules/{dataMaskingRuleName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( @@ -80,9 +78,7 @@ Mono> createOrUpdate( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules" - + "/{dataMaskingRuleName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules/{dataMaskingRuleName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -99,8 +95,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/dataMaskingPolicies/{dataMaskingPolicyName}/rules") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySqlPool( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/ExtendedSqlPoolBlobAuditingPoliciesClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/ExtendedSqlPoolBlobAuditingPoliciesClientImpl.java index ed877469f845c..28d195ceb351e 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/ExtendedSqlPoolBlobAuditingPoliciesClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/ExtendedSqlPoolBlobAuditingPoliciesClientImpl.java @@ -66,8 +66,7 @@ public final class ExtendedSqlPoolBlobAuditingPoliciesClientImpl implements Exte public interface ExtendedSqlPoolBlobAuditingPoliciesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/extendedAuditingSettings/{blobAuditingPolicyName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/extendedAuditingSettings/{blobAuditingPolicyName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -83,8 +82,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/extendedAuditingSettings/{blobAuditingPolicyName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/extendedAuditingSettings/{blobAuditingPolicyName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( @@ -101,8 +99,7 @@ Mono> createOrUpdate( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/extendedAuditingSettings") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/extendedAuditingSettings") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySqlPool( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/GetsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/GetsClientImpl.java index 01ea1828001a1..dcfc45d49f8a5 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/GetsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/GetsClientImpl.java @@ -54,9 +54,7 @@ public final class GetsClientImpl implements GetsClient { public interface GetsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/start/operationstatuses" - + "/{integrationRuntimeOperationId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/start/operationstatuses/{integrationRuntimeOperationId}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> integrationRuntimeStart( @@ -72,9 +70,7 @@ Mono> integrationRuntimeStart( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/stop/operationstatuses" - + "/{integrationRuntimeOperationId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/stop/operationstatuses/{integrationRuntimeOperationId}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> integrationRuntimeStop( @@ -90,9 +86,7 @@ Mono> integrationRuntimeSto @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/enableinteractivequery" - + "/operationstatuses/{integrationRuntimeOperationId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/enableinteractivequery/operationstatuses/{integrationRuntimeOperationId}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> integrationRuntimeEnableInteractivequery( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/IntegrationRuntimeAuthKeysOperationsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/IntegrationRuntimeAuthKeysOperationsClientImpl.java index 2f29c5cd969d0..3116f9aa73104 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/IntegrationRuntimeAuthKeysOperationsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/IntegrationRuntimeAuthKeysOperationsClientImpl.java @@ -63,8 +63,7 @@ public final class IntegrationRuntimeAuthKeysOperationsClientImpl public interface IntegrationRuntimeAuthKeysOperationsService { @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/regenerateAuthKey") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/regenerateAuthKey") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> regenerate( @@ -80,8 +79,7 @@ Mono> regenerate( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/listAuthKeys") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/listAuthKeys") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/IntegrationRuntimeConnectionInfosClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/IntegrationRuntimeConnectionInfosClientImpl.java index 999b405d251c4..73dd6247142fc 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/IntegrationRuntimeConnectionInfosClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/IntegrationRuntimeConnectionInfosClientImpl.java @@ -59,8 +59,7 @@ public final class IntegrationRuntimeConnectionInfosClientImpl implements Integr public interface IntegrationRuntimeConnectionInfosService { @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/getConnectionInfo") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/getConnectionInfo") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/IntegrationRuntimeCredentialsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/IntegrationRuntimeCredentialsClientImpl.java index f1be61d7b214f..81780b622779e 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/IntegrationRuntimeCredentialsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/IntegrationRuntimeCredentialsClientImpl.java @@ -56,8 +56,7 @@ public final class IntegrationRuntimeCredentialsClientImpl implements Integratio public interface IntegrationRuntimeCredentialsService { @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/syncCredentials") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/syncCredentials") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> sync( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/IntegrationRuntimeMonitoringDatasClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/IntegrationRuntimeMonitoringDatasClientImpl.java index 6533a3f6539cd..12a94b4390530 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/IntegrationRuntimeMonitoringDatasClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/IntegrationRuntimeMonitoringDatasClientImpl.java @@ -59,8 +59,7 @@ public final class IntegrationRuntimeMonitoringDatasClientImpl implements Integr public interface IntegrationRuntimeMonitoringDatasService { @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/monitoringData") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/monitoringData") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/IntegrationRuntimeNodeIpAddressOperationsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/IntegrationRuntimeNodeIpAddressOperationsClientImpl.java index 794e017b0821b..2ba355166ade2 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/IntegrationRuntimeNodeIpAddressOperationsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/IntegrationRuntimeNodeIpAddressOperationsClientImpl.java @@ -61,8 +61,7 @@ public final class IntegrationRuntimeNodeIpAddressOperationsClientImpl public interface IntegrationRuntimeNodeIpAddressOperationsService { @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/nodes/{nodeName}/ipAddress") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/nodes/{nodeName}/ipAddress") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/IntegrationRuntimeNodesClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/IntegrationRuntimeNodesClientImpl.java index 240c6720a63b2..7da98acdfcad8 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/IntegrationRuntimeNodesClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/IntegrationRuntimeNodesClientImpl.java @@ -58,8 +58,7 @@ public final class IntegrationRuntimeNodesClientImpl implements IntegrationRunti public interface IntegrationRuntimeNodesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/nodes/{nodeName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/nodes/{nodeName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -75,8 +74,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/nodes/{nodeName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/nodes/{nodeName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> update( @@ -93,8 +91,7 @@ Mono> update( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/nodes/{nodeName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/nodes/{nodeName}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/IntegrationRuntimeObjectMetadatasClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/IntegrationRuntimeObjectMetadatasClientImpl.java index 4b4c4e3fe58ed..92b6bc80515f1 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/IntegrationRuntimeObjectMetadatasClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/IntegrationRuntimeObjectMetadatasClientImpl.java @@ -67,8 +67,7 @@ public final class IntegrationRuntimeObjectMetadatasClientImpl implements Integr public interface IntegrationRuntimeObjectMetadatasService { @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/getObjectMetadata") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/getObjectMetadata") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -84,8 +83,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/refreshObjectMetadata") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/refreshObjectMetadata") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> refresh( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/IntegrationRuntimeStatusOperationsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/IntegrationRuntimeStatusOperationsClientImpl.java index 3cb1cf57e7b7f..af69ce2188b3e 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/IntegrationRuntimeStatusOperationsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/IntegrationRuntimeStatusOperationsClientImpl.java @@ -59,8 +59,7 @@ public final class IntegrationRuntimeStatusOperationsClientImpl implements Integ public interface IntegrationRuntimeStatusOperationsService { @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/getStatus") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/getStatus") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/IntegrationRuntimesClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/IntegrationRuntimesClientImpl.java index 81957835d4c93..3ebff019fb57c 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/IntegrationRuntimesClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/IntegrationRuntimesClientImpl.java @@ -71,8 +71,7 @@ public final class IntegrationRuntimesClientImpl implements IntegrationRuntimesC public interface IntegrationRuntimesService { @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/integrationRuntimes/{integrationRuntimeName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> update( @@ -88,8 +87,7 @@ Mono> update( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/integrationRuntimes/{integrationRuntimeName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}") @ExpectedResponses({200, 304}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -105,8 +103,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/integrationRuntimes/{integrationRuntimeName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> create( @@ -123,8 +120,7 @@ Mono>> create( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/integrationRuntimes/{integrationRuntimeName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -139,8 +135,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/upgrade") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/upgrade") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> upgrade( @@ -155,8 +150,7 @@ Mono> upgrade( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/integrationRuntimes") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByWorkspace( @@ -170,8 +164,7 @@ Mono> listByWorkspace( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/start") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/start") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> start( @@ -186,8 +179,7 @@ Mono>> start( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/stop") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/stop") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> stop( @@ -202,8 +194,7 @@ Mono>> stop( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/outboundNetworkDependenciesEndpoints") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/outboundNetworkDependenciesEndpoints") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> @@ -219,8 +210,7 @@ Mono>> stop( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/enableInteractiveQuery") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/enableInteractiveQuery") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> enableInteractiveQuery( @@ -235,8 +225,7 @@ Mono>> enableInteractiveQuery( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/disableInteractiveQuery") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/integrationRuntimes/{integrationRuntimeName}/disableInteractiveQuery") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> disableInteractiveQuery( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/IpFirewallRulesClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/IpFirewallRulesClientImpl.java index f21439421c70b..fb7addc349509 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/IpFirewallRulesClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/IpFirewallRulesClientImpl.java @@ -69,8 +69,7 @@ public final class IpFirewallRulesClientImpl implements IpFirewallRulesClient { public interface IpFirewallRulesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/firewallRules") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/firewallRules") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByWorkspace( @@ -84,8 +83,7 @@ Mono> listByWorkspace( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/firewallRules/{ruleName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/firewallRules/{ruleName}") @ExpectedResponses({200, 201, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -101,8 +99,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/firewallRules/{ruleName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/firewallRules/{ruleName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -117,8 +114,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/firewallRules/{ruleName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/firewallRules/{ruleName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -133,8 +129,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/replaceAllIpFirewallRules") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/replaceAllIpFirewallRules") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> replaceAll( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KeysClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KeysClientImpl.java index ca6d31f2e2f3f..28ffadbfafa8e 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KeysClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KeysClientImpl.java @@ -60,8 +60,7 @@ public final class KeysClientImpl implements KeysClient { public interface KeysService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/keys") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/keys") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByWorkspace( @@ -75,8 +74,7 @@ Mono> listByWorkspace( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/keys/{keyName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/keys/{keyName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -91,8 +89,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/keys/{keyName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/keys/{keyName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( @@ -108,8 +105,7 @@ Mono> createOrUpdate( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/keys/{keyName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/keys/{keyName}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolAttachedDatabaseConfigurationsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolAttachedDatabaseConfigurationsClientImpl.java index d6e749ce554e6..3a19a3a4ffd71 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolAttachedDatabaseConfigurationsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolAttachedDatabaseConfigurationsClientImpl.java @@ -74,8 +74,7 @@ public final class KustoPoolAttachedDatabaseConfigurationsClientImpl public interface KustoPoolAttachedDatabaseConfigurationsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/kustoPools/{kustoPoolName}/attachedDatabaseConfigurations") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/attachedDatabaseConfigurations") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByKustoPool( @@ -90,9 +89,7 @@ Mono> listByKustoPool( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/kustoPools/{kustoPoolName}/attachedDatabaseConfigurations" - + "/{attachedDatabaseConfigurationName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/attachedDatabaseConfigurations/{attachedDatabaseConfigurationName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -108,9 +105,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/kustoPools/{kustoPoolName}/attachedDatabaseConfigurations" - + "/{attachedDatabaseConfigurationName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/attachedDatabaseConfigurations/{attachedDatabaseConfigurationName}") @ExpectedResponses({200, 201, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -127,9 +122,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/kustoPools/{kustoPoolName}/attachedDatabaseConfigurations" - + "/{attachedDatabaseConfigurationName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/attachedDatabaseConfigurations/{attachedDatabaseConfigurationName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolChildResourcesClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolChildResourcesClientImpl.java index 9c19bf9c3a4d0..d1cf992099729 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolChildResourcesClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolChildResourcesClientImpl.java @@ -56,8 +56,7 @@ public final class KustoPoolChildResourcesClientImpl implements KustoPoolChildRe public interface KustoPoolChildResourcesService { @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/kustoPools/{kustoPoolName}/checkNameAvailability") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/checkNameAvailability") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> checkNameAvailability( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolDataConnectionsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolDataConnectionsClientImpl.java index b748cebd6d6e0..0e38dfa1d7776 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolDataConnectionsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolDataConnectionsClientImpl.java @@ -73,8 +73,7 @@ public final class KustoPoolDataConnectionsClientImpl implements KustoPoolDataCo public interface KustoPoolDataConnectionsService { @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/checkNameAvailability") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/checkNameAvailability") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> checkNameAvailability( @@ -91,8 +90,7 @@ Mono> checkNameAvailability( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/dataConnectionValidation") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/dataConnectionValidation") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> dataConnectionValidation( @@ -109,8 +107,7 @@ Mono>> dataConnectionValidation( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/dataConnections") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/dataConnections") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByDatabase( @@ -126,9 +123,7 @@ Mono> listByDatabase( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/dataConnections" - + "/{dataConnectionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/dataConnections/{dataConnectionName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -145,9 +140,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/dataConnections" - + "/{dataConnectionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/dataConnections/{dataConnectionName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -165,9 +158,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/dataConnections" - + "/{dataConnectionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/dataConnections/{dataConnectionName}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> update( @@ -185,9 +176,7 @@ Mono>> update( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/dataConnections" - + "/{dataConnectionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/dataConnections/{dataConnectionName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolDatabasePrincipalAssignmentsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolDatabasePrincipalAssignmentsClientImpl.java index 914d26e7f3405..a5891e7873a1f 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolDatabasePrincipalAssignmentsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolDatabasePrincipalAssignmentsClientImpl.java @@ -77,9 +77,7 @@ public final class KustoPoolDatabasePrincipalAssignmentsClientImpl public interface KustoPoolDatabasePrincipalAssignmentsService { @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}" - + "/checkPrincipalAssignmentNameAvailability") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/checkPrincipalAssignmentNameAvailability") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> checkNameAvailability( @@ -96,8 +94,7 @@ Mono> checkNameAvailability( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/principalAssignments") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/principalAssignments") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -113,9 +110,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/principalAssignments" - + "/{principalAssignmentName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/principalAssignments/{principalAssignmentName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -132,9 +127,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/principalAssignments" - + "/{principalAssignmentName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/principalAssignments/{principalAssignmentName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -152,9 +145,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/principalAssignments" - + "/{principalAssignmentName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}/principalAssignments/{principalAssignmentName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolDatabasesClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolDatabasesClientImpl.java index 11c4d2d72f351..45c692a45c2b6 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolDatabasesClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolDatabasesClientImpl.java @@ -67,8 +67,7 @@ public final class KustoPoolDatabasesClientImpl implements KustoPoolDatabasesCli public interface KustoPoolDatabasesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/kustoPools/{kustoPoolName}/databases") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByKustoPool( @@ -83,8 +82,7 @@ Mono> listByKustoPool( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -100,8 +98,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -118,8 +115,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> update( @@ -136,8 +132,7 @@ Mono>> update( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/databases/{databaseName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolPrincipalAssignmentsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolPrincipalAssignmentsClientImpl.java index d0152595f161e..a8e402b4c1c66 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolPrincipalAssignmentsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolPrincipalAssignmentsClientImpl.java @@ -73,8 +73,7 @@ public final class KustoPoolPrincipalAssignmentsClientImpl implements KustoPoolP public interface KustoPoolPrincipalAssignmentsService { @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/kustoPools/{kustoPoolName}/checkPrincipalAssignmentNameAvailability") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/checkPrincipalAssignmentNameAvailability") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> checkNameAvailability( @@ -90,8 +89,7 @@ Mono> checkNameAvailability( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/kustoPools/{kustoPoolName}/principalAssignments") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/principalAssignments") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -106,8 +104,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/kustoPools/{kustoPoolName}/principalAssignments/{principalAssignmentName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/principalAssignments/{principalAssignmentName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -123,8 +120,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/kustoPools/{kustoPoolName}/principalAssignments/{principalAssignmentName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/principalAssignments/{principalAssignmentName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -141,8 +137,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/kustoPools/{kustoPoolName}/principalAssignments/{principalAssignmentName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/principalAssignments/{principalAssignmentName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolPrivateLinkResourcesOperationsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolPrivateLinkResourcesOperationsClientImpl.java index 3e35d70bae86f..d5f7434cc0cd0 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolPrivateLinkResourcesOperationsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolPrivateLinkResourcesOperationsClientImpl.java @@ -66,8 +66,7 @@ public final class KustoPoolPrivateLinkResourcesOperationsClientImpl public interface KustoPoolPrivateLinkResourcesOperationsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/kustoPools/{kustoPoolName}/privateLinkResources") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/privateLinkResources") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolsClientImpl.java index 9b69e3e9d0ae1..cba10a849e2e7 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/KustoPoolsClientImpl.java @@ -90,8 +90,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/providers/Microsoft.Synapse/locations/{location}" - + "/kustoPoolCheckNameAvailability") + "/subscriptions/{subscriptionId}/providers/Microsoft.Synapse/locations/{location}/kustoPoolCheckNameAvailability") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> checkNameAvailability( @@ -105,8 +104,7 @@ Mono> checkNameAvailability( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/kustoPools") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByWorkspace( @@ -120,8 +118,7 @@ Mono> listByWorkspace( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/kustoPools/{kustoPoolName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -136,8 +133,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/kustoPools/{kustoPoolName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -155,8 +151,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/kustoPools/{kustoPoolName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> update( @@ -173,8 +168,7 @@ Mono>> update( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/kustoPools/{kustoPoolName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -189,8 +183,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/kustoPools/{kustoPoolName}/stop") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/stop") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> stop( @@ -205,8 +198,7 @@ Mono>> stop( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/kustoPools/{kustoPoolName}/start") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/start") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> start( @@ -221,8 +213,7 @@ Mono>> start( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/kustoPools/{kustoPoolName}/skus") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/skus") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listSkusByResource( @@ -237,8 +228,7 @@ Mono> listSkusByResource( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/kustoPools/{kustoPoolName}/listLanguageExtensions") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/listLanguageExtensions") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listLanguageExtensions( @@ -253,8 +243,7 @@ Mono> listLanguageExtensions( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/kustoPools/{kustoPoolName}/addLanguageExtensions") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/addLanguageExtensions") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> addLanguageExtensions( @@ -270,8 +259,7 @@ Mono>> addLanguageExtensions( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/kustoPools/{kustoPoolName}/removeLanguageExtensions") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/removeLanguageExtensions") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> removeLanguageExtensions( @@ -287,8 +275,7 @@ Mono>> removeLanguageExtensions( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/kustoPools/{kustoPoolName}/listFollowerDatabases") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/listFollowerDatabases") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listFollowerDatabases( @@ -303,8 +290,7 @@ Mono> listFollowerDatabases( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/kustoPools/{kustoPoolName}/detachFollowerDatabases") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/kustoPools/{kustoPoolName}/detachFollowerDatabases") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> detachFollowerDatabases( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/LibrariesClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/LibrariesClientImpl.java index 7f200f5652fb3..e15949bd4e8be 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/LibrariesClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/LibrariesClientImpl.java @@ -53,8 +53,7 @@ public final class LibrariesClientImpl implements LibrariesClient { public interface LibrariesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/libraries/{libraryName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/libraries/{libraryName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/LibrariesOperationsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/LibrariesOperationsClientImpl.java index 329aa1f7294b7..dc3143db06d7f 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/LibrariesOperationsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/LibrariesOperationsClientImpl.java @@ -58,8 +58,7 @@ public final class LibrariesOperationsClientImpl implements LibrariesOperationsC public interface LibrariesOperationsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/libraries") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/libraries") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByWorkspace( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/OperationsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/OperationsClientImpl.java index ea93f920cfbe6..1bd77dc3cbd89 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/OperationsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/OperationsClientImpl.java @@ -78,8 +78,7 @@ Mono>> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/operationResults/{operationId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/operationResults/{operationId}") @ExpectedResponses({200, 201, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getLocationHeaderResult( @@ -94,8 +93,7 @@ Mono> getLocationHeaderResult( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/operationStatuses/{operationId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/operationStatuses/{operationId}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getAzureAsyncHeaderResult( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/PrivateEndpointConnectionsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/PrivateEndpointConnectionsClientImpl.java index 4946d5f6df237..a73a4584bf772 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/PrivateEndpointConnectionsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/PrivateEndpointConnectionsClientImpl.java @@ -69,8 +69,7 @@ public final class PrivateEndpointConnectionsClientImpl implements PrivateEndpoi public interface PrivateEndpointConnectionsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -85,8 +84,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> create( @@ -102,8 +100,7 @@ Mono>> create( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -118,8 +115,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/privateEndpointConnections") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/privateEndpointConnections") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/PrivateEndpointConnectionsPrivateLinkHubsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/PrivateEndpointConnectionsPrivateLinkHubsClientImpl.java index e0442aff011b3..85760747f37da 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/PrivateEndpointConnectionsPrivateLinkHubsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/PrivateEndpointConnectionsPrivateLinkHubsClientImpl.java @@ -66,8 +66,7 @@ public final class PrivateEndpointConnectionsPrivateLinkHubsClientImpl public interface PrivateEndpointConnectionsPrivateLinkHubsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse" - + "/privateLinkHubs/{privateLinkHubName}/privateEndpointConnections") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/privateLinkHubs/{privateLinkHubName}/privateEndpointConnections") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -81,8 +80,7 @@ Mono> get( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/PrivateLinkHubPrivateLinkResourcesClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/PrivateLinkHubPrivateLinkResourcesClientImpl.java index 4788e8fbb06b7..b22918adf527c 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/PrivateLinkHubPrivateLinkResourcesClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/PrivateLinkHubPrivateLinkResourcesClientImpl.java @@ -64,8 +64,7 @@ public final class PrivateLinkHubPrivateLinkResourcesClientImpl implements Priva public interface PrivateLinkHubPrivateLinkResourcesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse" - + "/privateLinkHubs/{privateLinkHubName}/privateLinkResources") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/privateLinkHubs/{privateLinkHubName}/privateLinkResources") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -79,8 +78,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse" - + "/privateLinkHubs/{privateLinkHubName}/privateLinkResources/{privateLinkResourceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/privateLinkHubs/{privateLinkHubName}/privateLinkResources/{privateLinkResourceName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/PrivateLinkHubsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/PrivateLinkHubsClientImpl.java index 26e1d0daea43e..edde20c5786a2 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/PrivateLinkHubsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/PrivateLinkHubsClientImpl.java @@ -68,8 +68,7 @@ public final class PrivateLinkHubsClientImpl implements PrivateLinkHubsClient { public interface PrivateLinkHubsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse" - + "/privateLinkHubs") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/privateLinkHubs") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByResourceGroup( @@ -82,8 +81,7 @@ Mono> listByResourceGroup( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse" - + "/privateLinkHubs/{privateLinkHubName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/privateLinkHubs/{privateLinkHubName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getByResourceGroup( @@ -97,8 +95,7 @@ Mono> getByResourceGroup( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse" - + "/privateLinkHubs/{privateLinkHubName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/privateLinkHubs/{privateLinkHubName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> update( @@ -113,8 +110,7 @@ Mono> update( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse" - + "/privateLinkHubs/{privateLinkHubName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/privateLinkHubs/{privateLinkHubName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( @@ -129,8 +125,7 @@ Mono> createOrUpdate( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse" - + "/privateLinkHubs/{privateLinkHubName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/privateLinkHubs/{privateLinkHubName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/PrivateLinkResourcesOperationsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/PrivateLinkResourcesOperationsClientImpl.java index 644b0cb983a04..44ab84594bba4 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/PrivateLinkResourcesOperationsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/PrivateLinkResourcesOperationsClientImpl.java @@ -62,8 +62,7 @@ public final class PrivateLinkResourcesOperationsClientImpl implements PrivateLi public interface PrivateLinkResourcesOperationsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/privateLinkResources") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/privateLinkResources") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -77,8 +76,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/privateLinkResources/{privateLinkResourceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/privateLinkResources/{privateLinkResourceName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/RestorableDroppedSqlPoolsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/RestorableDroppedSqlPoolsClientImpl.java index ab002d34b5fa1..9425d31f578eb 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/RestorableDroppedSqlPoolsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/RestorableDroppedSqlPoolsClientImpl.java @@ -60,8 +60,7 @@ public final class RestorableDroppedSqlPoolsClientImpl implements RestorableDrop public interface RestorableDroppedSqlPoolsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/restorableDroppedSqlPools/{restorableDroppedSqlPoolId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/restorableDroppedSqlPools/{restorableDroppedSqlPoolId}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -76,8 +75,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/restorableDroppedSqlPools") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/restorableDroppedSqlPools") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByWorkspace( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/ServerVulnerabilityAssessmentImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/ServerVulnerabilityAssessmentImpl.java index 9ee3023a10caa..4e16a4504bb14 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/ServerVulnerabilityAssessmentImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/ServerVulnerabilityAssessmentImpl.java @@ -8,7 +8,7 @@ import com.azure.resourcemanager.synapse.fluent.models.ServerVulnerabilityAssessmentInner; import com.azure.resourcemanager.synapse.models.ServerVulnerabilityAssessment; import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated; +import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentRecurringScansProperties; public final class ServerVulnerabilityAssessmentImpl implements ServerVulnerabilityAssessment, @@ -42,7 +42,7 @@ public String storageAccountAccessKey() { return this.innerModel().storageAccountAccessKey(); } - public VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated recurringScans() { + public VulnerabilityAssessmentRecurringScansProperties recurringScans() { return this.innerModel().recurringScans(); } @@ -173,7 +173,7 @@ public ServerVulnerabilityAssessmentImpl withStorageAccountAccessKey(String stor } public ServerVulnerabilityAssessmentImpl withRecurringScans( - VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated recurringScans) { + VulnerabilityAssessmentRecurringScansProperties recurringScans) { this.innerModel().withRecurringScans(recurringScans); return this; } diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SparkConfigurationsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SparkConfigurationsClientImpl.java index f7c1c84094c1c..952cd896d80e4 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SparkConfigurationsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SparkConfigurationsClientImpl.java @@ -53,8 +53,7 @@ public final class SparkConfigurationsClientImpl implements SparkConfigurationsC public interface SparkConfigurationsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sparkconfigurations/{sparkConfigurationName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sparkconfigurations/{sparkConfigurationName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SparkConfigurationsOperationsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SparkConfigurationsOperationsClientImpl.java index fbc19bb8564d4..9e21d2888dc70 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SparkConfigurationsOperationsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SparkConfigurationsOperationsClientImpl.java @@ -62,8 +62,7 @@ public final class SparkConfigurationsOperationsClientImpl implements SparkConfi public interface SparkConfigurationsOperationsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sparkconfigurations") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sparkconfigurations") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByWorkspace( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolBlobAuditingPoliciesClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolBlobAuditingPoliciesClientImpl.java index eb9ae7d56f7e0..eb44c8dbcc112 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolBlobAuditingPoliciesClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolBlobAuditingPoliciesClientImpl.java @@ -62,8 +62,7 @@ public final class SqlPoolBlobAuditingPoliciesClientImpl implements SqlPoolBlobA public interface SqlPoolBlobAuditingPoliciesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/auditingSettings/{blobAuditingPolicyName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/auditingSettings/{blobAuditingPolicyName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -79,8 +78,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/auditingSettings/{blobAuditingPolicyName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/auditingSettings/{blobAuditingPolicyName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( @@ -97,8 +95,7 @@ Mono> createOrUpdate( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/auditingSettings") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/auditingSettings") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySqlPool( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolColumnsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolColumnsClientImpl.java index 0e0a0d4a98004..93b558c81a690 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolColumnsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolColumnsClientImpl.java @@ -53,9 +53,7 @@ public final class SqlPoolColumnsClientImpl implements SqlPoolColumnsClient { public interface SqlPoolColumnsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}/tables/{tableName}/columns" - + "/{columnName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolConnectionPoliciesClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolConnectionPoliciesClientImpl.java index 69aa70072c473..9c4877e08f3a9 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolConnectionPoliciesClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolConnectionPoliciesClientImpl.java @@ -56,8 +56,7 @@ public final class SqlPoolConnectionPoliciesClientImpl implements SqlPoolConnect public interface SqlPoolConnectionPoliciesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/connectionPolicies/{connectionPolicyName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/connectionPolicies/{connectionPolicyName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolDataWarehouseUserActivitiesClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolDataWarehouseUserActivitiesClientImpl.java index f66cd8b79cfe1..b6257d74dbc5b 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolDataWarehouseUserActivitiesClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolDataWarehouseUserActivitiesClientImpl.java @@ -60,8 +60,7 @@ public final class SqlPoolDataWarehouseUserActivitiesClientImpl implements SqlPo public interface SqlPoolDataWarehouseUserActivitiesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/dataWarehouseUserActivities/{dataWarehouseUserActivityName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/dataWarehouseUserActivities/{dataWarehouseUserActivityName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolGeoBackupPoliciesClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolGeoBackupPoliciesClientImpl.java index 7ad403fce6816..93e2570161784 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolGeoBackupPoliciesClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolGeoBackupPoliciesClientImpl.java @@ -62,8 +62,7 @@ public final class SqlPoolGeoBackupPoliciesClientImpl implements SqlPoolGeoBacku public interface SqlPoolGeoBackupPoliciesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/geoBackupPolicies") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/geoBackupPolicies") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -78,8 +77,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/geoBackupPolicies/{geoBackupPolicyName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/geoBackupPolicies/{geoBackupPolicyName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( @@ -96,8 +94,7 @@ Mono> createOrUpdate( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/geoBackupPolicies/{geoBackupPolicyName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/geoBackupPolicies/{geoBackupPolicyName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolMaintenanceWindowOptionsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolMaintenanceWindowOptionsClientImpl.java index 47679b32fc2c3..4287e1b51eaf7 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolMaintenanceWindowOptionsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolMaintenanceWindowOptionsClientImpl.java @@ -57,8 +57,7 @@ public final class SqlPoolMaintenanceWindowOptionsClientImpl implements SqlPoolM public interface SqlPoolMaintenanceWindowOptionsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/maintenanceWindowOptions/current") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/maintenanceWindowOptions/current") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolMaintenanceWindowsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolMaintenanceWindowsClientImpl.java index 7772a1ee3680f..121072774eece 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolMaintenanceWindowsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolMaintenanceWindowsClientImpl.java @@ -57,8 +57,7 @@ public final class SqlPoolMaintenanceWindowsClientImpl implements SqlPoolMainten public interface SqlPoolMaintenanceWindowsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/maintenancewindows/current") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/maintenancewindows/current") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -74,8 +73,7 @@ Mono> get( @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/maintenancewindows/current") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/maintenancewindows/current") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolMetadataSyncConfigsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolMetadataSyncConfigsClientImpl.java index a05a778f061ea..a1bc92c8973c8 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolMetadataSyncConfigsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolMetadataSyncConfigsClientImpl.java @@ -57,9 +57,11 @@ public final class SqlPoolMetadataSyncConfigsClientImpl implements SqlPoolMetada public interface SqlPoolMetadataSyncConfigsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/metadataSync/config") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/metadataSync/config") @ExpectedResponses({200}) + @UnexpectedResponseExceptionType( + value = ManagementException.class, + code = {404}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @HostParam("$host") String endpoint, @@ -73,9 +75,11 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/metadataSync/config") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/metadataSync/config") @ExpectedResponses({200}) + @UnexpectedResponseExceptionType( + value = ManagementException.class, + code = {404}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> create( @HostParam("$host") String endpoint, @@ -99,6 +103,7 @@ Mono> create( * @param sqlPoolName SQL pool name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server on status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the metadata sync configuration for a SQL pool along with {@link Response} on successful completion of * {@link Mono}. @@ -157,6 +162,7 @@ private Mono> getWithResponseAsync( * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server on status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the metadata sync configuration for a SQL pool along with {@link Response} on successful completion of * {@link Mono}. @@ -211,6 +217,7 @@ private Mono> getWithResponseAsync( * @param sqlPoolName SQL pool name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server on status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the metadata sync configuration for a SQL pool on successful completion of {@link Mono}. */ @@ -231,6 +238,7 @@ private Mono getAsync(String resourceGroupName, String * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server on status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the metadata sync configuration for a SQL pool along with {@link Response}. */ @@ -250,6 +258,7 @@ public Response getWithResponse( * @param sqlPoolName SQL pool name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server on status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the metadata sync configuration for a SQL pool. */ @@ -269,6 +278,7 @@ public MetadataSyncConfigInner get(String resourceGroupName, String workspaceNam * @param metadataSyncConfiguration Metadata sync configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server on status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return metadata sync configuration along with {@link Response} on successful completion of {@link Mono}. */ @@ -339,6 +349,7 @@ private Mono> createWithResponseAsync( * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server on status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return metadata sync configuration along with {@link Response} on successful completion of {@link Mono}. */ @@ -406,6 +417,7 @@ private Mono> createWithResponseAsync( * @param metadataSyncConfiguration Metadata sync configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server on status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return metadata sync configuration on successful completion of {@link Mono}. */ @@ -431,6 +443,7 @@ private Mono createAsync( * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server on status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return metadata sync configuration along with {@link Response}. */ @@ -457,6 +470,7 @@ public Response createWithResponse( * @param metadataSyncConfiguration Metadata sync configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server on status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return metadata sync configuration. */ diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolOperationResultsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolOperationResultsClientImpl.java index 26e44646ad3a0..5de1b7218bc5c 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolOperationResultsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolOperationResultsClientImpl.java @@ -59,8 +59,7 @@ public final class SqlPoolOperationResultsClientImpl implements SqlPoolOperation public interface SqlPoolOperationResultsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/operationResults/{operationId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/operationResults/{operationId}") @ExpectedResponses({200, 201, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> getLocationHeaderResult( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolOperationsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolOperationsClientImpl.java index 4a35853cd115b..051b829639244 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolOperationsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolOperationsClientImpl.java @@ -58,8 +58,7 @@ public final class SqlPoolOperationsClientImpl implements SqlPoolOperationsClien public interface SqlPoolOperationsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/operations") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/operations") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolRecommendedSensitivityLabelsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolRecommendedSensitivityLabelsClientImpl.java index a348aa4d7cf93..e34533304d039 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolRecommendedSensitivityLabelsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolRecommendedSensitivityLabelsClientImpl.java @@ -59,8 +59,7 @@ public final class SqlPoolRecommendedSensitivityLabelsClientImpl implements SqlP public interface SqlPoolRecommendedSensitivityLabelsService { @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/recommendedSensitivityLabels") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/recommendedSensitivityLabels") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> update( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolReplicationLinksClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolReplicationLinksClientImpl.java index 29bd82cb19a66..a0fd1d2b0011d 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolReplicationLinksClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolReplicationLinksClientImpl.java @@ -59,8 +59,7 @@ public final class SqlPoolReplicationLinksClientImpl implements SqlPoolReplicati public interface SqlPoolReplicationLinksService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/replicationLinks") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/replicationLinks") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -75,8 +74,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/replicationLinks/{linkId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/replicationLinks/{linkId}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getByName( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolRestorePointsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolRestorePointsClientImpl.java index 857e8c86cbc28..81facf5c660a9 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolRestorePointsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolRestorePointsClientImpl.java @@ -68,8 +68,7 @@ public final class SqlPoolRestorePointsClientImpl implements SqlPoolRestorePoint public interface SqlPoolRestorePointsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/restorePoints") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/restorePoints") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -84,8 +83,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/restorePoints") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/restorePoints") @ExpectedResponses({200, 201, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> create( @@ -101,8 +99,7 @@ Mono>> create( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/restorePoints/{restorePointName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/restorePoints/{restorePointName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -118,8 +115,7 @@ Mono> get( @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/restorePoints/{restorePointName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/restorePoints/{restorePointName}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolSchemasClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolSchemasClientImpl.java index f57301e1b8693..f5029472db458 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolSchemasClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolSchemasClientImpl.java @@ -58,8 +58,7 @@ public final class SqlPoolSchemasClientImpl implements SqlPoolSchemasClient { public interface SqlPoolSchemasService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/schemas") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/schemas") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -75,8 +74,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolSecurityAlertPoliciesClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolSecurityAlertPoliciesClientImpl.java index 218dd321c5c85..54e0ab832b5bb 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolSecurityAlertPoliciesClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolSecurityAlertPoliciesClientImpl.java @@ -63,8 +63,7 @@ public final class SqlPoolSecurityAlertPoliciesClientImpl implements SqlPoolSecu public interface SqlPoolSecurityAlertPoliciesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/securityAlertPolicies") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/securityAlertPolicies") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -79,8 +78,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/securityAlertPolicies/{securityAlertPolicyName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/securityAlertPolicies/{securityAlertPolicyName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -96,8 +94,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/securityAlertPolicies/{securityAlertPolicyName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/securityAlertPolicies/{securityAlertPolicyName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolSensitivityLabelsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolSensitivityLabelsClientImpl.java index 737b4382bea86..2615e02d96c96 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolSensitivityLabelsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolSensitivityLabelsClientImpl.java @@ -66,8 +66,7 @@ public final class SqlPoolSensitivityLabelsClientImpl implements SqlPoolSensitiv public interface SqlPoolSensitivityLabelsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/currentSensitivityLabels") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/currentSensitivityLabels") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listCurrent( @@ -83,8 +82,7 @@ Mono> listCurrent( @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/currentSensitivityLabels") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/currentSensitivityLabels") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> update( @@ -99,8 +97,7 @@ Mono> update( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/recommendedSensitivityLabels") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/recommendedSensitivityLabels") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listRecommended( @@ -118,9 +115,7 @@ Mono> listRecommended( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}" - + "/sensitivityLabels/{sensitivityLabelSource}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( @@ -140,9 +135,7 @@ Mono> createOrUpdate( @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}" - + "/sensitivityLabels/{sensitivityLabelSource}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( @@ -160,9 +153,7 @@ Mono> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}" - + "/sensitivityLabels/{sensitivityLabelSource}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -181,9 +172,7 @@ Mono> get( @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}" - + "/sensitivityLabels/{sensitivityLabelSource}/enable") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/enable") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> enableRecommendation( @@ -201,9 +190,7 @@ Mono> enableRecommendation( @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}" - + "/sensitivityLabels/{sensitivityLabelSource}/disable") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}/disable") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> disableRecommendation( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolTableColumnsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolTableColumnsClientImpl.java index 979e8a5b83404..bbbb6e444228e 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolTableColumnsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolTableColumnsClientImpl.java @@ -58,8 +58,7 @@ public final class SqlPoolTableColumnsClientImpl implements SqlPoolTableColumnsC public interface SqlPoolTableColumnsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}/tables/{tableName}/columns") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}/tables/{tableName}/columns") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByTableName( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolTablesClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolTablesClientImpl.java index dad691a3cc7b6..d37f754020728 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolTablesClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolTablesClientImpl.java @@ -58,8 +58,7 @@ public final class SqlPoolTablesClientImpl implements SqlPoolTablesClient { public interface SqlPoolTablesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}/tables") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}/tables") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listBySchema( @@ -76,8 +75,7 @@ Mono> listBySchema( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}/tables/{tableName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/schemas/{schemaName}/tables/{tableName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolTransparentDataEncryptionsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolTransparentDataEncryptionsClientImpl.java index 197f4978aafb7..9a7b1e1529a86 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolTransparentDataEncryptionsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolTransparentDataEncryptionsClientImpl.java @@ -67,8 +67,7 @@ public final class SqlPoolTransparentDataEncryptionsClientImpl implements SqlPoo public interface SqlPoolTransparentDataEncryptionsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/transparentDataEncryption/{transparentDataEncryptionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/transparentDataEncryption/{transparentDataEncryptionName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -84,8 +83,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/transparentDataEncryption/{transparentDataEncryptionName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/transparentDataEncryption/{transparentDataEncryptionName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( @@ -102,8 +100,7 @@ Mono> createOrUpdate( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/transparentDataEncryption") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/transparentDataEncryption") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolUsagesClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolUsagesClientImpl.java index 5382d220f3c93..8180c84d79139 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolUsagesClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolUsagesClientImpl.java @@ -58,8 +58,7 @@ public final class SqlPoolUsagesClientImpl implements SqlPoolUsagesClient { public interface SqlPoolUsagesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/usages") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/usages") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolVulnerabilityAssessmentRuleBaselinesClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolVulnerabilityAssessmentRuleBaselinesClientImpl.java index a0d419a910530..c223f8ae7aafe 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolVulnerabilityAssessmentRuleBaselinesClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolVulnerabilityAssessmentRuleBaselinesClientImpl.java @@ -66,9 +66,7 @@ public final class SqlPoolVulnerabilityAssessmentRuleBaselinesClientImpl public interface SqlPoolVulnerabilityAssessmentRuleBaselinesService { @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules" - + "/{ruleId}/baselines/{baselineName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( @@ -87,9 +85,7 @@ Mono> createOrUpdate( @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules" - + "/{ruleId}/baselines/{baselineName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( @@ -106,9 +102,7 @@ Mono> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules" - + "/{ruleId}/baselines/{baselineName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolVulnerabilityAssessmentScansClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolVulnerabilityAssessmentScansClientImpl.java index a89c029ec8b40..2ae1575092e1f 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolVulnerabilityAssessmentScansClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolVulnerabilityAssessmentScansClientImpl.java @@ -72,9 +72,7 @@ public final class SqlPoolVulnerabilityAssessmentScansClientImpl implements SqlP public interface SqlPoolVulnerabilityAssessmentScansService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}" - + "/scans") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -90,9 +88,7 @@ Mono> list( @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans" - + "/{scanId}/initiateScan") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/initiateScan") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> initiateScan( @@ -108,9 +104,7 @@ Mono>> initiateScan( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans" - + "/{scanId}/export") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/export") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> export( @@ -127,9 +121,7 @@ Mono> export( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans" - + "/{scanId}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolVulnerabilityAssessmentsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolVulnerabilityAssessmentsClientImpl.java index c2399230c3e68..8ace724c4debd 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolVulnerabilityAssessmentsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolVulnerabilityAssessmentsClientImpl.java @@ -66,8 +66,7 @@ public final class SqlPoolVulnerabilityAssessmentsClientImpl implements SqlPoolV public interface SqlPoolVulnerabilityAssessmentsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/vulnerabilityAssessments") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/vulnerabilityAssessments") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -82,8 +81,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -99,8 +97,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( @@ -117,8 +114,7 @@ Mono> createOrUpdate( @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolWorkloadClassifiersClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolWorkloadClassifiersClientImpl.java index a9198f11742a6..e841e3a3b3e65 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolWorkloadClassifiersClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolWorkloadClassifiersClientImpl.java @@ -68,9 +68,7 @@ public final class SqlPoolWorkloadClassifiersClientImpl implements SqlPoolWorklo public interface SqlPoolWorkloadClassifiersService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/workloadGroups/{workloadGroupName}/workloadClassifiers" - + "/{workloadClassifierName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/workloadGroups/{workloadGroupName}/workloadClassifiers/{workloadClassifierName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -87,9 +85,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/workloadGroups/{workloadGroupName}/workloadClassifiers" - + "/{workloadClassifierName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/workloadGroups/{workloadGroupName}/workloadClassifiers/{workloadClassifierName}") @ExpectedResponses({200, 201, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -107,9 +103,7 @@ Mono>> createOrUpdate( @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/workloadGroups/{workloadGroupName}/workloadClassifiers" - + "/{workloadClassifierName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/workloadGroups/{workloadGroupName}/workloadClassifiers/{workloadClassifierName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -125,8 +119,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/workloadGroups/{workloadGroupName}/workloadClassifiers") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/workloadGroups/{workloadGroupName}/workloadClassifiers") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolWorkloadGroupsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolWorkloadGroupsClientImpl.java index 101ee9a592fa6..71f54977b7b20 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolWorkloadGroupsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolWorkloadGroupsClientImpl.java @@ -67,8 +67,7 @@ public final class SqlPoolWorkloadGroupsClientImpl implements SqlPoolWorkloadGro public interface SqlPoolWorkloadGroupsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/workloadGroups/{workloadGroupName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/workloadGroups/{workloadGroupName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -84,8 +83,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/workloadGroups/{workloadGroupName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/workloadGroups/{workloadGroupName}") @ExpectedResponses({200, 201, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -102,8 +100,7 @@ Mono>> createOrUpdate( @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/workloadGroups/{workloadGroupName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/workloadGroups/{workloadGroupName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -118,8 +115,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/workloadGroups") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/workloadGroups") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolsClientImpl.java index 6c6830caf7b3b..6f5c89d60582f 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolsClientImpl.java @@ -69,8 +69,7 @@ public final class SqlPoolsClientImpl implements SqlPoolsClient { public interface SqlPoolsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -85,8 +84,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> update( @@ -102,9 +100,11 @@ Mono>> update( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}") @ExpectedResponses({200, 202}) + @UnexpectedResponseExceptionType( + value = ManagementException.class, + code = {404}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> create( @HostParam("$host") String endpoint, @@ -119,8 +119,7 @@ Mono>> create( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( @@ -135,8 +134,7 @@ Mono>> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByWorkspace( @@ -150,8 +148,7 @@ Mono> listByWorkspace( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/pause") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/pause") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> pause( @@ -166,8 +163,7 @@ Mono>> pause( @Headers({"Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/resume") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/resume") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> resume( @@ -182,8 +178,7 @@ Mono>> resume( @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlPools/{sqlPoolName}/move") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlPools/{sqlPoolName}/move") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> rename( @@ -710,6 +705,7 @@ public SqlPoolInner update( * @param sqlPoolInfo The SQL pool to create. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server on status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return sQL pool along with {@link Response} on successful completion of {@link Mono}. */ @@ -774,6 +770,7 @@ private Mono>> createWithResponseAsync( * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server on status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return sQL pool along with {@link Response} on successful completion of {@link Mono}. */ @@ -834,6 +831,7 @@ private Mono>> createWithResponseAsync( * @param sqlPoolInfo The SQL pool to create. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server on status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of sQL pool. */ @@ -860,6 +858,7 @@ private PollerFlux, SqlPoolInner> beginCreateAsync( * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server on status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of sQL pool. */ @@ -886,6 +885,7 @@ private PollerFlux, SqlPoolInner> beginCreateAsync( * @param sqlPoolInfo The SQL pool to create. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server on status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of sQL pool. */ @@ -907,6 +907,7 @@ public SyncPoller, SqlPoolInner> beginCreate( * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server on status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of sQL pool. */ @@ -929,6 +930,7 @@ public SyncPoller, SqlPoolInner> beginCreate( * @param sqlPoolInfo The SQL pool to create. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server on status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return sQL pool on successful completion of {@link Mono}. */ @@ -952,6 +954,7 @@ private Mono createAsync( * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server on status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return sQL pool on successful completion of {@link Mono}. */ @@ -974,6 +977,7 @@ private Mono createAsync( * @param sqlPoolInfo The SQL pool to create. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server on status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return sQL pool. */ @@ -995,6 +999,7 @@ public SqlPoolInner create( * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server on status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return sQL pool. */ diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceAadAdminsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceAadAdminsClientImpl.java index ade55ec6569c1..57b93a9b0e1eb 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceAadAdminsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceAadAdminsClientImpl.java @@ -61,8 +61,7 @@ public final class WorkspaceAadAdminsClientImpl implements WorkspaceAadAdminsCli public interface WorkspaceAadAdminsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/administrators/activeDirectory") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/administrators/activeDirectory") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -76,8 +75,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/administrators/activeDirectory") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/administrators/activeDirectory") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -92,8 +90,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/administrators/activeDirectory") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/administrators/activeDirectory") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceManagedIdentitySqlControlSettingsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceManagedIdentitySqlControlSettingsClientImpl.java index af4f0e33e9775..09daa06302ac8 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceManagedIdentitySqlControlSettingsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceManagedIdentitySqlControlSettingsClientImpl.java @@ -68,8 +68,7 @@ public final class WorkspaceManagedIdentitySqlControlSettingsClientImpl public interface WorkspaceManagedIdentitySqlControlSettingsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/managedIdentitySqlControlSettings/default") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/managedIdentitySqlControlSettings/default") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -83,8 +82,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/managedIdentitySqlControlSettings/default") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/managedIdentitySqlControlSettings/default") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceManagedSqlServerBlobAuditingPoliciesClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceManagedSqlServerBlobAuditingPoliciesClientImpl.java index b0f7bb113f1ba..ca000841dd210 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceManagedSqlServerBlobAuditingPoliciesClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceManagedSqlServerBlobAuditingPoliciesClientImpl.java @@ -74,8 +74,7 @@ public final class WorkspaceManagedSqlServerBlobAuditingPoliciesClientImpl public interface WorkspaceManagedSqlServerBlobAuditingPoliciesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/auditingSettings/{blobAuditingPolicyName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/auditingSettings/{blobAuditingPolicyName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -90,8 +89,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/auditingSettings/{blobAuditingPolicyName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/auditingSettings/{blobAuditingPolicyName}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -107,8 +105,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/auditingSettings") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/auditingSettings") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByWorkspace( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceManagedSqlServerDedicatedSqlMinimalTlsSettingsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceManagedSqlServerDedicatedSqlMinimalTlsSettingsClientImpl.java index 9cf74c2cab74d..f56b502c24c83 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceManagedSqlServerDedicatedSqlMinimalTlsSettingsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceManagedSqlServerDedicatedSqlMinimalTlsSettingsClientImpl.java @@ -75,8 +75,7 @@ public final class WorkspaceManagedSqlServerDedicatedSqlMinimalTlsSettingsClient public interface WorkspaceManagedSqlServerDedicatedSqlMinimalTlsSettingsService { @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/dedicatedSQLminimalTlsSettings/{dedicatedSQLminimalTlsSettingsName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/dedicatedSQLminimalTlsSettings/{dedicatedSQLminimalTlsSettingsName}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> update( @@ -93,8 +92,7 @@ Mono>> update( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/dedicatedSQLminimalTlsSettings/{dedicatedSQLminimalTlsSettingsName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/dedicatedSQLminimalTlsSettings/{dedicatedSQLminimalTlsSettingsName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -109,8 +107,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/dedicatedSQLminimalTlsSettings") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/dedicatedSQLminimalTlsSettings") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceManagedSqlServerEncryptionProtectorsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceManagedSqlServerEncryptionProtectorsClientImpl.java index 0a156d3e99076..37fac01bacba5 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceManagedSqlServerEncryptionProtectorsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceManagedSqlServerEncryptionProtectorsClientImpl.java @@ -75,8 +75,7 @@ public final class WorkspaceManagedSqlServerEncryptionProtectorsClientImpl public interface WorkspaceManagedSqlServerEncryptionProtectorsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/encryptionProtector/{encryptionProtectorName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/encryptionProtector/{encryptionProtectorName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -91,8 +90,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/encryptionProtector/{encryptionProtectorName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/encryptionProtector/{encryptionProtectorName}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -108,8 +106,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/encryptionProtector") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/encryptionProtector") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -123,8 +120,7 @@ Mono> list( @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/encryptionProtector/{encryptionProtectorName}/revalidate") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/encryptionProtector/{encryptionProtectorName}/revalidate") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> revalidate( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesClientImpl.java index 1679cfc507c30..dd520a76d062b 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesClientImpl.java @@ -75,8 +75,7 @@ public final class WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesClientIm public interface WorkspaceManagedSqlServerExtendedBlobAuditingPoliciesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/extendedAuditingSettings/{blobAuditingPolicyName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/extendedAuditingSettings/{blobAuditingPolicyName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -91,8 +90,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/extendedAuditingSettings/{blobAuditingPolicyName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/extendedAuditingSettings/{blobAuditingPolicyName}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -108,8 +106,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/extendedAuditingSettings") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/extendedAuditingSettings") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> listByWorkspace( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceManagedSqlServerRecoverableSqlPoolsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceManagedSqlServerRecoverableSqlPoolsClientImpl.java index 923ed7eca9a34..f7b0e61da1ba6 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceManagedSqlServerRecoverableSqlPoolsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceManagedSqlServerRecoverableSqlPoolsClientImpl.java @@ -66,8 +66,7 @@ public final class WorkspaceManagedSqlServerRecoverableSqlPoolsClientImpl public interface WorkspaceManagedSqlServerRecoverableSqlPoolsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/recoverableSqlPools") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/recoverableSqlPools") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( @@ -81,8 +80,7 @@ Mono> list( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/recoverableSqlPools/{sqlPoolName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/recoverableSqlPools/{sqlPoolName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceManagedSqlServerSecurityAlertPoliciesClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceManagedSqlServerSecurityAlertPoliciesClientImpl.java index 26c48e5c7ea95..4a37815df9f12 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceManagedSqlServerSecurityAlertPoliciesClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceManagedSqlServerSecurityAlertPoliciesClientImpl.java @@ -74,8 +74,7 @@ public final class WorkspaceManagedSqlServerSecurityAlertPoliciesClientImpl public interface WorkspaceManagedSqlServerSecurityAlertPoliciesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/securityAlertPolicies/{securityAlertPolicyName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/securityAlertPolicies/{securityAlertPolicyName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -90,8 +89,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/securityAlertPolicies/{securityAlertPolicyName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/securityAlertPolicies/{securityAlertPolicyName}") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -107,8 +105,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/securityAlertPolicies") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/securityAlertPolicies") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceManagedSqlServerUsagesClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceManagedSqlServerUsagesClientImpl.java index 56dabad3e24f1..e61e51926a554 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceManagedSqlServerUsagesClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceManagedSqlServerUsagesClientImpl.java @@ -62,8 +62,7 @@ public final class WorkspaceManagedSqlServerUsagesClientImpl implements Workspac public interface WorkspaceManagedSqlServerUsagesService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlUsages") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlUsages") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceManagedSqlServerVulnerabilityAssessmentsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceManagedSqlServerVulnerabilityAssessmentsClientImpl.java index 239e13d658b25..af86876d89145 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceManagedSqlServerVulnerabilityAssessmentsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceManagedSqlServerVulnerabilityAssessmentsClientImpl.java @@ -71,8 +71,7 @@ public final class WorkspaceManagedSqlServerVulnerabilityAssessmentsClientImpl public interface WorkspaceManagedSqlServerVulnerabilityAssessmentsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -87,8 +86,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> createOrUpdate( @@ -104,8 +102,7 @@ Mono> createOrUpdate( @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}") @ExpectedResponses({200, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> delete( @@ -119,8 +116,7 @@ Mono> delete( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/vulnerabilityAssessments") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/vulnerabilityAssessments") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> list( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceSqlAadAdminsClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceSqlAadAdminsClientImpl.java index c2498c0d7bc19..690df26ec2ffa 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceSqlAadAdminsClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspaceSqlAadAdminsClientImpl.java @@ -62,8 +62,7 @@ public final class WorkspaceSqlAadAdminsClientImpl implements WorkspaceSqlAadAdm public interface WorkspaceSqlAadAdminsService { @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlAdministrators/activeDirectory") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlAdministrators/activeDirectory") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> get( @@ -77,8 +76,7 @@ Mono> get( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlAdministrators/activeDirectory") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlAdministrators/activeDirectory") @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -93,8 +91,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}/sqlAdministrators/activeDirectory") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}/sqlAdministrators/activeDirectory") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspacesClientImpl.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspacesClientImpl.java index 6bbb2598ebe3a..08c1e6d2d7e19 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspacesClientImpl.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/WorkspacesClientImpl.java @@ -81,8 +81,7 @@ Mono> listByResourceGroup( @Headers({"Content-Type: application/json"}) @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}") @ExpectedResponses({200}) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getByResourceGroup( @@ -96,8 +95,7 @@ Mono> getByResourceGroup( @Headers({"Content-Type: application/json"}) @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> update( @@ -112,8 +110,7 @@ Mono>> update( @Headers({"Content-Type: application/json"}) @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}") @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> createOrUpdate( @@ -128,8 +125,7 @@ Mono>> createOrUpdate( @Headers({"Content-Type: application/json"}) @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces" - + "/{workspaceName}") + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Synapse/workspaces/{workspaceName}") @ExpectedResponses({200, 202, 204}) @UnexpectedResponseExceptionType(ManagementException.class) Mono>> delete( diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ManagedIdentity.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ManagedIdentity.java index 85b2400ef9fe8..3e9771b77fd08 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ManagedIdentity.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ManagedIdentity.java @@ -12,7 +12,7 @@ /** The workspace managed identity. */ @Fluent -public class ManagedIdentity { +public final class ManagedIdentity { /* * The principal ID of the workspace managed identity */ diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity.java index a140d5ca8ee95..8f7ff200e58c7 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity.java @@ -9,7 +9,7 @@ /** Grant sql control to managed identity. */ @Fluent -public class ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity { +public final class ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity { /* * Desired state */ diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ServerVulnerabilityAssessment.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ServerVulnerabilityAssessment.java index 0c41cac29e223..60c4676250fda 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ServerVulnerabilityAssessment.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/ServerVulnerabilityAssessment.java @@ -60,7 +60,7 @@ public interface ServerVulnerabilityAssessment { * * @return the recurringScans value. */ - VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated recurringScans(); + VulnerabilityAssessmentRecurringScansProperties recurringScans(); /** * Gets the name of the resource group. @@ -168,7 +168,7 @@ interface WithRecurringScans { * @param recurringScans The recurring scans settings. * @return the next definition stage. */ - WithCreate withRecurringScans(VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated recurringScans); + WithCreate withRecurringScans(VulnerabilityAssessmentRecurringScansProperties recurringScans); } } /** @@ -236,7 +236,7 @@ interface WithRecurringScans { * @param recurringScans The recurring scans settings. * @return the next definition stage. */ - Update withRecurringScans(VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated recurringScans); + Update withRecurringScans(VulnerabilityAssessmentRecurringScansProperties recurringScans); } } /** diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SqlPoolMetadataSyncConfigs.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SqlPoolMetadataSyncConfigs.java index 7f833442131f1..8e49303098851 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SqlPoolMetadataSyncConfigs.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/SqlPoolMetadataSyncConfigs.java @@ -21,6 +21,8 @@ public interface SqlPoolMetadataSyncConfigs { * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on + * status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the metadata sync configuration for a SQL pool along with {@link Response}. */ @@ -37,6 +39,8 @@ Response getWithResponse( * @param sqlPoolName SQL pool name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on + * status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the metadata sync configuration for a SQL pool. */ @@ -54,6 +58,8 @@ Response getWithResponse( * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on + * status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return metadata sync configuration along with {@link Response}. */ @@ -75,6 +81,8 @@ Response createWithResponse( * @param metadataSyncConfiguration Metadata sync configuration. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on + * status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return metadata sync configuration. */ diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/UserAssignedManagedIdentity.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/UserAssignedManagedIdentity.java index f0cb94e74ee55..e99beb7ed6d94 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/UserAssignedManagedIdentity.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/UserAssignedManagedIdentity.java @@ -10,7 +10,7 @@ /** User Assigned Managed Identity. */ @Immutable -public class UserAssignedManagedIdentity { +public final class UserAssignedManagedIdentity { /* * The client ID. */ diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated.java b/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated.java deleted file mode 100644 index dc40fcb601344..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/models/VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated.java +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.models; - -import com.azure.core.annotation.Fluent; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** Properties of a Vulnerability Assessment recurring scans. */ -@Fluent -public final class VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated { - /* - * Recurring scans state. - */ - @JsonProperty(value = "isEnabled") - private Boolean isEnabled; - - /* - * Specifies that the schedule scan notification will be is sent to the subscription administrators. - */ - @JsonProperty(value = "emailSubscriptionAdmins") - private Boolean emailSubscriptionAdmins; - - /* - * Specifies an array of e-mail addresses to which the scan notification is sent. - */ - @JsonProperty(value = "emails") - private List emails; - - /** Creates an instance of VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated class. */ - public VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated() { - } - - /** - * Get the isEnabled property: Recurring scans state. - * - * @return the isEnabled value. - */ - public Boolean isEnabled() { - return this.isEnabled; - } - - /** - * Set the isEnabled property: Recurring scans state. - * - * @param isEnabled the isEnabled value to set. - * @return the VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated object itself. - */ - public VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated withIsEnabled(Boolean isEnabled) { - this.isEnabled = isEnabled; - return this; - } - - /** - * Get the emailSubscriptionAdmins property: Specifies that the schedule scan notification will be is sent to the - * subscription administrators. - * - * @return the emailSubscriptionAdmins value. - */ - public Boolean emailSubscriptionAdmins() { - return this.emailSubscriptionAdmins; - } - - /** - * Set the emailSubscriptionAdmins property: Specifies that the schedule scan notification will be is sent to the - * subscription administrators. - * - * @param emailSubscriptionAdmins the emailSubscriptionAdmins value to set. - * @return the VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated object itself. - */ - public VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated withEmailSubscriptionAdmins( - Boolean emailSubscriptionAdmins) { - this.emailSubscriptionAdmins = emailSubscriptionAdmins; - return this; - } - - /** - * Get the emails property: Specifies an array of e-mail addresses to which the scan notification is sent. - * - * @return the emails value. - */ - public List emails() { - return this.emails; - } - - /** - * Set the emails property: Specifies an array of e-mail addresses to which the scan notification is sent. - * - * @param emails the emails value to set. - * @return the VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated object itself. - */ - public VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated withEmails(List emails) { - this.emails = emails; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerVulnerabilityAssessmentsCreateOrUpdateSamples.java b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerVulnerabilityAssessmentsCreateOrUpdateSamples.java index bff8109789dd2..188ce097da20b 100644 --- a/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerVulnerabilityAssessmentsCreateOrUpdateSamples.java +++ b/sdk/synapse/azure-resourcemanager-synapse/src/samples/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerVulnerabilityAssessmentsCreateOrUpdateSamples.java @@ -5,7 +5,7 @@ package com.azure.resourcemanager.synapse.generated; import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated; +import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentRecurringScansProperties; import java.util.Arrays; /** Samples for WorkspaceManagedSqlServerVulnerabilityAssessments CreateOrUpdate. */ @@ -70,7 +70,7 @@ public static void createOrUpdateAWorkspaceManagedSqlServerSVulnerabilityAssessm .withStorageContainerSasKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") .withStorageAccountAccessKey("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") .withRecurringScans( - new VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated() + new VulnerabilityAssessmentRecurringScansProperties() .withIsEnabled(true) .withEmailSubscriptionAdmins(true) .withEmails(Arrays.asList("email1@mail.com", "email2@mail.com"))) diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AadAdminPropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AadAdminPropertiesTests.java deleted file mode 100644 index 731d8c5a0fe09..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AadAdminPropertiesTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.AadAdminProperties; -import org.junit.jupiter.api.Assertions; - -public final class AadAdminPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AadAdminProperties model = - BinaryData - .fromString("{\"tenantId\":\"ypq\",\"login\":\"sfj\",\"administratorType\":\"b\",\"sid\":\"hhxud\"}") - .toObject(AadAdminProperties.class); - Assertions.assertEquals("ypq", model.tenantId()); - Assertions.assertEquals("sfj", model.login()); - Assertions.assertEquals("b", model.administratorType()); - Assertions.assertEquals("hhxud", model.sid()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AadAdminProperties model = - new AadAdminProperties().withTenantId("ypq").withLogin("sfj").withAdministratorType("b").withSid("hhxud"); - model = BinaryData.fromObject(model).toObject(AadAdminProperties.class); - Assertions.assertEquals("ypq", model.tenantId()); - Assertions.assertEquals("sfj", model.login()); - Assertions.assertEquals("b", model.administratorType()); - Assertions.assertEquals("hhxud", model.sid()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AttachedDatabaseConfigurationInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AttachedDatabaseConfigurationInnerTests.java deleted file mode 100644 index 4c0bbb1bb51cf..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AttachedDatabaseConfigurationInnerTests.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.AttachedDatabaseConfigurationInner; -import com.azure.resourcemanager.synapse.models.DefaultPrincipalsModificationKind; -import com.azure.resourcemanager.synapse.models.TableLevelSharingProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AttachedDatabaseConfigurationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AttachedDatabaseConfigurationInner model = - BinaryData - .fromString( - "{\"location\":\"yapucygvoa\",\"properties\":{\"provisioningState\":\"Moving\",\"databaseName\":\"ssxlghieegjlg\",\"clusterResourceId\":\"vpaseksgbu\",\"attachedDatabaseNames\":[\"tu\",\"gdhg\",\"qipir\",\"iwrqofulopmjnl\"],\"defaultPrincipalsModificationKind\":\"Replace\",\"tableLevelSharingProperties\":{\"tablesToInclude\":[\"bjpi\",\"k\",\"phuuuerctato\"],\"tablesToExclude\":[\"tqpbrlcy\",\"duczkgof\"],\"externalTablesToInclude\":[\"srucvcrrpcjtt\",\"st\"],\"externalTablesToExclude\":[\"aqnrmvvfkoxmlg\",\"ktuidvrm\",\"zlpdwwex\",\"mzvlazipbh\"],\"materializedViewsToInclude\":[\"qsg\"],\"materializedViewsToExclude\":[\"uuzivensrpmeyyvp\",\"patlbijp\",\"gsksrfhf\"]}},\"id\":\"lmknbnxwcdom\",\"name\":\"pvfqawz\",\"type\":\"gbrt\"}") - .toObject(AttachedDatabaseConfigurationInner.class); - Assertions.assertEquals("yapucygvoa", model.location()); - Assertions.assertEquals("ssxlghieegjlg", model.databaseName()); - Assertions.assertEquals("vpaseksgbu", model.kustoPoolResourceId()); - Assertions.assertEquals(DefaultPrincipalsModificationKind.REPLACE, model.defaultPrincipalsModificationKind()); - Assertions.assertEquals("bjpi", model.tableLevelSharingProperties().tablesToInclude().get(0)); - Assertions.assertEquals("tqpbrlcy", model.tableLevelSharingProperties().tablesToExclude().get(0)); - Assertions.assertEquals("srucvcrrpcjtt", model.tableLevelSharingProperties().externalTablesToInclude().get(0)); - Assertions.assertEquals("aqnrmvvfkoxmlg", model.tableLevelSharingProperties().externalTablesToExclude().get(0)); - Assertions.assertEquals("qsg", model.tableLevelSharingProperties().materializedViewsToInclude().get(0)); - Assertions - .assertEquals("uuzivensrpmeyyvp", model.tableLevelSharingProperties().materializedViewsToExclude().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AttachedDatabaseConfigurationInner model = - new AttachedDatabaseConfigurationInner() - .withLocation("yapucygvoa") - .withDatabaseName("ssxlghieegjlg") - .withKustoPoolResourceId("vpaseksgbu") - .withDefaultPrincipalsModificationKind(DefaultPrincipalsModificationKind.REPLACE) - .withTableLevelSharingProperties( - new TableLevelSharingProperties() - .withTablesToInclude(Arrays.asList("bjpi", "k", "phuuuerctato")) - .withTablesToExclude(Arrays.asList("tqpbrlcy", "duczkgof")) - .withExternalTablesToInclude(Arrays.asList("srucvcrrpcjtt", "st")) - .withExternalTablesToExclude( - Arrays.asList("aqnrmvvfkoxmlg", "ktuidvrm", "zlpdwwex", "mzvlazipbh")) - .withMaterializedViewsToInclude(Arrays.asList("qsg")) - .withMaterializedViewsToExclude(Arrays.asList("uuzivensrpmeyyvp", "patlbijp", "gsksrfhf"))); - model = BinaryData.fromObject(model).toObject(AttachedDatabaseConfigurationInner.class); - Assertions.assertEquals("yapucygvoa", model.location()); - Assertions.assertEquals("ssxlghieegjlg", model.databaseName()); - Assertions.assertEquals("vpaseksgbu", model.kustoPoolResourceId()); - Assertions.assertEquals(DefaultPrincipalsModificationKind.REPLACE, model.defaultPrincipalsModificationKind()); - Assertions.assertEquals("bjpi", model.tableLevelSharingProperties().tablesToInclude().get(0)); - Assertions.assertEquals("tqpbrlcy", model.tableLevelSharingProperties().tablesToExclude().get(0)); - Assertions.assertEquals("srucvcrrpcjtt", model.tableLevelSharingProperties().externalTablesToInclude().get(0)); - Assertions.assertEquals("aqnrmvvfkoxmlg", model.tableLevelSharingProperties().externalTablesToExclude().get(0)); - Assertions.assertEquals("qsg", model.tableLevelSharingProperties().materializedViewsToInclude().get(0)); - Assertions - .assertEquals("uuzivensrpmeyyvp", model.tableLevelSharingProperties().materializedViewsToExclude().get(0)); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AttachedDatabaseConfigurationListResultTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AttachedDatabaseConfigurationListResultTests.java deleted file mode 100644 index 75d3d3f5bc9d3..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AttachedDatabaseConfigurationListResultTests.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.AttachedDatabaseConfigurationInner; -import com.azure.resourcemanager.synapse.models.AttachedDatabaseConfigurationListResult; -import com.azure.resourcemanager.synapse.models.DefaultPrincipalsModificationKind; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AttachedDatabaseConfigurationListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AttachedDatabaseConfigurationListResult model = - BinaryData - .fromString( - "{\"value\":[{\"location\":\"ptsoqfyiase\",\"properties\":{\"provisioningState\":\"Failed\",\"databaseName\":\"rttzrazisgykiu\",\"clusterResourceId\":\"mvanbwzo\",\"attachedDatabaseNames\":[],\"defaultPrincipalsModificationKind\":\"None\"},\"id\":\"xbsojkli\",\"name\":\"hmdp\",\"type\":\"ysprq\"},{\"location\":\"nzxojpslsvjgpli\",\"properties\":{\"provisioningState\":\"Canceled\",\"databaseName\":\"woyxqvapcohhou\",\"clusterResourceId\":\"qpqojxcxzrzd\",\"attachedDatabaseNames\":[],\"defaultPrincipalsModificationKind\":\"Replace\"},\"id\":\"enribc\",\"name\":\"wetzqddtjwfljh\",\"type\":\"namtuatmzw\"},{\"location\":\"jncqtjzmi\",\"properties\":{\"provisioningState\":\"Failed\",\"databaseName\":\"gat\",\"clusterResourceId\":\"uuvbx\",\"attachedDatabaseNames\":[],\"defaultPrincipalsModificationKind\":\"Union\"},\"id\":\"wggahttzlswvaj\",\"name\":\"fu\",\"type\":\"lx\"},{\"location\":\"qzasunwqrjzfrgqh\",\"properties\":{\"provisioningState\":\"Canceled\",\"databaseName\":\"mbuocnjrohmbp\",\"clusterResourceId\":\"ryxameblydyvkfkm\",\"attachedDatabaseNames\":[],\"defaultPrincipalsModificationKind\":\"Union\"},\"id\":\"e\",\"name\":\"v\",\"type\":\"mtodl\"}]}") - .toObject(AttachedDatabaseConfigurationListResult.class); - Assertions.assertEquals("ptsoqfyiase", model.value().get(0).location()); - Assertions.assertEquals("rttzrazisgykiu", model.value().get(0).databaseName()); - Assertions.assertEquals("mvanbwzo", model.value().get(0).kustoPoolResourceId()); - Assertions - .assertEquals( - DefaultPrincipalsModificationKind.NONE, model.value().get(0).defaultPrincipalsModificationKind()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AttachedDatabaseConfigurationListResult model = - new AttachedDatabaseConfigurationListResult() - .withValue( - Arrays - .asList( - new AttachedDatabaseConfigurationInner() - .withLocation("ptsoqfyiase") - .withDatabaseName("rttzrazisgykiu") - .withKustoPoolResourceId("mvanbwzo") - .withDefaultPrincipalsModificationKind(DefaultPrincipalsModificationKind.NONE), - new AttachedDatabaseConfigurationInner() - .withLocation("nzxojpslsvjgpli") - .withDatabaseName("woyxqvapcohhou") - .withKustoPoolResourceId("qpqojxcxzrzd") - .withDefaultPrincipalsModificationKind(DefaultPrincipalsModificationKind.REPLACE), - new AttachedDatabaseConfigurationInner() - .withLocation("jncqtjzmi") - .withDatabaseName("gat") - .withKustoPoolResourceId("uuvbx") - .withDefaultPrincipalsModificationKind(DefaultPrincipalsModificationKind.UNION), - new AttachedDatabaseConfigurationInner() - .withLocation("qzasunwqrjzfrgqh") - .withDatabaseName("mbuocnjrohmbp") - .withKustoPoolResourceId("ryxameblydyvkfkm") - .withDefaultPrincipalsModificationKind(DefaultPrincipalsModificationKind.UNION))); - model = BinaryData.fromObject(model).toObject(AttachedDatabaseConfigurationListResult.class); - Assertions.assertEquals("ptsoqfyiase", model.value().get(0).location()); - Assertions.assertEquals("rttzrazisgykiu", model.value().get(0).databaseName()); - Assertions.assertEquals("mvanbwzo", model.value().get(0).kustoPoolResourceId()); - Assertions - .assertEquals( - DefaultPrincipalsModificationKind.NONE, model.value().get(0).defaultPrincipalsModificationKind()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AttachedDatabaseConfigurationPropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AttachedDatabaseConfigurationPropertiesTests.java deleted file mode 100644 index 8d80731221e99..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AttachedDatabaseConfigurationPropertiesTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.AttachedDatabaseConfigurationProperties; -import com.azure.resourcemanager.synapse.models.DefaultPrincipalsModificationKind; -import com.azure.resourcemanager.synapse.models.TableLevelSharingProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AttachedDatabaseConfigurationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AttachedDatabaseConfigurationProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"Canceled\",\"databaseName\":\"aclkiexhajlfnt\",\"clusterResourceId\":\"iqfyuttdi\",\"attachedDatabaseNames\":[\"pvn\"],\"defaultPrincipalsModificationKind\":\"Union\",\"tableLevelSharingProperties\":{\"tablesToInclude\":[\"xkyctwwgzwx\",\"l\",\"ecvo\",\"ygzyvneezaifght\"],\"tablesToExclude\":[\"qtlffhzbk\",\"kjj\",\"avfqnvhnqoewdogi\",\"etesypvidbztjhqt\"],\"externalTablesToInclude\":[\"vnynkb\",\"etnjuhpsprkz\",\"aupia\",\"cxnafbwqrooh\"],\"externalTablesToExclude\":[\"vmaonurjt\",\"mghihp\",\"ecmslclbl\"],\"materializedViewsToInclude\":[\"lt\",\"sjuscvsfxigctmg\",\"uupb\"],\"materializedViewsToExclude\":[\"ccyd\",\"tce\",\"kdqkkyihzt\",\"eq\"]}}") - .toObject(AttachedDatabaseConfigurationProperties.class); - Assertions.assertEquals("aclkiexhajlfnt", model.databaseName()); - Assertions.assertEquals("iqfyuttdi", model.kustoPoolResourceId()); - Assertions.assertEquals(DefaultPrincipalsModificationKind.UNION, model.defaultPrincipalsModificationKind()); - Assertions.assertEquals("xkyctwwgzwx", model.tableLevelSharingProperties().tablesToInclude().get(0)); - Assertions.assertEquals("qtlffhzbk", model.tableLevelSharingProperties().tablesToExclude().get(0)); - Assertions.assertEquals("vnynkb", model.tableLevelSharingProperties().externalTablesToInclude().get(0)); - Assertions.assertEquals("vmaonurjt", model.tableLevelSharingProperties().externalTablesToExclude().get(0)); - Assertions.assertEquals("lt", model.tableLevelSharingProperties().materializedViewsToInclude().get(0)); - Assertions.assertEquals("ccyd", model.tableLevelSharingProperties().materializedViewsToExclude().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AttachedDatabaseConfigurationProperties model = - new AttachedDatabaseConfigurationProperties() - .withDatabaseName("aclkiexhajlfnt") - .withKustoPoolResourceId("iqfyuttdi") - .withDefaultPrincipalsModificationKind(DefaultPrincipalsModificationKind.UNION) - .withTableLevelSharingProperties( - new TableLevelSharingProperties() - .withTablesToInclude(Arrays.asList("xkyctwwgzwx", "l", "ecvo", "ygzyvneezaifght")) - .withTablesToExclude(Arrays.asList("qtlffhzbk", "kjj", "avfqnvhnqoewdogi", "etesypvidbztjhqt")) - .withExternalTablesToInclude(Arrays.asList("vnynkb", "etnjuhpsprkz", "aupia", "cxnafbwqrooh")) - .withExternalTablesToExclude(Arrays.asList("vmaonurjt", "mghihp", "ecmslclbl")) - .withMaterializedViewsToInclude(Arrays.asList("lt", "sjuscvsfxigctmg", "uupb")) - .withMaterializedViewsToExclude(Arrays.asList("ccyd", "tce", "kdqkkyihzt", "eq"))); - model = BinaryData.fromObject(model).toObject(AttachedDatabaseConfigurationProperties.class); - Assertions.assertEquals("aclkiexhajlfnt", model.databaseName()); - Assertions.assertEquals("iqfyuttdi", model.kustoPoolResourceId()); - Assertions.assertEquals(DefaultPrincipalsModificationKind.UNION, model.defaultPrincipalsModificationKind()); - Assertions.assertEquals("xkyctwwgzwx", model.tableLevelSharingProperties().tablesToInclude().get(0)); - Assertions.assertEquals("qtlffhzbk", model.tableLevelSharingProperties().tablesToExclude().get(0)); - Assertions.assertEquals("vnynkb", model.tableLevelSharingProperties().externalTablesToInclude().get(0)); - Assertions.assertEquals("vmaonurjt", model.tableLevelSharingProperties().externalTablesToExclude().get(0)); - Assertions.assertEquals("lt", model.tableLevelSharingProperties().materializedViewsToInclude().get(0)); - Assertions.assertEquals("ccyd", model.tableLevelSharingProperties().materializedViewsToExclude().get(0)); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AutoPausePropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AutoPausePropertiesTests.java deleted file mode 100644 index 9abf7ff03e827..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AutoPausePropertiesTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.AutoPauseProperties; -import org.junit.jupiter.api.Assertions; - -public final class AutoPausePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutoPauseProperties model = - BinaryData - .fromString("{\"delayInMinutes\":1622856853,\"enabled\":false}") - .toObject(AutoPauseProperties.class); - Assertions.assertEquals(1622856853, model.delayInMinutes()); - Assertions.assertEquals(false, model.enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutoPauseProperties model = new AutoPauseProperties().withDelayInMinutes(1622856853).withEnabled(false); - model = BinaryData.fromObject(model).toObject(AutoPauseProperties.class); - Assertions.assertEquals(1622856853, model.delayInMinutes()); - Assertions.assertEquals(false, model.enabled()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AutoScalePropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AutoScalePropertiesTests.java deleted file mode 100644 index a1d606140f5bc..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AutoScalePropertiesTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.AutoScaleProperties; -import org.junit.jupiter.api.Assertions; - -public final class AutoScalePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AutoScaleProperties model = - BinaryData - .fromString("{\"minNodeCount\":1303035802,\"enabled\":true,\"maxNodeCount\":111762942}") - .toObject(AutoScaleProperties.class); - Assertions.assertEquals(1303035802, model.minNodeCount()); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals(111762942, model.maxNodeCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AutoScaleProperties model = - new AutoScaleProperties().withMinNodeCount(1303035802).withEnabled(true).withMaxNodeCount(111762942); - model = BinaryData.fromObject(model).toObject(AutoScaleProperties.class); - Assertions.assertEquals(1303035802, model.minNodeCount()); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals(111762942, model.maxNodeCount()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AvailableRpOperationDisplayInfoTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AvailableRpOperationDisplayInfoTests.java deleted file mode 100644 index 4807088bb4b5b..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AvailableRpOperationDisplayInfoTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.AvailableRpOperationDisplayInfo; -import org.junit.jupiter.api.Assertions; - -public final class AvailableRpOperationDisplayInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AvailableRpOperationDisplayInfo model = - BinaryData - .fromString( - "{\"description\":\"odjpslwejd\",\"resource\":\"wryoqpsoacc\",\"provider\":\"zakljlahbc\",\"operation\":\"ffdfdosygexpa\"}") - .toObject(AvailableRpOperationDisplayInfo.class); - Assertions.assertEquals("odjpslwejd", model.description()); - Assertions.assertEquals("wryoqpsoacc", model.resource()); - Assertions.assertEquals("zakljlahbc", model.provider()); - Assertions.assertEquals("ffdfdosygexpa", model.operation()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableRpOperationDisplayInfo model = - new AvailableRpOperationDisplayInfo() - .withDescription("odjpslwejd") - .withResource("wryoqpsoacc") - .withProvider("zakljlahbc") - .withOperation("ffdfdosygexpa"); - model = BinaryData.fromObject(model).toObject(AvailableRpOperationDisplayInfo.class); - Assertions.assertEquals("odjpslwejd", model.description()); - Assertions.assertEquals("wryoqpsoacc", model.resource()); - Assertions.assertEquals("zakljlahbc", model.provider()); - Assertions.assertEquals("ffdfdosygexpa", model.operation()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AvailableRpOperationInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AvailableRpOperationInnerTests.java deleted file mode 100644 index 56f5377b4826e..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AvailableRpOperationInnerTests.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.AvailableRpOperationInner; -import com.azure.resourcemanager.synapse.models.AvailableRpOperationDisplayInfo; -import com.azure.resourcemanager.synapse.models.OperationMetaServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AvailableRpOperationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AvailableRpOperationInner model = - BinaryData - .fromString( - "{\"display\":{\"description\":\"z\",\"resource\":\"chgejspodm\",\"provider\":\"lzydehojwyahux\",\"operation\":\"pmqnja\"},\"isDataAction\":\"ixjsprozvcputeg\",\"name\":\"wmfdatscmdvpjhul\",\"properties\":{\"serviceSpecification\":{\"metricSpecifications\":[],\"logSpecifications\":[]}},\"origin\":\"zkrwfn\"}") - .toObject(AvailableRpOperationInner.class); - Assertions.assertEquals("z", model.display().description()); - Assertions.assertEquals("chgejspodm", model.display().resource()); - Assertions.assertEquals("lzydehojwyahux", model.display().provider()); - Assertions.assertEquals("pmqnja", model.display().operation()); - Assertions.assertEquals("ixjsprozvcputeg", model.isDataAction()); - Assertions.assertEquals("wmfdatscmdvpjhul", model.name()); - Assertions.assertEquals("zkrwfn", model.origin()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableRpOperationInner model = - new AvailableRpOperationInner() - .withDisplay( - new AvailableRpOperationDisplayInfo() - .withDescription("z") - .withResource("chgejspodm") - .withProvider("lzydehojwyahux") - .withOperation("pmqnja")) - .withIsDataAction("ixjsprozvcputeg") - .withName("wmfdatscmdvpjhul") - .withOrigin("zkrwfn") - .withServiceSpecification( - new OperationMetaServiceSpecification() - .withMetricSpecifications(Arrays.asList()) - .withLogSpecifications(Arrays.asList())); - model = BinaryData.fromObject(model).toObject(AvailableRpOperationInner.class); - Assertions.assertEquals("z", model.display().description()); - Assertions.assertEquals("chgejspodm", model.display().resource()); - Assertions.assertEquals("lzydehojwyahux", model.display().provider()); - Assertions.assertEquals("pmqnja", model.display().operation()); - Assertions.assertEquals("ixjsprozvcputeg", model.isDataAction()); - Assertions.assertEquals("wmfdatscmdvpjhul", model.name()); - Assertions.assertEquals("zkrwfn", model.origin()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AzureADOnlyAuthenticationInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AzureADOnlyAuthenticationInnerTests.java deleted file mode 100644 index cb0621d36abd7..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AzureADOnlyAuthenticationInnerTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.AzureADOnlyAuthenticationInner; -import org.junit.jupiter.api.Assertions; - -public final class AzureADOnlyAuthenticationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureADOnlyAuthenticationInner model = - BinaryData - .fromString( - "{\"properties\":{\"azureADOnlyAuthentication\":true,\"state\":\"InConsistent\",\"creationDate\":\"2021-07-30T08:26:42Z\"},\"id\":\"gjxpybczmehmt\",\"name\":\"opb\",\"type\":\"phrupidgsybbejhp\"}") - .toObject(AzureADOnlyAuthenticationInner.class); - Assertions.assertEquals(true, model.azureADOnlyAuthentication()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureADOnlyAuthenticationInner model = new AzureADOnlyAuthenticationInner().withAzureADOnlyAuthentication(true); - model = BinaryData.fromObject(model).toObject(AzureADOnlyAuthenticationInner.class); - Assertions.assertEquals(true, model.azureADOnlyAuthentication()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AzureADOnlyAuthenticationListResultTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AzureADOnlyAuthenticationListResultTests.java deleted file mode 100644 index 132450079a63b..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AzureADOnlyAuthenticationListResultTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.AzureADOnlyAuthenticationListResult; - -public final class AzureADOnlyAuthenticationListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureADOnlyAuthenticationListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"azureADOnlyAuthentication\":false,\"state\":\"Consistent\",\"creationDate\":\"2021-03-23T13:19:49Z\"},\"id\":\"mtqio\",\"name\":\"jzehtb\",\"type\":\"ufpo\"}],\"nextLink\":\"oizh\"}") - .toObject(AzureADOnlyAuthenticationListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureADOnlyAuthenticationListResult model = new AzureADOnlyAuthenticationListResult(); - model = BinaryData.fromObject(model).toObject(AzureADOnlyAuthenticationListResult.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AzureADOnlyAuthenticationPropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AzureADOnlyAuthenticationPropertiesTests.java deleted file mode 100644 index 9efc2740c62d0..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AzureADOnlyAuthenticationPropertiesTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.AzureADOnlyAuthenticationProperties; -import org.junit.jupiter.api.Assertions; - -public final class AzureADOnlyAuthenticationPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureADOnlyAuthenticationProperties model = - BinaryData - .fromString( - "{\"azureADOnlyAuthentication\":true,\"state\":\"InConsistent\",\"creationDate\":\"2021-08-10T00:52:22Z\"}") - .toObject(AzureADOnlyAuthenticationProperties.class); - Assertions.assertEquals(true, model.azureADOnlyAuthentication()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureADOnlyAuthenticationProperties model = - new AzureADOnlyAuthenticationProperties().withAzureADOnlyAuthentication(true); - model = BinaryData.fromObject(model).toObject(AzureADOnlyAuthenticationProperties.class); - Assertions.assertEquals(true, model.azureADOnlyAuthentication()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AzureADOnlyAuthenticationsCreateMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AzureADOnlyAuthenticationsCreateMockTests.java deleted file mode 100644 index 8003b6f2c08c1..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AzureADOnlyAuthenticationsCreateMockTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.AzureADOnlyAuthentication; -import com.azure.resourcemanager.synapse.models.AzureADOnlyAuthenticationName; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class AzureADOnlyAuthenticationsCreateMockTests { - @Test - public void testCreate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"azureADOnlyAuthentication\":true,\"state\":\"Consistent\",\"creationDate\":\"2021-09-16T05:32:49Z\"},\"id\":\"acvumepj\",\"name\":\"bibnzpphepifex\",\"type\":\"eqir\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - AzureADOnlyAuthentication response = - manager - .azureADOnlyAuthentications() - .define(AzureADOnlyAuthenticationName.DEFAULT) - .withExistingWorkspace("mbiipsnawwlqk", "nxhhl") - .withAzureADOnlyAuthentication(false) - .create(); - - Assertions.assertEquals(true, response.azureADOnlyAuthentication()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AzureADOnlyAuthenticationsGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AzureADOnlyAuthenticationsGetWithResponseMockTests.java deleted file mode 100644 index 610d3651f1213..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AzureADOnlyAuthenticationsGetWithResponseMockTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.AzureADOnlyAuthentication; -import com.azure.resourcemanager.synapse.models.AzureADOnlyAuthenticationName; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class AzureADOnlyAuthenticationsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"azureADOnlyAuthentication\":true,\"state\":\"Updating\",\"creationDate\":\"2021-03-24T21:47:21Z\"},\"id\":\"tjrrlkmds\",\"name\":\"jhhxdlajf\",\"type\":\"xcxscvslxlh\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - AzureADOnlyAuthentication response = - manager - .azureADOnlyAuthentications() - .getWithResponse( - "gsut", "hllnmwynefxe", AzureADOnlyAuthenticationName.DEFAULT, com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(true, response.azureADOnlyAuthentication()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AzureADOnlyAuthenticationsListMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AzureADOnlyAuthenticationsListMockTests.java deleted file mode 100644 index e8d7f894ac0d9..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AzureADOnlyAuthenticationsListMockTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.AzureADOnlyAuthentication; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class AzureADOnlyAuthenticationsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"azureADOnlyAuthentication\":true,\"state\":\"InConsistent\",\"creationDate\":\"2021-11-21T13:19:39Z\"},\"id\":\"qid\",\"name\":\"qtoqxjhqxcsq\",\"type\":\"tkbtnqlrngl\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.azureADOnlyAuthentications().list("a", "krmukmyjmkxett", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(true, response.iterator().next().azureADOnlyAuthentication()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AzureCapacityTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AzureCapacityTests.java deleted file mode 100644 index c5b0609b25585..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AzureCapacityTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.AzureCapacity; -import com.azure.resourcemanager.synapse.models.AzureScaleType; -import org.junit.jupiter.api.Assertions; - -public final class AzureCapacityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureCapacity model = - BinaryData - .fromString( - "{\"scaleType\":\"automatic\",\"minimum\":1248191689,\"maximum\":1441731136,\"default\":576028683}") - .toObject(AzureCapacity.class); - Assertions.assertEquals(AzureScaleType.AUTOMATIC, model.scaleType()); - Assertions.assertEquals(1248191689, model.minimum()); - Assertions.assertEquals(1441731136, model.maximum()); - Assertions.assertEquals(576028683, model.defaultProperty()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureCapacity model = - new AzureCapacity() - .withScaleType(AzureScaleType.AUTOMATIC) - .withMinimum(1248191689) - .withMaximum(1441731136) - .withDefaultProperty(576028683); - model = BinaryData.fromObject(model).toObject(AzureCapacity.class); - Assertions.assertEquals(AzureScaleType.AUTOMATIC, model.scaleType()); - Assertions.assertEquals(1248191689, model.minimum()); - Assertions.assertEquals(1441731136, model.maximum()); - Assertions.assertEquals(576028683, model.defaultProperty()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AzureEntityResourceTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AzureEntityResourceTests.java deleted file mode 100644 index 0f90848160aa1..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AzureEntityResourceTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.AzureEntityResource; - -public final class AzureEntityResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureEntityResource model = - BinaryData - .fromString("{\"etag\":\"stbz\",\"id\":\"kiwbuqnyoph\",\"name\":\"fy\",\"type\":\"sgcrpfbcunezzce\"}") - .toObject(AzureEntityResource.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureEntityResource model = new AzureEntityResource(); - model = BinaryData.fromObject(model).toObject(AzureEntityResource.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AzureResourceSkuInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AzureResourceSkuInnerTests.java deleted file mode 100644 index 067d41476821d..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AzureResourceSkuInnerTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.AzureResourceSkuInner; -import com.azure.resourcemanager.synapse.models.AzureCapacity; -import com.azure.resourcemanager.synapse.models.AzureScaleType; -import com.azure.resourcemanager.synapse.models.AzureSku; -import com.azure.resourcemanager.synapse.models.SkuName; -import com.azure.resourcemanager.synapse.models.SkuSize; -import org.junit.jupiter.api.Assertions; - -public final class AzureResourceSkuInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureResourceSkuInner model = - BinaryData - .fromString( - "{\"resourceType\":\"pcmsplbyrrueqth\",\"sku\":{\"name\":\"Storage" - + " optimized\",\"capacity\":1745918799,\"size\":\"Extra" - + " small\"},\"capacity\":{\"scaleType\":\"none\",\"minimum\":1035435705,\"maximum\":806995622,\"default\":1214736566}}") - .toObject(AzureResourceSkuInner.class); - Assertions.assertEquals("pcmsplbyrrueqth", model.resourceType()); - Assertions.assertEquals(SkuName.STORAGE_OPTIMIZED, model.sku().name()); - Assertions.assertEquals(1745918799, model.sku().capacity()); - Assertions.assertEquals(SkuSize.EXTRA_SMALL, model.sku().size()); - Assertions.assertEquals(AzureScaleType.NONE, model.capacity().scaleType()); - Assertions.assertEquals(1035435705, model.capacity().minimum()); - Assertions.assertEquals(806995622, model.capacity().maximum()); - Assertions.assertEquals(1214736566, model.capacity().defaultProperty()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureResourceSkuInner model = - new AzureResourceSkuInner() - .withResourceType("pcmsplbyrrueqth") - .withSku( - new AzureSku() - .withName(SkuName.STORAGE_OPTIMIZED) - .withCapacity(1745918799) - .withSize(SkuSize.EXTRA_SMALL)) - .withCapacity( - new AzureCapacity() - .withScaleType(AzureScaleType.NONE) - .withMinimum(1035435705) - .withMaximum(806995622) - .withDefaultProperty(1214736566)); - model = BinaryData.fromObject(model).toObject(AzureResourceSkuInner.class); - Assertions.assertEquals("pcmsplbyrrueqth", model.resourceType()); - Assertions.assertEquals(SkuName.STORAGE_OPTIMIZED, model.sku().name()); - Assertions.assertEquals(1745918799, model.sku().capacity()); - Assertions.assertEquals(SkuSize.EXTRA_SMALL, model.sku().size()); - Assertions.assertEquals(AzureScaleType.NONE, model.capacity().scaleType()); - Assertions.assertEquals(1035435705, model.capacity().minimum()); - Assertions.assertEquals(806995622, model.capacity().maximum()); - Assertions.assertEquals(1214736566, model.capacity().defaultProperty()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AzureSkuTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AzureSkuTests.java deleted file mode 100644 index 526eadee2ddf6..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/AzureSkuTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.AzureSku; -import com.azure.resourcemanager.synapse.models.SkuName; -import com.azure.resourcemanager.synapse.models.SkuSize; -import org.junit.jupiter.api.Assertions; - -public final class AzureSkuTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureSku model = - BinaryData - .fromString("{\"name\":\"Compute optimized\",\"capacity\":1186548828,\"size\":\"Extra small\"}") - .toObject(AzureSku.class); - Assertions.assertEquals(SkuName.COMPUTE_OPTIMIZED, model.name()); - Assertions.assertEquals(1186548828, model.capacity()); - Assertions.assertEquals(SkuSize.EXTRA_SMALL, model.size()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureSku model = - new AzureSku().withName(SkuName.COMPUTE_OPTIMIZED).withCapacity(1186548828).withSize(SkuSize.EXTRA_SMALL); - model = BinaryData.fromObject(model).toObject(AzureSku.class); - Assertions.assertEquals(SkuName.COMPUTE_OPTIMIZED, model.name()); - Assertions.assertEquals(1186548828, model.capacity()); - Assertions.assertEquals(SkuSize.EXTRA_SMALL, model.size()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/BigDataPoolPatchInfoTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/BigDataPoolPatchInfoTests.java deleted file mode 100644 index 6b9bd4e0ad981..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/BigDataPoolPatchInfoTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.BigDataPoolPatchInfo; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class BigDataPoolPatchInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BigDataPoolPatchInfo model = - BinaryData.fromString("{\"tags\":{\"rsnm\":\"hppr\"}}").toObject(BigDataPoolPatchInfo.class); - Assertions.assertEquals("hppr", model.tags().get("rsnm")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BigDataPoolPatchInfo model = new BigDataPoolPatchInfo().withTags(mapOf("rsnm", "hppr")); - model = BinaryData.fromObject(model).toObject(BigDataPoolPatchInfo.class); - Assertions.assertEquals("hppr", model.tags().get("rsnm")); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/BigDataPoolResourceInfoInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/BigDataPoolResourceInfoInnerTests.java deleted file mode 100644 index 17cb0e3b1d841..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/BigDataPoolResourceInfoInnerTests.java +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.BigDataPoolResourceInfoInner; -import com.azure.resourcemanager.synapse.fluent.models.LibraryInfo; -import com.azure.resourcemanager.synapse.models.AutoPauseProperties; -import com.azure.resourcemanager.synapse.models.AutoScaleProperties; -import com.azure.resourcemanager.synapse.models.ConfigurationType; -import com.azure.resourcemanager.synapse.models.DynamicExecutorAllocation; -import com.azure.resourcemanager.synapse.models.LibraryRequirements; -import com.azure.resourcemanager.synapse.models.NodeSize; -import com.azure.resourcemanager.synapse.models.NodeSizeFamily; -import com.azure.resourcemanager.synapse.models.SparkConfigProperties; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class BigDataPoolResourceInfoInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BigDataPoolResourceInfoInner model = - BinaryData - .fromString( - "{\"properties\":{\"provisioningState\":\"e\",\"autoScale\":{\"minNodeCount\":2052127591,\"enabled\":true,\"maxNodeCount\":619135714},\"creationDate\":\"2021-01-05T00:16:17Z\",\"autoPause\":{\"delayInMinutes\":639795933,\"enabled\":false},\"isComputeIsolationEnabled\":false,\"isAutotuneEnabled\":false,\"sessionLevelPackagesEnabled\":false,\"cacheSize\":364204104,\"dynamicExecutorAllocation\":{\"enabled\":true,\"minExecutors\":1714927386,\"maxExecutors\":1816331305},\"sparkEventsFolder\":\"uqyrxpdl\",\"nodeCount\":1303034345,\"libraryRequirements\":{\"time\":\"2021-06-26T18:12:50Z\",\"content\":\"mjqfrddgamquhio\",\"filename\":\"sjuivfcdisyir\"},\"customLibraries\":[{\"name\":\"czexrxzbujrtrhqv\",\"path\":\"evkh\",\"containerName\":\"lnzonzlrpiqywn\",\"uploadedTimestamp\":\"2021-10-30T09:16:37Z\",\"type\":\"szcofizeht\",\"provisioningStatus\":\"gbjkvreljeamur\",\"creatorId\":\"mlovuanashcxl\"},{\"name\":\"jerbdkelvidizozs\",\"path\":\"ccxjm\",\"containerName\":\"fdgnwncypuuwwlt\",\"uploadedTimestamp\":\"2021-11-20T18:00Z\",\"type\":\"ctzenkeifzzhmkd\",\"provisioningStatus\":\"vflyhbxcu\",\"creatorId\":\"hxgsrboldfor\"},{\"name\":\"wjlvizbfhfov\",\"path\":\"cqpbtuo\",\"containerName\":\"eszabbelawumuas\",\"uploadedTimestamp\":\"2021-02-28T06:26:09Z\",\"type\":\"rrwoycqucwyhahn\",\"provisioningStatus\":\"drkywuhps\",\"creatorId\":\"uurutlwexxwlalni\"},{\"name\":\"zsrzpgepq\",\"path\":\"bb\",\"containerName\":\"pgdakchzyvli\",\"uploadedTimestamp\":\"2021-05-06T06:22:36Z\",\"type\":\"kcxk\",\"provisioningStatus\":\"bn\",\"creatorId\":\"ysux\"}],\"sparkConfigProperties\":{\"time\":\"2021-12-01T11:30:12Z\",\"content\":\"tvlwijpsttexoq\",\"filename\":\"wcyyufmhruncu\",\"configurationType\":\"Artifact\"},\"sparkVersion\":\"pkcdqzhlct\",\"defaultSparkLogFolder\":\"unqndyfpchrqb\",\"nodeSize\":\"Large\",\"nodeSizeFamily\":\"HardwareAcceleratedFPGA\",\"lastSucceededTimestamp\":\"2021-11-25T18:15:14Z\"},\"location\":\"gydcw\",\"tags\":{\"aubrjtloq\":\"jumvqqolihrraio\",\"rzpasccbiuimzdly\":\"fuojrngif\"},\"id\":\"dfqwmkyoq\",\"name\":\"fdvruz\",\"type\":\"lzo\"}") - .toObject(BigDataPoolResourceInfoInner.class); - Assertions.assertEquals("gydcw", model.location()); - Assertions.assertEquals("jumvqqolihrraio", model.tags().get("aubrjtloq")); - Assertions.assertEquals("e", model.provisioningState()); - Assertions.assertEquals(2052127591, model.autoScale().minNodeCount()); - Assertions.assertEquals(true, model.autoScale().enabled()); - Assertions.assertEquals(619135714, model.autoScale().maxNodeCount()); - Assertions.assertEquals(639795933, model.autoPause().delayInMinutes()); - Assertions.assertEquals(false, model.autoPause().enabled()); - Assertions.assertEquals(false, model.isComputeIsolationEnabled()); - Assertions.assertEquals(false, model.isAutotuneEnabled()); - Assertions.assertEquals(false, model.sessionLevelPackagesEnabled()); - Assertions.assertEquals(true, model.dynamicExecutorAllocation().enabled()); - Assertions.assertEquals(1714927386, model.dynamicExecutorAllocation().minExecutors()); - Assertions.assertEquals(1816331305, model.dynamicExecutorAllocation().maxExecutors()); - Assertions.assertEquals("uqyrxpdl", model.sparkEventsFolder()); - Assertions.assertEquals(1303034345, model.nodeCount()); - Assertions.assertEquals("mjqfrddgamquhio", model.libraryRequirements().content()); - Assertions.assertEquals("sjuivfcdisyir", model.libraryRequirements().filename()); - Assertions.assertEquals("czexrxzbujrtrhqv", model.customLibraries().get(0).name()); - Assertions.assertEquals("evkh", model.customLibraries().get(0).path()); - Assertions.assertEquals("lnzonzlrpiqywn", model.customLibraries().get(0).containerName()); - Assertions.assertEquals("szcofizeht", model.customLibraries().get(0).type()); - Assertions.assertEquals("tvlwijpsttexoq", model.sparkConfigProperties().content()); - Assertions.assertEquals("wcyyufmhruncu", model.sparkConfigProperties().filename()); - Assertions.assertEquals(ConfigurationType.ARTIFACT, model.sparkConfigProperties().configurationType()); - Assertions.assertEquals("pkcdqzhlct", model.sparkVersion()); - Assertions.assertEquals("unqndyfpchrqb", model.defaultSparkLogFolder()); - Assertions.assertEquals(NodeSize.LARGE, model.nodeSize()); - Assertions.assertEquals(NodeSizeFamily.HARDWARE_ACCELERATED_FPGA, model.nodeSizeFamily()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BigDataPoolResourceInfoInner model = - new BigDataPoolResourceInfoInner() - .withLocation("gydcw") - .withTags(mapOf("aubrjtloq", "jumvqqolihrraio", "rzpasccbiuimzdly", "fuojrngif")) - .withProvisioningState("e") - .withAutoScale( - new AutoScaleProperties() - .withMinNodeCount(2052127591) - .withEnabled(true) - .withMaxNodeCount(619135714)) - .withAutoPause(new AutoPauseProperties().withDelayInMinutes(639795933).withEnabled(false)) - .withIsComputeIsolationEnabled(false) - .withIsAutotuneEnabled(false) - .withSessionLevelPackagesEnabled(false) - .withDynamicExecutorAllocation( - new DynamicExecutorAllocation() - .withEnabled(true) - .withMinExecutors(1714927386) - .withMaxExecutors(1816331305)) - .withSparkEventsFolder("uqyrxpdl") - .withNodeCount(1303034345) - .withLibraryRequirements( - new LibraryRequirements().withContent("mjqfrddgamquhio").withFilename("sjuivfcdisyir")) - .withCustomLibraries( - Arrays - .asList( - new LibraryInfo() - .withName("czexrxzbujrtrhqv") - .withPath("evkh") - .withContainerName("lnzonzlrpiqywn") - .withType("szcofizeht"), - new LibraryInfo() - .withName("jerbdkelvidizozs") - .withPath("ccxjm") - .withContainerName("fdgnwncypuuwwlt") - .withType("ctzenkeifzzhmkd"), - new LibraryInfo() - .withName("wjlvizbfhfov") - .withPath("cqpbtuo") - .withContainerName("eszabbelawumuas") - .withType("rrwoycqucwyhahn"), - new LibraryInfo() - .withName("zsrzpgepq") - .withPath("bb") - .withContainerName("pgdakchzyvli") - .withType("kcxk"))) - .withSparkConfigProperties( - new SparkConfigProperties() - .withContent("tvlwijpsttexoq") - .withFilename("wcyyufmhruncu") - .withConfigurationType(ConfigurationType.ARTIFACT)) - .withSparkVersion("pkcdqzhlct") - .withDefaultSparkLogFolder("unqndyfpchrqb") - .withNodeSize(NodeSize.LARGE) - .withNodeSizeFamily(NodeSizeFamily.HARDWARE_ACCELERATED_FPGA); - model = BinaryData.fromObject(model).toObject(BigDataPoolResourceInfoInner.class); - Assertions.assertEquals("gydcw", model.location()); - Assertions.assertEquals("jumvqqolihrraio", model.tags().get("aubrjtloq")); - Assertions.assertEquals("e", model.provisioningState()); - Assertions.assertEquals(2052127591, model.autoScale().minNodeCount()); - Assertions.assertEquals(true, model.autoScale().enabled()); - Assertions.assertEquals(619135714, model.autoScale().maxNodeCount()); - Assertions.assertEquals(639795933, model.autoPause().delayInMinutes()); - Assertions.assertEquals(false, model.autoPause().enabled()); - Assertions.assertEquals(false, model.isComputeIsolationEnabled()); - Assertions.assertEquals(false, model.isAutotuneEnabled()); - Assertions.assertEquals(false, model.sessionLevelPackagesEnabled()); - Assertions.assertEquals(true, model.dynamicExecutorAllocation().enabled()); - Assertions.assertEquals(1714927386, model.dynamicExecutorAllocation().minExecutors()); - Assertions.assertEquals(1816331305, model.dynamicExecutorAllocation().maxExecutors()); - Assertions.assertEquals("uqyrxpdl", model.sparkEventsFolder()); - Assertions.assertEquals(1303034345, model.nodeCount()); - Assertions.assertEquals("mjqfrddgamquhio", model.libraryRequirements().content()); - Assertions.assertEquals("sjuivfcdisyir", model.libraryRequirements().filename()); - Assertions.assertEquals("czexrxzbujrtrhqv", model.customLibraries().get(0).name()); - Assertions.assertEquals("evkh", model.customLibraries().get(0).path()); - Assertions.assertEquals("lnzonzlrpiqywn", model.customLibraries().get(0).containerName()); - Assertions.assertEquals("szcofizeht", model.customLibraries().get(0).type()); - Assertions.assertEquals("tvlwijpsttexoq", model.sparkConfigProperties().content()); - Assertions.assertEquals("wcyyufmhruncu", model.sparkConfigProperties().filename()); - Assertions.assertEquals(ConfigurationType.ARTIFACT, model.sparkConfigProperties().configurationType()); - Assertions.assertEquals("pkcdqzhlct", model.sparkVersion()); - Assertions.assertEquals("unqndyfpchrqb", model.defaultSparkLogFolder()); - Assertions.assertEquals(NodeSize.LARGE, model.nodeSize()); - Assertions.assertEquals(NodeSizeFamily.HARDWARE_ACCELERATED_FPGA, model.nodeSizeFamily()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/BigDataPoolResourceInfoListResultTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/BigDataPoolResourceInfoListResultTests.java deleted file mode 100644 index e93f7c5a14e38..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/BigDataPoolResourceInfoListResultTests.java +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.BigDataPoolResourceInfoInner; -import com.azure.resourcemanager.synapse.models.BigDataPoolResourceInfoListResult; -import com.azure.resourcemanager.synapse.models.NodeSize; -import com.azure.resourcemanager.synapse.models.NodeSizeFamily; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class BigDataPoolResourceInfoListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BigDataPoolResourceInfoListResult model = - BinaryData - .fromString( - "{\"nextLink\":\"ayzejnhlbkpbz\",\"value\":[{\"properties\":{\"provisioningState\":\"jh\",\"creationDate\":\"2021-11-24T03:49:25Z\",\"isComputeIsolationEnabled\":false,\"isAutotuneEnabled\":false,\"sessionLevelPackagesEnabled\":true,\"cacheSize\":320038857,\"sparkEventsFolder\":\"olewjwi\",\"nodeCount\":1773241461,\"customLibraries\":[],\"sparkVersion\":\"sfapaqtferrq\",\"defaultSparkLogFolder\":\"x\",\"nodeSize\":\"XXXLarge\",\"nodeSizeFamily\":\"None\",\"lastSucceededTimestamp\":\"2021-11-03T09:57:06Z\"},\"location\":\"jwogqqnobpudc\",\"tags\":{\"bzasqbucljgkyexa\":\"tqwpwya\",\"dsdaultxijjumf\":\"guyaip\",\"nqnm\":\"waz\",\"qdqx\":\"jng\"},\"id\":\"bjwgnyfus\",\"name\":\"zsvtuikzhajqgl\",\"type\":\"fh\"},{\"properties\":{\"provisioningState\":\"qryxyn\",\"creationDate\":\"2021-09-26T14:22:07Z\",\"isComputeIsolationEnabled\":true,\"isAutotuneEnabled\":false,\"sessionLevelPackagesEnabled\":true,\"cacheSize\":569967866,\"sparkEventsFolder\":\"goeiybbabpfhvfsl\",\"nodeCount\":1073753139,\"customLibraries\":[],\"sparkVersion\":\"igjkskyrio\",\"defaultSparkLogFolder\":\"zid\",\"nodeSize\":\"XXXLarge\",\"nodeSizeFamily\":\"HardwareAcceleratedGPU\",\"lastSucceededTimestamp\":\"2021-06-03T04:19:09Z\"},\"location\":\"mifrygznmma\",\"tags\":{\"ieixynllxe\":\"zkzobgopxlhslnel\",\"u\":\"wcrojphslhcaw\"},\"id\":\"i\",\"name\":\"dwfmvigorqjb\",\"type\":\"tzh\"},{\"properties\":{\"provisioningState\":\"lkafhonqjuje\",\"creationDate\":\"2021-03-08T01:24:12Z\",\"isComputeIsolationEnabled\":false,\"isAutotuneEnabled\":false,\"sessionLevelPackagesEnabled\":true,\"cacheSize\":1711533455,\"sparkEventsFolder\":\"wcltyjede\",\"nodeCount\":1626288503,\"customLibraries\":[],\"sparkVersion\":\"qscazuawxtz\",\"defaultSparkLogFolder\":\"uamwabzxrvxc\",\"nodeSize\":\"XXXLarge\",\"nodeSizeFamily\":\"None\",\"lastSucceededTimestamp\":\"2021-07-14T13:30:43Z\"},\"location\":\"ivmxyasfl\",\"tags\":{\"ihknsmjbl\":\"gzwywak\",\"ryuzcbmqqv\":\"ljhlnymzotq\",\"fgtayxonsup\":\"mv\",\"oibgsxg\":\"ujlzqnhcvsqltn\"},\"id\":\"xfyqonmpqoxwdo\",\"name\":\"dbxiqx\",\"type\":\"iiqbi\"}]}") - .toObject(BigDataPoolResourceInfoListResult.class); - Assertions.assertEquals("ayzejnhlbkpbz", model.nextLink()); - Assertions.assertEquals("jwogqqnobpudc", model.value().get(0).location()); - Assertions.assertEquals("tqwpwya", model.value().get(0).tags().get("bzasqbucljgkyexa")); - Assertions.assertEquals("jh", model.value().get(0).provisioningState()); - Assertions.assertEquals(false, model.value().get(0).isComputeIsolationEnabled()); - Assertions.assertEquals(false, model.value().get(0).isAutotuneEnabled()); - Assertions.assertEquals(true, model.value().get(0).sessionLevelPackagesEnabled()); - Assertions.assertEquals("olewjwi", model.value().get(0).sparkEventsFolder()); - Assertions.assertEquals(1773241461, model.value().get(0).nodeCount()); - Assertions.assertEquals("sfapaqtferrq", model.value().get(0).sparkVersion()); - Assertions.assertEquals("x", model.value().get(0).defaultSparkLogFolder()); - Assertions.assertEquals(NodeSize.XXXLARGE, model.value().get(0).nodeSize()); - Assertions.assertEquals(NodeSizeFamily.NONE, model.value().get(0).nodeSizeFamily()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BigDataPoolResourceInfoListResult model = - new BigDataPoolResourceInfoListResult() - .withNextLink("ayzejnhlbkpbz") - .withValue( - Arrays - .asList( - new BigDataPoolResourceInfoInner() - .withLocation("jwogqqnobpudc") - .withTags( - mapOf( - "bzasqbucljgkyexa", - "tqwpwya", - "dsdaultxijjumf", - "guyaip", - "nqnm", - "waz", - "qdqx", - "jng")) - .withProvisioningState("jh") - .withIsComputeIsolationEnabled(false) - .withIsAutotuneEnabled(false) - .withSessionLevelPackagesEnabled(true) - .withSparkEventsFolder("olewjwi") - .withNodeCount(1773241461) - .withCustomLibraries(Arrays.asList()) - .withSparkVersion("sfapaqtferrq") - .withDefaultSparkLogFolder("x") - .withNodeSize(NodeSize.XXXLARGE) - .withNodeSizeFamily(NodeSizeFamily.NONE), - new BigDataPoolResourceInfoInner() - .withLocation("mifrygznmma") - .withTags(mapOf("ieixynllxe", "zkzobgopxlhslnel", "u", "wcrojphslhcaw")) - .withProvisioningState("qryxyn") - .withIsComputeIsolationEnabled(true) - .withIsAutotuneEnabled(false) - .withSessionLevelPackagesEnabled(true) - .withSparkEventsFolder("goeiybbabpfhvfsl") - .withNodeCount(1073753139) - .withCustomLibraries(Arrays.asList()) - .withSparkVersion("igjkskyrio") - .withDefaultSparkLogFolder("zid") - .withNodeSize(NodeSize.XXXLARGE) - .withNodeSizeFamily(NodeSizeFamily.HARDWARE_ACCELERATED_GPU), - new BigDataPoolResourceInfoInner() - .withLocation("ivmxyasfl") - .withTags( - mapOf( - "ihknsmjbl", - "gzwywak", - "ryuzcbmqqv", - "ljhlnymzotq", - "fgtayxonsup", - "mv", - "oibgsxg", - "ujlzqnhcvsqltn")) - .withProvisioningState("lkafhonqjuje") - .withIsComputeIsolationEnabled(false) - .withIsAutotuneEnabled(false) - .withSessionLevelPackagesEnabled(true) - .withSparkEventsFolder("wcltyjede") - .withNodeCount(1626288503) - .withCustomLibraries(Arrays.asList()) - .withSparkVersion("qscazuawxtz") - .withDefaultSparkLogFolder("uamwabzxrvxc") - .withNodeSize(NodeSize.XXXLARGE) - .withNodeSizeFamily(NodeSizeFamily.NONE))); - model = BinaryData.fromObject(model).toObject(BigDataPoolResourceInfoListResult.class); - Assertions.assertEquals("ayzejnhlbkpbz", model.nextLink()); - Assertions.assertEquals("jwogqqnobpudc", model.value().get(0).location()); - Assertions.assertEquals("tqwpwya", model.value().get(0).tags().get("bzasqbucljgkyexa")); - Assertions.assertEquals("jh", model.value().get(0).provisioningState()); - Assertions.assertEquals(false, model.value().get(0).isComputeIsolationEnabled()); - Assertions.assertEquals(false, model.value().get(0).isAutotuneEnabled()); - Assertions.assertEquals(true, model.value().get(0).sessionLevelPackagesEnabled()); - Assertions.assertEquals("olewjwi", model.value().get(0).sparkEventsFolder()); - Assertions.assertEquals(1773241461, model.value().get(0).nodeCount()); - Assertions.assertEquals("sfapaqtferrq", model.value().get(0).sparkVersion()); - Assertions.assertEquals("x", model.value().get(0).defaultSparkLogFolder()); - Assertions.assertEquals(NodeSize.XXXLARGE, model.value().get(0).nodeSize()); - Assertions.assertEquals(NodeSizeFamily.NONE, model.value().get(0).nodeSizeFamily()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/BigDataPoolResourcePropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/BigDataPoolResourcePropertiesTests.java deleted file mode 100644 index ff94f082cfbb9..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/BigDataPoolResourcePropertiesTests.java +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.BigDataPoolResourceProperties; -import com.azure.resourcemanager.synapse.fluent.models.LibraryInfo; -import com.azure.resourcemanager.synapse.models.AutoPauseProperties; -import com.azure.resourcemanager.synapse.models.AutoScaleProperties; -import com.azure.resourcemanager.synapse.models.ConfigurationType; -import com.azure.resourcemanager.synapse.models.DynamicExecutorAllocation; -import com.azure.resourcemanager.synapse.models.LibraryRequirements; -import com.azure.resourcemanager.synapse.models.NodeSize; -import com.azure.resourcemanager.synapse.models.NodeSizeFamily; -import com.azure.resourcemanager.synapse.models.SparkConfigProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class BigDataPoolResourcePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BigDataPoolResourceProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"pctf\",\"autoScale\":{\"minNodeCount\":585208607,\"enabled\":true,\"maxNodeCount\":352780430},\"creationDate\":\"2020-12-22T17:50:01Z\",\"autoPause\":{\"delayInMinutes\":1282016388,\"enabled\":true},\"isComputeIsolationEnabled\":false,\"isAutotuneEnabled\":true,\"sessionLevelPackagesEnabled\":true,\"cacheSize\":404369728,\"dynamicExecutorAllocation\":{\"enabled\":false,\"minExecutors\":1099098499,\"maxExecutors\":698820955},\"sparkEventsFolder\":\"pphoj\",\"nodeCount\":474168225,\"libraryRequirements\":{\"time\":\"2021-01-01T12:47:11Z\",\"content\":\"sgzfczbg\",\"filename\":\"fgbegl\"},\"customLibraries\":[{\"name\":\"o\",\"path\":\"betnluankrrfxee\",\"containerName\":\"tijv\",\"uploadedTimestamp\":\"2021-02-01T20:32:36Z\",\"type\":\"mq\",\"provisioningStatus\":\"qqxlajr\",\"creatorId\":\"xaceve\"},{\"name\":\"kuyxoafg\",\"path\":\"qltfaey\",\"containerName\":\"nm\",\"uploadedTimestamp\":\"2021-02-15T15:51:36Z\",\"type\":\"irpghriypoqeyh\",\"provisioningStatus\":\"h\",\"creatorId\":\"prlpy\"},{\"name\":\"uciqdsme\",\"path\":\"itdfuxtyasiib\",\"containerName\":\"ybnnustg\",\"uploadedTimestamp\":\"2021-05-02T07:22:39Z\",\"type\":\"nmgixh\",\"provisioningStatus\":\"avmqfoudor\",\"creatorId\":\"gyyprotwy\"},{\"name\":\"ndm\",\"path\":\"hu\",\"containerName\":\"mjkavlgorbmft\",\"uploadedTimestamp\":\"2021-05-15T15:16:26Z\",\"type\":\"zfjltfvnzcyjto\",\"provisioningStatus\":\"vopvp\",\"creatorId\":\"bzqgqqi\"}],\"sparkConfigProperties\":{\"time\":\"2021-09-18T06:49:03Z\",\"content\":\"qwthmky\",\"filename\":\"cysihs\",\"configurationType\":\"File\"},\"sparkVersion\":\"dhohsdtmcdzsuf\",\"defaultSparkLogFolder\":\"hdxbzlm\",\"nodeSize\":\"XLarge\",\"nodeSizeFamily\":\"HardwareAcceleratedGPU\",\"lastSucceededTimestamp\":\"2021-11-13T23:35:42Z\"}") - .toObject(BigDataPoolResourceProperties.class); - Assertions.assertEquals("pctf", model.provisioningState()); - Assertions.assertEquals(585208607, model.autoScale().minNodeCount()); - Assertions.assertEquals(true, model.autoScale().enabled()); - Assertions.assertEquals(352780430, model.autoScale().maxNodeCount()); - Assertions.assertEquals(1282016388, model.autoPause().delayInMinutes()); - Assertions.assertEquals(true, model.autoPause().enabled()); - Assertions.assertEquals(false, model.isComputeIsolationEnabled()); - Assertions.assertEquals(true, model.isAutotuneEnabled()); - Assertions.assertEquals(true, model.sessionLevelPackagesEnabled()); - Assertions.assertEquals(false, model.dynamicExecutorAllocation().enabled()); - Assertions.assertEquals(1099098499, model.dynamicExecutorAllocation().minExecutors()); - Assertions.assertEquals(698820955, model.dynamicExecutorAllocation().maxExecutors()); - Assertions.assertEquals("pphoj", model.sparkEventsFolder()); - Assertions.assertEquals(474168225, model.nodeCount()); - Assertions.assertEquals("sgzfczbg", model.libraryRequirements().content()); - Assertions.assertEquals("fgbegl", model.libraryRequirements().filename()); - Assertions.assertEquals("o", model.customLibraries().get(0).name()); - Assertions.assertEquals("betnluankrrfxee", model.customLibraries().get(0).path()); - Assertions.assertEquals("tijv", model.customLibraries().get(0).containerName()); - Assertions.assertEquals("mq", model.customLibraries().get(0).type()); - Assertions.assertEquals("qwthmky", model.sparkConfigProperties().content()); - Assertions.assertEquals("cysihs", model.sparkConfigProperties().filename()); - Assertions.assertEquals(ConfigurationType.FILE, model.sparkConfigProperties().configurationType()); - Assertions.assertEquals("dhohsdtmcdzsuf", model.sparkVersion()); - Assertions.assertEquals("hdxbzlm", model.defaultSparkLogFolder()); - Assertions.assertEquals(NodeSize.XLARGE, model.nodeSize()); - Assertions.assertEquals(NodeSizeFamily.HARDWARE_ACCELERATED_GPU, model.nodeSizeFamily()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BigDataPoolResourceProperties model = - new BigDataPoolResourceProperties() - .withProvisioningState("pctf") - .withAutoScale( - new AutoScaleProperties().withMinNodeCount(585208607).withEnabled(true).withMaxNodeCount(352780430)) - .withAutoPause(new AutoPauseProperties().withDelayInMinutes(1282016388).withEnabled(true)) - .withIsComputeIsolationEnabled(false) - .withIsAutotuneEnabled(true) - .withSessionLevelPackagesEnabled(true) - .withDynamicExecutorAllocation( - new DynamicExecutorAllocation() - .withEnabled(false) - .withMinExecutors(1099098499) - .withMaxExecutors(698820955)) - .withSparkEventsFolder("pphoj") - .withNodeCount(474168225) - .withLibraryRequirements(new LibraryRequirements().withContent("sgzfczbg").withFilename("fgbegl")) - .withCustomLibraries( - Arrays - .asList( - new LibraryInfo() - .withName("o") - .withPath("betnluankrrfxee") - .withContainerName("tijv") - .withType("mq"), - new LibraryInfo() - .withName("kuyxoafg") - .withPath("qltfaey") - .withContainerName("nm") - .withType("irpghriypoqeyh"), - new LibraryInfo() - .withName("uciqdsme") - .withPath("itdfuxtyasiib") - .withContainerName("ybnnustg") - .withType("nmgixh"), - new LibraryInfo() - .withName("ndm") - .withPath("hu") - .withContainerName("mjkavlgorbmft") - .withType("zfjltfvnzcyjto"))) - .withSparkConfigProperties( - new SparkConfigProperties() - .withContent("qwthmky") - .withFilename("cysihs") - .withConfigurationType(ConfigurationType.FILE)) - .withSparkVersion("dhohsdtmcdzsuf") - .withDefaultSparkLogFolder("hdxbzlm") - .withNodeSize(NodeSize.XLARGE) - .withNodeSizeFamily(NodeSizeFamily.HARDWARE_ACCELERATED_GPU); - model = BinaryData.fromObject(model).toObject(BigDataPoolResourceProperties.class); - Assertions.assertEquals("pctf", model.provisioningState()); - Assertions.assertEquals(585208607, model.autoScale().minNodeCount()); - Assertions.assertEquals(true, model.autoScale().enabled()); - Assertions.assertEquals(352780430, model.autoScale().maxNodeCount()); - Assertions.assertEquals(1282016388, model.autoPause().delayInMinutes()); - Assertions.assertEquals(true, model.autoPause().enabled()); - Assertions.assertEquals(false, model.isComputeIsolationEnabled()); - Assertions.assertEquals(true, model.isAutotuneEnabled()); - Assertions.assertEquals(true, model.sessionLevelPackagesEnabled()); - Assertions.assertEquals(false, model.dynamicExecutorAllocation().enabled()); - Assertions.assertEquals(1099098499, model.dynamicExecutorAllocation().minExecutors()); - Assertions.assertEquals(698820955, model.dynamicExecutorAllocation().maxExecutors()); - Assertions.assertEquals("pphoj", model.sparkEventsFolder()); - Assertions.assertEquals(474168225, model.nodeCount()); - Assertions.assertEquals("sgzfczbg", model.libraryRequirements().content()); - Assertions.assertEquals("fgbegl", model.libraryRequirements().filename()); - Assertions.assertEquals("o", model.customLibraries().get(0).name()); - Assertions.assertEquals("betnluankrrfxee", model.customLibraries().get(0).path()); - Assertions.assertEquals("tijv", model.customLibraries().get(0).containerName()); - Assertions.assertEquals("mq", model.customLibraries().get(0).type()); - Assertions.assertEquals("qwthmky", model.sparkConfigProperties().content()); - Assertions.assertEquals("cysihs", model.sparkConfigProperties().filename()); - Assertions.assertEquals(ConfigurationType.FILE, model.sparkConfigProperties().configurationType()); - Assertions.assertEquals("dhohsdtmcdzsuf", model.sparkVersion()); - Assertions.assertEquals("hdxbzlm", model.defaultSparkLogFolder()); - Assertions.assertEquals(NodeSize.XLARGE, model.nodeSize()); - Assertions.assertEquals(NodeSizeFamily.HARDWARE_ACCELERATED_GPU, model.nodeSizeFamily()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsCreateOrUpdateMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsCreateOrUpdateMockTests.java deleted file mode 100644 index 9697905dee6ed..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,148 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.AutoPauseProperties; -import com.azure.resourcemanager.synapse.models.AutoScaleProperties; -import com.azure.resourcemanager.synapse.models.BigDataPoolResourceInfo; -import com.azure.resourcemanager.synapse.models.ConfigurationType; -import com.azure.resourcemanager.synapse.models.DynamicExecutorAllocation; -import com.azure.resourcemanager.synapse.models.LibraryRequirements; -import com.azure.resourcemanager.synapse.models.NodeSize; -import com.azure.resourcemanager.synapse.models.NodeSizeFamily; -import com.azure.resourcemanager.synapse.models.SparkConfigProperties; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BigDataPoolsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"autoScale\":{\"minNodeCount\":985648973,\"enabled\":true,\"maxNodeCount\":1004177849},\"creationDate\":\"2021-05-07T09:49:36Z\",\"autoPause\":{\"delayInMinutes\":26783847,\"enabled\":false},\"isComputeIsolationEnabled\":false,\"isAutotuneEnabled\":false,\"sessionLevelPackagesEnabled\":false,\"cacheSize\":880047238,\"dynamicExecutorAllocation\":{\"enabled\":true,\"minExecutors\":876002990,\"maxExecutors\":21089033},\"sparkEventsFolder\":\"tkutnjil\",\"nodeCount\":1110899441,\"libraryRequirements\":{\"time\":\"2021-06-03T08:07:55Z\",\"content\":\"yhtmjoduif\",\"filename\":\"lxfary\"},\"customLibraries\":[],\"sparkConfigProperties\":{\"time\":\"2021-05-20T15:40Z\",\"content\":\"zvj\",\"filename\":\"ahoyiyaxqvj\",\"configurationType\":\"File\"},\"sparkVersion\":\"tcz\",\"defaultSparkLogFolder\":\"dn\",\"nodeSize\":\"XXXLarge\",\"nodeSizeFamily\":\"None\",\"lastSucceededTimestamp\":\"2021-02-26T05:46:20Z\"},\"location\":\"bmdqrxyglae\",\"tags\":{\"riefoo\":\"flwtjdt\",\"dudgcozzomeh\":\"ycuxdtzcqip\",\"juxkqll\":\"lantolamlb\"},\"id\":\"z\",\"name\":\"pvwdtgckzdqiq\",\"type\":\"lrat\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - BigDataPoolResourceInfo response = - manager - .bigDataPools() - .define("afofu") - .withRegion("wfldsiuorinik") - .withExistingWorkspace("hnzrsbkkzovlzdm", "fmfws") - .withTags(mapOf("iwm", "pks")) - .withProvisioningState("immovzwd") - .withAutoScale( - new AutoScaleProperties() - .withMinNodeCount(1674817788) - .withEnabled(false) - .withMaxNodeCount(1123352219)) - .withAutoPause(new AutoPauseProperties().withDelayInMinutes(960263436).withEnabled(true)) - .withIsComputeIsolationEnabled(false) - .withIsAutotuneEnabled(false) - .withSessionLevelPackagesEnabled(false) - .withDynamicExecutorAllocation( - new DynamicExecutorAllocation() - .withEnabled(true) - .withMinExecutors(420672272) - .withMaxExecutors(1302381284)) - .withSparkEventsFolder("aq") - .withNodeCount(806621998) - .withLibraryRequirements(new LibraryRequirements().withContent("qoq").withFilename("movsfbpbvz")) - .withCustomLibraries(Arrays.asList()) - .withSparkConfigProperties( - new SparkConfigProperties() - .withContent("vsmcwo") - .withFilename("axdtnqif") - .withConfigurationType(ConfigurationType.FILE)) - .withSparkVersion("roiauesugmo") - .withDefaultSparkLogFolder("cjycb") - .withNodeSize(NodeSize.XLARGE) - .withNodeSizeFamily(NodeSizeFamily.HARDWARE_ACCELERATED_FPGA) - .withForce(false) - .create(); - - Assertions.assertEquals("bmdqrxyglae", response.location()); - Assertions.assertEquals("flwtjdt", response.tags().get("riefoo")); - Assertions.assertEquals("Succeeded", response.provisioningState()); - Assertions.assertEquals(985648973, response.autoScale().minNodeCount()); - Assertions.assertEquals(true, response.autoScale().enabled()); - Assertions.assertEquals(1004177849, response.autoScale().maxNodeCount()); - Assertions.assertEquals(26783847, response.autoPause().delayInMinutes()); - Assertions.assertEquals(false, response.autoPause().enabled()); - Assertions.assertEquals(false, response.isComputeIsolationEnabled()); - Assertions.assertEquals(false, response.isAutotuneEnabled()); - Assertions.assertEquals(false, response.sessionLevelPackagesEnabled()); - Assertions.assertEquals(true, response.dynamicExecutorAllocation().enabled()); - Assertions.assertEquals(876002990, response.dynamicExecutorAllocation().minExecutors()); - Assertions.assertEquals(21089033, response.dynamicExecutorAllocation().maxExecutors()); - Assertions.assertEquals("tkutnjil", response.sparkEventsFolder()); - Assertions.assertEquals(1110899441, response.nodeCount()); - Assertions.assertEquals("yhtmjoduif", response.libraryRequirements().content()); - Assertions.assertEquals("lxfary", response.libraryRequirements().filename()); - Assertions.assertEquals("zvj", response.sparkConfigProperties().content()); - Assertions.assertEquals("ahoyiyaxqvj", response.sparkConfigProperties().filename()); - Assertions.assertEquals(ConfigurationType.FILE, response.sparkConfigProperties().configurationType()); - Assertions.assertEquals("tcz", response.sparkVersion()); - Assertions.assertEquals("dn", response.defaultSparkLogFolder()); - Assertions.assertEquals(NodeSize.XXXLARGE, response.nodeSize()); - Assertions.assertEquals(NodeSizeFamily.NONE, response.nodeSizeFamily()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsDeleteMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsDeleteMockTests.java deleted file mode 100644 index bbf1189f864c2..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsDeleteMockTests.java +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.BigDataPoolResourceInfo; -import com.azure.resourcemanager.synapse.models.ConfigurationType; -import com.azure.resourcemanager.synapse.models.NodeSize; -import com.azure.resourcemanager.synapse.models.NodeSizeFamily; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BigDataPoolsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"Succeeded\",\"autoScale\":{\"minNodeCount\":1849214480,\"enabled\":false,\"maxNodeCount\":1305807197},\"creationDate\":\"2021-06-14T14:12:10Z\",\"autoPause\":{\"delayInMinutes\":722501870,\"enabled\":true},\"isComputeIsolationEnabled\":false,\"isAutotuneEnabled\":false,\"sessionLevelPackagesEnabled\":false,\"cacheSize\":1339035720,\"dynamicExecutorAllocation\":{\"enabled\":false,\"minExecutors\":585595148,\"maxExecutors\":1104081037},\"sparkEventsFolder\":\"xrdfddtu\",\"nodeCount\":1027095078,\"libraryRequirements\":{\"time\":\"2021-10-02T21:47:41Z\",\"content\":\"czcxdfw\",\"filename\":\"pyfml\"},\"customLibraries\":[],\"sparkConfigProperties\":{\"time\":\"2021-11-16T18:58:57Z\",\"content\":\"aspiflei\",\"filename\":\"x\",\"configurationType\":\"Artifact\"},\"sparkVersion\":\"gicehfgsmdr\",\"defaultSparkLogFolder\":\"qbpxt\",\"nodeSize\":\"Small\",\"nodeSizeFamily\":\"HardwareAcceleratedGPU\",\"lastSucceededTimestamp\":\"2021-11-09T19:32:01Z\"},\"location\":\"np\",\"tags\":{\"tyyqiprcltungb\":\"f\",\"kmii\":\"olj\",\"iiqqcqikclsmalns\":\"zbkuckgkdsksw\"},\"id\":\"woykdnonaaxwm\",\"name\":\"zrujlqcwnyn\",\"type\":\"lei\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - BigDataPoolResourceInfo response = - manager.bigDataPools().delete("kftbaewhte", "loamfmxtllfltym", "cn", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("np", response.location()); - Assertions.assertEquals("f", response.tags().get("tyyqiprcltungb")); - Assertions.assertEquals("Succeeded", response.provisioningState()); - Assertions.assertEquals(1849214480, response.autoScale().minNodeCount()); - Assertions.assertEquals(false, response.autoScale().enabled()); - Assertions.assertEquals(1305807197, response.autoScale().maxNodeCount()); - Assertions.assertEquals(722501870, response.autoPause().delayInMinutes()); - Assertions.assertEquals(true, response.autoPause().enabled()); - Assertions.assertEquals(false, response.isComputeIsolationEnabled()); - Assertions.assertEquals(false, response.isAutotuneEnabled()); - Assertions.assertEquals(false, response.sessionLevelPackagesEnabled()); - Assertions.assertEquals(false, response.dynamicExecutorAllocation().enabled()); - Assertions.assertEquals(585595148, response.dynamicExecutorAllocation().minExecutors()); - Assertions.assertEquals(1104081037, response.dynamicExecutorAllocation().maxExecutors()); - Assertions.assertEquals("xrdfddtu", response.sparkEventsFolder()); - Assertions.assertEquals(1027095078, response.nodeCount()); - Assertions.assertEquals("czcxdfw", response.libraryRequirements().content()); - Assertions.assertEquals("pyfml", response.libraryRequirements().filename()); - Assertions.assertEquals("aspiflei", response.sparkConfigProperties().content()); - Assertions.assertEquals("x", response.sparkConfigProperties().filename()); - Assertions.assertEquals(ConfigurationType.ARTIFACT, response.sparkConfigProperties().configurationType()); - Assertions.assertEquals("gicehfgsmdr", response.sparkVersion()); - Assertions.assertEquals("qbpxt", response.defaultSparkLogFolder()); - Assertions.assertEquals(NodeSize.SMALL, response.nodeSize()); - Assertions.assertEquals(NodeSizeFamily.HARDWARE_ACCELERATED_GPU, response.nodeSizeFamily()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsGetWithResponseMockTests.java deleted file mode 100644 index 67c15508105be..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsGetWithResponseMockTests.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.BigDataPoolResourceInfo; -import com.azure.resourcemanager.synapse.models.ConfigurationType; -import com.azure.resourcemanager.synapse.models.NodeSize; -import com.azure.resourcemanager.synapse.models.NodeSizeFamily; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BigDataPoolsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"fqi\",\"autoScale\":{\"minNodeCount\":1741595014,\"enabled\":false,\"maxNodeCount\":1389523048},\"creationDate\":\"2021-11-10T23:03:02Z\",\"autoPause\":{\"delayInMinutes\":2102268452,\"enabled\":true},\"isComputeIsolationEnabled\":false,\"isAutotuneEnabled\":true,\"sessionLevelPackagesEnabled\":true,\"cacheSize\":2061594918,\"dynamicExecutorAllocation\":{\"enabled\":false,\"minExecutors\":1265513467,\"maxExecutors\":1929102863},\"sparkEventsFolder\":\"cttgzkjt\",\"nodeCount\":84412621,\"libraryRequirements\":{\"time\":\"2021-07-27T06:31:22Z\",\"content\":\"egh\",\"filename\":\"ldsvc\"},\"customLibraries\":[],\"sparkConfigProperties\":{\"time\":\"2021-03-01T16:47:44Z\",\"content\":\"qymjzucwwmejjqhd\",\"filename\":\"vmqxi\",\"configurationType\":\"File\"},\"sparkVersion\":\"yfozkbnzxbypfqp\",\"defaultSparkLogFolder\":\"ixwrgrk\",\"nodeSize\":\"Large\",\"nodeSizeFamily\":\"HardwareAcceleratedFPGA\",\"lastSucceededTimestamp\":\"2021-12-05T10:03:37Z\"},\"location\":\"wqikwepwogggic\",\"tags\":{\"zpgf\":\"htfmcqbsudzpgc\",\"dkynrceqa\":\"umjdjxhzghg\",\"naj\":\"fdbdfmmxj\",\"oqdejkluxxr\":\"opjyyqmkwlhvcw\"},\"id\":\"zobuzmsxgamtdtk\",\"name\":\"ppthuzdprmimrl\",\"type\":\"dpoqfxyem\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - BigDataPoolResourceInfo response = - manager - .bigDataPools() - .getWithResponse("udbkuwpzq", "lcwe", "kfecjvxf", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("wqikwepwogggic", response.location()); - Assertions.assertEquals("htfmcqbsudzpgc", response.tags().get("zpgf")); - Assertions.assertEquals("fqi", response.provisioningState()); - Assertions.assertEquals(1741595014, response.autoScale().minNodeCount()); - Assertions.assertEquals(false, response.autoScale().enabled()); - Assertions.assertEquals(1389523048, response.autoScale().maxNodeCount()); - Assertions.assertEquals(2102268452, response.autoPause().delayInMinutes()); - Assertions.assertEquals(true, response.autoPause().enabled()); - Assertions.assertEquals(false, response.isComputeIsolationEnabled()); - Assertions.assertEquals(true, response.isAutotuneEnabled()); - Assertions.assertEquals(true, response.sessionLevelPackagesEnabled()); - Assertions.assertEquals(false, response.dynamicExecutorAllocation().enabled()); - Assertions.assertEquals(1265513467, response.dynamicExecutorAllocation().minExecutors()); - Assertions.assertEquals(1929102863, response.dynamicExecutorAllocation().maxExecutors()); - Assertions.assertEquals("cttgzkjt", response.sparkEventsFolder()); - Assertions.assertEquals(84412621, response.nodeCount()); - Assertions.assertEquals("egh", response.libraryRequirements().content()); - Assertions.assertEquals("ldsvc", response.libraryRequirements().filename()); - Assertions.assertEquals("qymjzucwwmejjqhd", response.sparkConfigProperties().content()); - Assertions.assertEquals("vmqxi", response.sparkConfigProperties().filename()); - Assertions.assertEquals(ConfigurationType.FILE, response.sparkConfigProperties().configurationType()); - Assertions.assertEquals("yfozkbnzxbypfqp", response.sparkVersion()); - Assertions.assertEquals("ixwrgrk", response.defaultSparkLogFolder()); - Assertions.assertEquals(NodeSize.LARGE, response.nodeSize()); - Assertions.assertEquals(NodeSizeFamily.HARDWARE_ACCELERATED_FPGA, response.nodeSizeFamily()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsListByWorkspaceMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsListByWorkspaceMockTests.java deleted file mode 100644 index 863401310b3a8..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/BigDataPoolsListByWorkspaceMockTests.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.BigDataPoolResourceInfo; -import com.azure.resourcemanager.synapse.models.ConfigurationType; -import com.azure.resourcemanager.synapse.models.NodeSize; -import com.azure.resourcemanager.synapse.models.NodeSizeFamily; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BigDataPoolsListByWorkspaceMockTests { - @Test - public void testListByWorkspace() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"uvjhxmnrqstjc\",\"autoScale\":{\"minNodeCount\":349818575,\"enabled\":false,\"maxNodeCount\":20482320},\"creationDate\":\"2021-01-07T08:16:32Z\",\"autoPause\":{\"delayInMinutes\":1842363515,\"enabled\":true},\"isComputeIsolationEnabled\":true,\"isAutotuneEnabled\":true,\"sessionLevelPackagesEnabled\":false,\"cacheSize\":1379408625,\"dynamicExecutorAllocation\":{\"enabled\":false,\"minExecutors\":998671671,\"maxExecutors\":1528855768},\"sparkEventsFolder\":\"dsvmwbitekdtf\",\"nodeCount\":1288145851,\"libraryRequirements\":{\"time\":\"2021-07-23T16:06:56Z\",\"content\":\"x\",\"filename\":\"chgy\"},\"customLibraries\":[],\"sparkConfigProperties\":{\"time\":\"2021-08-20T05:15:16Z\",\"content\":\"ivycpzcvdi\",\"filename\":\"lrqtbhtrezp\",\"configurationType\":\"Artifact\"},\"sparkVersion\":\"yfmx\",\"defaultSparkLogFolder\":\"utzfkgilnoudc\",\"nodeSize\":\"Large\",\"nodeSizeFamily\":\"HardwareAcceleratedFPGA\",\"lastSucceededTimestamp\":\"2021-07-21T08:25:46Z\"},\"location\":\"prigg\",\"tags\":{\"flqjfshtu\":\"eqfcbuulpy\",\"lkq\":\"cyohigimwdcs\",\"imb\":\"qvkixnmbzmecuyrz\"},\"id\":\"ayspzvriet\",\"name\":\"fphmdzxplg\",\"type\":\"pvdvatlzmgs\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.bigDataPools().listByWorkspace("bcbgv", "btsertoxa", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("prigg", response.iterator().next().location()); - Assertions.assertEquals("eqfcbuulpy", response.iterator().next().tags().get("flqjfshtu")); - Assertions.assertEquals("uvjhxmnrqstjc", response.iterator().next().provisioningState()); - Assertions.assertEquals(349818575, response.iterator().next().autoScale().minNodeCount()); - Assertions.assertEquals(false, response.iterator().next().autoScale().enabled()); - Assertions.assertEquals(20482320, response.iterator().next().autoScale().maxNodeCount()); - Assertions.assertEquals(1842363515, response.iterator().next().autoPause().delayInMinutes()); - Assertions.assertEquals(true, response.iterator().next().autoPause().enabled()); - Assertions.assertEquals(true, response.iterator().next().isComputeIsolationEnabled()); - Assertions.assertEquals(true, response.iterator().next().isAutotuneEnabled()); - Assertions.assertEquals(false, response.iterator().next().sessionLevelPackagesEnabled()); - Assertions.assertEquals(false, response.iterator().next().dynamicExecutorAllocation().enabled()); - Assertions.assertEquals(998671671, response.iterator().next().dynamicExecutorAllocation().minExecutors()); - Assertions.assertEquals(1528855768, response.iterator().next().dynamicExecutorAllocation().maxExecutors()); - Assertions.assertEquals("dsvmwbitekdtf", response.iterator().next().sparkEventsFolder()); - Assertions.assertEquals(1288145851, response.iterator().next().nodeCount()); - Assertions.assertEquals("x", response.iterator().next().libraryRequirements().content()); - Assertions.assertEquals("chgy", response.iterator().next().libraryRequirements().filename()); - Assertions.assertEquals("ivycpzcvdi", response.iterator().next().sparkConfigProperties().content()); - Assertions.assertEquals("lrqtbhtrezp", response.iterator().next().sparkConfigProperties().filename()); - Assertions - .assertEquals( - ConfigurationType.ARTIFACT, response.iterator().next().sparkConfigProperties().configurationType()); - Assertions.assertEquals("yfmx", response.iterator().next().sparkVersion()); - Assertions.assertEquals("utzfkgilnoudc", response.iterator().next().defaultSparkLogFolder()); - Assertions.assertEquals(NodeSize.LARGE, response.iterator().next().nodeSize()); - Assertions.assertEquals(NodeSizeFamily.HARDWARE_ACCELERATED_FPGA, response.iterator().next().nodeSizeFamily()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/CheckNameAvailabilityRequestTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/CheckNameAvailabilityRequestTests.java deleted file mode 100644 index 288514aa47f57..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/CheckNameAvailabilityRequestTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.CheckNameAvailabilityRequest; -import org.junit.jupiter.api.Assertions; - -public final class CheckNameAvailabilityRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CheckNameAvailabilityRequest model = - BinaryData - .fromString("{\"name\":\"rxybqsoq\",\"type\":\"gkdmb\"}") - .toObject(CheckNameAvailabilityRequest.class); - Assertions.assertEquals("rxybqsoq", model.name()); - Assertions.assertEquals("gkdmb", model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CheckNameAvailabilityRequest model = new CheckNameAvailabilityRequest().withName("rxybqsoq").withType("gkdmb"); - model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityRequest.class); - Assertions.assertEquals("rxybqsoq", model.name()); - Assertions.assertEquals("gkdmb", model.type()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/CheckNameAvailabilityResponseInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/CheckNameAvailabilityResponseInnerTests.java deleted file mode 100644 index 7929ffb9ae1b1..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/CheckNameAvailabilityResponseInnerTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.CheckNameAvailabilityResponseInner; -import org.junit.jupiter.api.Assertions; - -public final class CheckNameAvailabilityResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CheckNameAvailabilityResponseInner model = - BinaryData - .fromString( - "{\"message\":\"zlobcufpd\",\"available\":false,\"reason\":\"t\",\"name\":\"qjnqglhqgnufoooj\"}") - .toObject(CheckNameAvailabilityResponseInner.class); - Assertions.assertEquals("zlobcufpd", model.message()); - Assertions.assertEquals(false, model.available()); - Assertions.assertEquals("t", model.reason()); - Assertions.assertEquals("qjnqglhqgnufoooj", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CheckNameAvailabilityResponseInner model = - new CheckNameAvailabilityResponseInner() - .withMessage("zlobcufpd") - .withAvailable(false) - .withReason("t") - .withName("qjnqglhqgnufoooj"); - model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityResponseInner.class); - Assertions.assertEquals("zlobcufpd", model.message()); - Assertions.assertEquals(false, model.available()); - Assertions.assertEquals("t", model.reason()); - Assertions.assertEquals("qjnqglhqgnufoooj", model.name()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/CheckNameResultInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/CheckNameResultInnerTests.java deleted file mode 100644 index 39db881c01ead..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/CheckNameResultInnerTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.CheckNameResultInner; -import com.azure.resourcemanager.synapse.models.Reason; -import org.junit.jupiter.api.Assertions; - -public final class CheckNameResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CheckNameResultInner model = - BinaryData - .fromString( - "{\"nameAvailable\":true,\"name\":\"kglklbyulidwcw\",\"message\":\"zegjonfhjirwgdn\",\"reason\":\"Invalid\"}") - .toObject(CheckNameResultInner.class); - Assertions.assertEquals(true, model.nameAvailable()); - Assertions.assertEquals("kglklbyulidwcw", model.name()); - Assertions.assertEquals("zegjonfhjirwgdn", model.message()); - Assertions.assertEquals(Reason.INVALID, model.reason()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CheckNameResultInner model = - new CheckNameResultInner() - .withNameAvailable(true) - .withName("kglklbyulidwcw") - .withMessage("zegjonfhjirwgdn") - .withReason(Reason.INVALID); - model = BinaryData.fromObject(model).toObject(CheckNameResultInner.class); - Assertions.assertEquals(true, model.nameAvailable()); - Assertions.assertEquals("kglklbyulidwcw", model.name()); - Assertions.assertEquals("zegjonfhjirwgdn", model.message()); - Assertions.assertEquals(Reason.INVALID, model.reason()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ClusterPrincipalAssignmentCheckNameRequestTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ClusterPrincipalAssignmentCheckNameRequestTests.java deleted file mode 100644 index 9c24b78bdcc2d..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ClusterPrincipalAssignmentCheckNameRequestTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.ClusterPrincipalAssignmentCheckNameRequest; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPrincipalAssignmentCheckNameRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPrincipalAssignmentCheckNameRequest model = - BinaryData - .fromString("{\"name\":\"ttjzcfyjzpt\"}") - .toObject(ClusterPrincipalAssignmentCheckNameRequest.class); - Assertions.assertEquals("ttjzcfyjzpt", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPrincipalAssignmentCheckNameRequest model = - new ClusterPrincipalAssignmentCheckNameRequest().withName("ttjzcfyjzpt"); - model = BinaryData.fromObject(model).toObject(ClusterPrincipalAssignmentCheckNameRequest.class); - Assertions.assertEquals("ttjzcfyjzpt", model.name()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ClusterPrincipalAssignmentInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ClusterPrincipalAssignmentInnerTests.java deleted file mode 100644 index 032dbf37e7f4a..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ClusterPrincipalAssignmentInnerTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.ClusterPrincipalAssignmentInner; -import com.azure.resourcemanager.synapse.models.ClusterPrincipalRole; -import com.azure.resourcemanager.synapse.models.PrincipalType; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPrincipalAssignmentInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPrincipalAssignmentInner model = - BinaryData - .fromString( - "{\"properties\":{\"principalId\":\"wnlzafwxu\",\"role\":\"AllDatabasesAdmin\",\"tenantId\":\"hgookrtalvnbwgpb\",\"principalType\":\"App\",\"tenantName\":\"luclvdjjuk\",\"principalName\":\"dnqodx\",\"provisioningState\":\"Running\",\"aadObjectId\":\"hqfaqnvz\"},\"id\":\"gyipem\",\"name\":\"hgav\",\"type\":\"czuejdtxptl\"}") - .toObject(ClusterPrincipalAssignmentInner.class); - Assertions.assertEquals("wnlzafwxu", model.principalId()); - Assertions.assertEquals(ClusterPrincipalRole.ALL_DATABASES_ADMIN, model.role()); - Assertions.assertEquals("hgookrtalvnbwgpb", model.tenantId()); - Assertions.assertEquals(PrincipalType.APP, model.principalType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPrincipalAssignmentInner model = - new ClusterPrincipalAssignmentInner() - .withPrincipalId("wnlzafwxu") - .withRole(ClusterPrincipalRole.ALL_DATABASES_ADMIN) - .withTenantId("hgookrtalvnbwgpb") - .withPrincipalType(PrincipalType.APP); - model = BinaryData.fromObject(model).toObject(ClusterPrincipalAssignmentInner.class); - Assertions.assertEquals("wnlzafwxu", model.principalId()); - Assertions.assertEquals(ClusterPrincipalRole.ALL_DATABASES_ADMIN, model.role()); - Assertions.assertEquals("hgookrtalvnbwgpb", model.tenantId()); - Assertions.assertEquals(PrincipalType.APP, model.principalType()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ClusterPrincipalAssignmentListResultTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ClusterPrincipalAssignmentListResultTests.java deleted file mode 100644 index 0b60cf42c4190..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ClusterPrincipalAssignmentListResultTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.ClusterPrincipalAssignmentInner; -import com.azure.resourcemanager.synapse.models.ClusterPrincipalAssignmentListResult; -import com.azure.resourcemanager.synapse.models.ClusterPrincipalRole; -import com.azure.resourcemanager.synapse.models.PrincipalType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPrincipalAssignmentListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPrincipalAssignmentListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"principalId\":\"h\",\"role\":\"AllDatabasesAdmin\",\"tenantId\":\"infsz\",\"principalType\":\"User\",\"tenantName\":\"lqdhmrjzr\",\"principalName\":\"cxpjbyypsj\",\"provisioningState\":\"Deleting\",\"aadObjectId\":\"enky\"},\"id\":\"qzvs\",\"name\":\"xfxjelgcmpzqj\",\"type\":\"hhqxuwyvcacoyviv\"},{\"properties\":{\"principalId\":\"izus\",\"role\":\"AllDatabasesAdmin\",\"tenantId\":\"lbscmnlz\",\"principalType\":\"Group\",\"tenantName\":\"uf\",\"principalName\":\"gmvflnwyvqkx\",\"provisioningState\":\"Running\",\"aadObjectId\":\"niylyly\"},\"id\":\"xzutgqztwhghmupg\",\"name\":\"yjtcdxabbujftab\",\"type\":\"nbbklqpxzucafed\"}]}") - .toObject(ClusterPrincipalAssignmentListResult.class); - Assertions.assertEquals("h", model.value().get(0).principalId()); - Assertions.assertEquals(ClusterPrincipalRole.ALL_DATABASES_ADMIN, model.value().get(0).role()); - Assertions.assertEquals("infsz", model.value().get(0).tenantId()); - Assertions.assertEquals(PrincipalType.USER, model.value().get(0).principalType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPrincipalAssignmentListResult model = - new ClusterPrincipalAssignmentListResult() - .withValue( - Arrays - .asList( - new ClusterPrincipalAssignmentInner() - .withPrincipalId("h") - .withRole(ClusterPrincipalRole.ALL_DATABASES_ADMIN) - .withTenantId("infsz") - .withPrincipalType(PrincipalType.USER), - new ClusterPrincipalAssignmentInner() - .withPrincipalId("izus") - .withRole(ClusterPrincipalRole.ALL_DATABASES_ADMIN) - .withTenantId("lbscmnlz") - .withPrincipalType(PrincipalType.GROUP))); - model = BinaryData.fromObject(model).toObject(ClusterPrincipalAssignmentListResult.class); - Assertions.assertEquals("h", model.value().get(0).principalId()); - Assertions.assertEquals(ClusterPrincipalRole.ALL_DATABASES_ADMIN, model.value().get(0).role()); - Assertions.assertEquals("infsz", model.value().get(0).tenantId()); - Assertions.assertEquals(PrincipalType.USER, model.value().get(0).principalType()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ClusterPrincipalPropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ClusterPrincipalPropertiesTests.java deleted file mode 100644 index 9b929d39f8384..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ClusterPrincipalPropertiesTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.ClusterPrincipalProperties; -import com.azure.resourcemanager.synapse.models.ClusterPrincipalRole; -import com.azure.resourcemanager.synapse.models.PrincipalType; -import org.junit.jupiter.api.Assertions; - -public final class ClusterPrincipalPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ClusterPrincipalProperties model = - BinaryData - .fromString( - "{\"principalId\":\"h\",\"role\":\"AllDatabasesViewer\",\"tenantId\":\"omew\",\"principalType\":\"User\",\"tenantName\":\"tl\",\"principalName\":\"hqawmo\",\"provisioningState\":\"Succeeded\",\"aadObjectId\":\"cz\"}") - .toObject(ClusterPrincipalProperties.class); - Assertions.assertEquals("h", model.principalId()); - Assertions.assertEquals(ClusterPrincipalRole.ALL_DATABASES_VIEWER, model.role()); - Assertions.assertEquals("omew", model.tenantId()); - Assertions.assertEquals(PrincipalType.USER, model.principalType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ClusterPrincipalProperties model = - new ClusterPrincipalProperties() - .withPrincipalId("h") - .withRole(ClusterPrincipalRole.ALL_DATABASES_VIEWER) - .withTenantId("omew") - .withPrincipalType(PrincipalType.USER); - model = BinaryData.fromObject(model).toObject(ClusterPrincipalProperties.class); - Assertions.assertEquals("h", model.principalId()); - Assertions.assertEquals(ClusterPrincipalRole.ALL_DATABASES_VIEWER, model.role()); - Assertions.assertEquals("omew", model.tenantId()); - Assertions.assertEquals(PrincipalType.USER, model.principalType()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/CreateSqlPoolRestorePointDefinitionTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/CreateSqlPoolRestorePointDefinitionTests.java deleted file mode 100644 index 3b4526fc05b9e..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/CreateSqlPoolRestorePointDefinitionTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.CreateSqlPoolRestorePointDefinition; -import org.junit.jupiter.api.Assertions; - -public final class CreateSqlPoolRestorePointDefinitionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CreateSqlPoolRestorePointDefinition model = - BinaryData - .fromString("{\"restorePointLabel\":\"hin\"}") - .toObject(CreateSqlPoolRestorePointDefinition.class); - Assertions.assertEquals("hin", model.restorePointLabel()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CreateSqlPoolRestorePointDefinition model = - new CreateSqlPoolRestorePointDefinition().withRestorePointLabel("hin"); - model = BinaryData.fromObject(model).toObject(CreateSqlPoolRestorePointDefinition.class); - Assertions.assertEquals("hin", model.restorePointLabel()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/CspWorkspaceAdminPropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/CspWorkspaceAdminPropertiesTests.java deleted file mode 100644 index 3cc078c81ed57..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/CspWorkspaceAdminPropertiesTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.CspWorkspaceAdminProperties; -import org.junit.jupiter.api.Assertions; - -public final class CspWorkspaceAdminPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CspWorkspaceAdminProperties model = - BinaryData - .fromString("{\"initialWorkspaceAdminObjectId\":\"idxas\"}") - .toObject(CspWorkspaceAdminProperties.class); - Assertions.assertEquals("idxas", model.initialWorkspaceAdminObjectId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CspWorkspaceAdminProperties model = - new CspWorkspaceAdminProperties().withInitialWorkspaceAdminObjectId("idxas"); - model = BinaryData.fromObject(model).toObject(CspWorkspaceAdminProperties.class); - Assertions.assertEquals("idxas", model.initialWorkspaceAdminObjectId()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/CustomSetupBaseTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/CustomSetupBaseTests.java deleted file mode 100644 index b5be01dc865ac..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/CustomSetupBaseTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.CustomSetupBase; - -public final class CustomSetupBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomSetupBase model = BinaryData.fromString("{\"type\":\"CustomSetupBase\"}").toObject(CustomSetupBase.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomSetupBase model = new CustomSetupBase(); - model = BinaryData.fromObject(model).toObject(CustomSetupBase.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataConnectionCheckNameRequestTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataConnectionCheckNameRequestTests.java deleted file mode 100644 index 300a1aea850b7..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataConnectionCheckNameRequestTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.DataConnectionCheckNameRequest; -import org.junit.jupiter.api.Assertions; - -public final class DataConnectionCheckNameRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataConnectionCheckNameRequest model = - BinaryData.fromString("{\"name\":\"ndo\"}").toObject(DataConnectionCheckNameRequest.class); - Assertions.assertEquals("ndo", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataConnectionCheckNameRequest model = new DataConnectionCheckNameRequest().withName("ndo"); - model = BinaryData.fromObject(model).toObject(DataConnectionCheckNameRequest.class); - Assertions.assertEquals("ndo", model.name()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataConnectionInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataConnectionInnerTests.java deleted file mode 100644 index fa2899895b7b3..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataConnectionInnerTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.DataConnectionInner; -import org.junit.jupiter.api.Assertions; - -public final class DataConnectionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataConnectionInner model = - BinaryData - .fromString( - "{\"kind\":\"DataConnection\",\"location\":\"inbmh\",\"id\":\"jijkgqxnhmbke\",\"name\":\"njaujvaan\",\"type\":\"ggiycwkdtaawxwf\"}") - .toObject(DataConnectionInner.class); - Assertions.assertEquals("inbmh", model.location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataConnectionInner model = new DataConnectionInner().withLocation("inbmh"); - model = BinaryData.fromObject(model).toObject(DataConnectionInner.class); - Assertions.assertEquals("inbmh", model.location()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataConnectionListResultTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataConnectionListResultTests.java deleted file mode 100644 index 7a41a51764f96..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataConnectionListResultTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.DataConnectionInner; -import com.azure.resourcemanager.synapse.models.DataConnectionListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DataConnectionListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataConnectionListResult model = - BinaryData - .fromString( - "{\"value\":[{\"kind\":\"DataConnection\",\"location\":\"smffjkutycyarnr\",\"id\":\"hguabzoghktdp\",\"name\":\"czhcoeocnh\",\"type\":\"qr\"}]}") - .toObject(DataConnectionListResult.class); - Assertions.assertEquals("smffjkutycyarnr", model.value().get(0).location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataConnectionListResult model = - new DataConnectionListResult() - .withValue(Arrays.asList(new DataConnectionInner().withLocation("smffjkutycyarnr"))); - model = BinaryData.fromObject(model).toObject(DataConnectionListResult.class); - Assertions.assertEquals("smffjkutycyarnr", model.value().get(0).location()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataConnectionValidationInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataConnectionValidationInnerTests.java deleted file mode 100644 index 7f71200618bf7..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataConnectionValidationInnerTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.DataConnectionInner; -import com.azure.resourcemanager.synapse.fluent.models.DataConnectionValidationInner; -import org.junit.jupiter.api.Assertions; - -public final class DataConnectionValidationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataConnectionValidationInner model = - BinaryData - .fromString( - "{\"dataConnectionName\":\"mbltoo\",\"properties\":{\"kind\":\"DataConnection\",\"location\":\"fqlwxldykalsy\",\"id\":\"olnjpnnbmjksibj\",\"name\":\"sjjx\",\"type\":\"ahmrnadzyqegxyi\"}}") - .toObject(DataConnectionValidationInner.class); - Assertions.assertEquals("mbltoo", model.dataConnectionName()); - Assertions.assertEquals("fqlwxldykalsy", model.properties().location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataConnectionValidationInner model = - new DataConnectionValidationInner() - .withDataConnectionName("mbltoo") - .withProperties(new DataConnectionInner().withLocation("fqlwxldykalsy")); - model = BinaryData.fromObject(model).toObject(DataConnectionValidationInner.class); - Assertions.assertEquals("mbltoo", model.dataConnectionName()); - Assertions.assertEquals("fqlwxldykalsy", model.properties().location()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataConnectionValidationListResultInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataConnectionValidationListResultInnerTests.java deleted file mode 100644 index b0bb81155550a..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataConnectionValidationListResultInnerTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.DataConnectionValidationListResultInner; -import com.azure.resourcemanager.synapse.models.DataConnectionValidationResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DataConnectionValidationListResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataConnectionValidationListResultInner model = - BinaryData - .fromString( - "{\"value\":[{\"errorMessage\":\"mrrqmbzmqkratb\"},{\"errorMessage\":\"wbjsidbirkf\"},{\"errorMessage\":\"sokdgoge\"},{\"errorMessage\":\"jymrhbg\"}]}") - .toObject(DataConnectionValidationListResultInner.class); - Assertions.assertEquals("mrrqmbzmqkratb", model.value().get(0).errorMessage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataConnectionValidationListResultInner model = - new DataConnectionValidationListResultInner() - .withValue( - Arrays - .asList( - new DataConnectionValidationResult().withErrorMessage("mrrqmbzmqkratb"), - new DataConnectionValidationResult().withErrorMessage("wbjsidbirkf"), - new DataConnectionValidationResult().withErrorMessage("sokdgoge"), - new DataConnectionValidationResult().withErrorMessage("jymrhbg"))); - model = BinaryData.fromObject(model).toObject(DataConnectionValidationListResultInner.class); - Assertions.assertEquals("mrrqmbzmqkratb", model.value().get(0).errorMessage()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataConnectionValidationResultTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataConnectionValidationResultTests.java deleted file mode 100644 index c1f3f77789f88..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataConnectionValidationResultTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.DataConnectionValidationResult; -import org.junit.jupiter.api.Assertions; - -public final class DataConnectionValidationResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataConnectionValidationResult model = - BinaryData.fromString("{\"errorMessage\":\"ozkyewnfnzh\"}").toObject(DataConnectionValidationResult.class); - Assertions.assertEquals("ozkyewnfnzh", model.errorMessage()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataConnectionValidationResult model = new DataConnectionValidationResult().withErrorMessage("ozkyewnfnzh"); - model = BinaryData.fromObject(model).toObject(DataConnectionValidationResult.class); - Assertions.assertEquals("ozkyewnfnzh", model.errorMessage()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataLakeStorageAccountDetailsTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataLakeStorageAccountDetailsTests.java deleted file mode 100644 index 2129b23a1bb83..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataLakeStorageAccountDetailsTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.DataLakeStorageAccountDetails; -import org.junit.jupiter.api.Assertions; - -public final class DataLakeStorageAccountDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataLakeStorageAccountDetails model = - BinaryData - .fromString( - "{\"accountUrl\":\"twzhhzjhfjmhv\",\"filesystem\":\"uvgp\",\"resourceId\":\"neqsxvmh\",\"createManagedPrivateEndpoint\":true}") - .toObject(DataLakeStorageAccountDetails.class); - Assertions.assertEquals("twzhhzjhfjmhv", model.accountUrl()); - Assertions.assertEquals("uvgp", model.filesystem()); - Assertions.assertEquals("neqsxvmh", model.resourceId()); - Assertions.assertEquals(true, model.createManagedPrivateEndpoint()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataLakeStorageAccountDetails model = - new DataLakeStorageAccountDetails() - .withAccountUrl("twzhhzjhfjmhv") - .withFilesystem("uvgp") - .withResourceId("neqsxvmh") - .withCreateManagedPrivateEndpoint(true); - model = BinaryData.fromObject(model).toObject(DataLakeStorageAccountDetails.class); - Assertions.assertEquals("twzhhzjhfjmhv", model.accountUrl()); - Assertions.assertEquals("uvgp", model.filesystem()); - Assertions.assertEquals("neqsxvmh", model.resourceId()); - Assertions.assertEquals(true, model.createManagedPrivateEndpoint()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataMaskingPoliciesCreateOrUpdateWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataMaskingPoliciesCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index e581196528d2e..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataMaskingPoliciesCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.DataMaskingPolicy; -import com.azure.resourcemanager.synapse.models.DataMaskingState; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DataMaskingPoliciesCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"dataMaskingState\":\"Disabled\",\"exemptPrincipals\":\"awmpjprd\",\"applicationPrincipals\":\"rpcfpcfjfwzl\",\"maskingLevel\":\"awkgy\"},\"location\":\"eyam\",\"kind\":\"idmdiawpzxkzrntm\",\"managedBy\":\"tdhuo\",\"id\":\"gwqpsqazih\",\"name\":\"odvqgcnbhcbmj\",\"type\":\"ztibniyntsxjmfm\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DataMaskingPolicy response = - manager - .dataMaskingPolicies() - .define() - .withExistingSqlPool("oti", "fbbcngkegxcypxbb", "etwilyrzoxpd") - .withDataMaskingState(DataMaskingState.DISABLED) - .withExemptPrincipals("r") - .create(); - - Assertions.assertEquals(DataMaskingState.DISABLED, response.dataMaskingState()); - Assertions.assertEquals("awmpjprd", response.exemptPrincipals()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataMaskingPoliciesGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataMaskingPoliciesGetWithResponseMockTests.java deleted file mode 100644 index bf7d0e63f293e..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataMaskingPoliciesGetWithResponseMockTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.DataMaskingPolicy; -import com.azure.resourcemanager.synapse.models.DataMaskingState; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DataMaskingPoliciesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"dataMaskingState\":\"Disabled\",\"exemptPrincipals\":\"h\",\"applicationPrincipals\":\"tqstqkqsygxiyne\",\"maskingLevel\":\"vagzkheuba\"},\"location\":\"xunpqcckqiawzlz\",\"kind\":\"aslgacizuxlrarwp\",\"managedBy\":\"saudoejtighsx\",\"id\":\"pytn\",\"name\":\"qbalahovuuwxhme\",\"type\":\"jnhj\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DataMaskingPolicy response = - manager - .dataMaskingPolicies() - .getWithResponse("xbrdvcehqwh", "txnmxgnmguz", "uwvorbalkjn", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(DataMaskingState.DISABLED, response.dataMaskingState()); - Assertions.assertEquals("h", response.exemptPrincipals()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataMaskingPolicyInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataMaskingPolicyInnerTests.java deleted file mode 100644 index 62f6512086989..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataMaskingPolicyInnerTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.DataMaskingPolicyInner; -import com.azure.resourcemanager.synapse.models.DataMaskingState; -import org.junit.jupiter.api.Assertions; - -public final class DataMaskingPolicyInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataMaskingPolicyInner model = - BinaryData - .fromString( - "{\"properties\":{\"dataMaskingState\":\"Enabled\",\"exemptPrincipals\":\"jviylwdshfs\",\"applicationPrincipals\":\"rbgyefry\",\"maskingLevel\":\"gaojf\"},\"location\":\"nc\",\"kind\":\"mrfhirctymox\",\"managedBy\":\"tpipiwyczuhx\",\"id\":\"cpqjlihhyu\",\"name\":\"pskasdvlmfwdg\",\"type\":\"x\"}") - .toObject(DataMaskingPolicyInner.class); - Assertions.assertEquals(DataMaskingState.ENABLED, model.dataMaskingState()); - Assertions.assertEquals("jviylwdshfs", model.exemptPrincipals()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataMaskingPolicyInner model = - new DataMaskingPolicyInner() - .withDataMaskingState(DataMaskingState.ENABLED) - .withExemptPrincipals("jviylwdshfs"); - model = BinaryData.fromObject(model).toObject(DataMaskingPolicyInner.class); - Assertions.assertEquals(DataMaskingState.ENABLED, model.dataMaskingState()); - Assertions.assertEquals("jviylwdshfs", model.exemptPrincipals()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataMaskingPolicyPropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataMaskingPolicyPropertiesTests.java deleted file mode 100644 index 60783e843e48b..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataMaskingPolicyPropertiesTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.DataMaskingPolicyProperties; -import com.azure.resourcemanager.synapse.models.DataMaskingState; -import org.junit.jupiter.api.Assertions; - -public final class DataMaskingPolicyPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataMaskingPolicyProperties model = - BinaryData - .fromString( - "{\"dataMaskingState\":\"Disabled\",\"exemptPrincipals\":\"cvpa\",\"applicationPrincipals\":\"sreuzvxurisjnh\",\"maskingLevel\":\"txifqj\"}") - .toObject(DataMaskingPolicyProperties.class); - Assertions.assertEquals(DataMaskingState.DISABLED, model.dataMaskingState()); - Assertions.assertEquals("cvpa", model.exemptPrincipals()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataMaskingPolicyProperties model = - new DataMaskingPolicyProperties() - .withDataMaskingState(DataMaskingState.DISABLED) - .withExemptPrincipals("cvpa"); - model = BinaryData.fromObject(model).toObject(DataMaskingPolicyProperties.class); - Assertions.assertEquals(DataMaskingState.DISABLED, model.dataMaskingState()); - Assertions.assertEquals("cvpa", model.exemptPrincipals()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataMaskingRuleInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataMaskingRuleInnerTests.java deleted file mode 100644 index 9cfe5400689a6..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataMaskingRuleInnerTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.DataMaskingRuleInner; -import com.azure.resourcemanager.synapse.models.DataMaskingFunction; -import com.azure.resourcemanager.synapse.models.DataMaskingRuleState; -import org.junit.jupiter.api.Assertions; - -public final class DataMaskingRuleInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataMaskingRuleInner model = - BinaryData - .fromString( - "{\"properties\":{\"id\":\"mrhublwpc\",\"aliasName\":\"utr\",\"ruleState\":\"Disabled\",\"schemaName\":\"pauutpw\",\"tableName\":\"qhih\",\"columnName\":\"jqgwzp\",\"maskingFunction\":\"CCN\",\"numberFrom\":\"n\",\"numberTo\":\"ypsxjvfoim\",\"prefixSize\":\"slirciz\",\"suffixSize\":\"vydfceacvlhvygdy\",\"replacementString\":\"umrtwnawjsl\"},\"location\":\"wkojgcyztsfmzn\",\"kind\":\"eqphchqnrnr\",\"id\":\"x\",\"name\":\"huwrykqgaifm\",\"type\":\"iklbydvkhb\"}") - .toObject(DataMaskingRuleInner.class); - Assertions.assertEquals("utr", model.aliasName()); - Assertions.assertEquals(DataMaskingRuleState.DISABLED, model.ruleState()); - Assertions.assertEquals("pauutpw", model.schemaName()); - Assertions.assertEquals("qhih", model.tableName()); - Assertions.assertEquals("jqgwzp", model.columnName()); - Assertions.assertEquals(DataMaskingFunction.CCN, model.maskingFunction()); - Assertions.assertEquals("n", model.numberFrom()); - Assertions.assertEquals("ypsxjvfoim", model.numberTo()); - Assertions.assertEquals("slirciz", model.prefixSize()); - Assertions.assertEquals("vydfceacvlhvygdy", model.suffixSize()); - Assertions.assertEquals("umrtwnawjsl", model.replacementString()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataMaskingRuleInner model = - new DataMaskingRuleInner() - .withAliasName("utr") - .withRuleState(DataMaskingRuleState.DISABLED) - .withSchemaName("pauutpw") - .withTableName("qhih") - .withColumnName("jqgwzp") - .withMaskingFunction(DataMaskingFunction.CCN) - .withNumberFrom("n") - .withNumberTo("ypsxjvfoim") - .withPrefixSize("slirciz") - .withSuffixSize("vydfceacvlhvygdy") - .withReplacementString("umrtwnawjsl"); - model = BinaryData.fromObject(model).toObject(DataMaskingRuleInner.class); - Assertions.assertEquals("utr", model.aliasName()); - Assertions.assertEquals(DataMaskingRuleState.DISABLED, model.ruleState()); - Assertions.assertEquals("pauutpw", model.schemaName()); - Assertions.assertEquals("qhih", model.tableName()); - Assertions.assertEquals("jqgwzp", model.columnName()); - Assertions.assertEquals(DataMaskingFunction.CCN, model.maskingFunction()); - Assertions.assertEquals("n", model.numberFrom()); - Assertions.assertEquals("ypsxjvfoim", model.numberTo()); - Assertions.assertEquals("slirciz", model.prefixSize()); - Assertions.assertEquals("vydfceacvlhvygdy", model.suffixSize()); - Assertions.assertEquals("umrtwnawjsl", model.replacementString()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataMaskingRuleListResultTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataMaskingRuleListResultTests.java deleted file mode 100644 index 0921e9f318b62..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataMaskingRuleListResultTests.java +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.DataMaskingRuleInner; -import com.azure.resourcemanager.synapse.models.DataMaskingFunction; -import com.azure.resourcemanager.synapse.models.DataMaskingRuleListResult; -import com.azure.resourcemanager.synapse.models.DataMaskingRuleState; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DataMaskingRuleListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataMaskingRuleListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"id\":\"hvbbxuripltfnh\",\"aliasName\":\"axkgx\",\"ruleState\":\"Disabled\",\"schemaName\":\"ckpyklyhplu\",\"tableName\":\"dpvruud\",\"columnName\":\"gzibthostgktstv\",\"maskingFunction\":\"Number\",\"numberFrom\":\"clzedqbcvh\",\"numberTo\":\"h\",\"prefixSize\":\"odqkdlwwqfb\",\"suffixSize\":\"lkxt\",\"replacementString\":\"jfsmlmbtxhwgfwsr\"},\"location\":\"wcoezbrhub\",\"kind\":\"hud\",\"id\":\"goo\",\"name\":\"kkqfqjbvle\",\"type\":\"rfmluiqtq\"},{\"properties\":{\"id\":\"vyvnqqyb\",\"aliasName\":\"yeua\",\"ruleState\":\"Disabled\",\"schemaName\":\"qabqgzslesjcb\",\"tableName\":\"ernntiewdjcvbquw\",\"columnName\":\"behwagohb\",\"maskingFunction\":\"SSN\",\"numberFrom\":\"kmr\",\"numberTo\":\"mvvhmxtdrjfuta\",\"prefixSize\":\"ebjvewzcjzn\",\"suffixSize\":\"cpmguaadraufact\",\"replacementString\":\"hzovaj\"},\"location\":\"iuxxpshneekulfg\",\"kind\":\"qubkw\",\"id\":\"lenrd\",\"name\":\"utujba\",\"type\":\"pjuohminyfl\"},{\"properties\":{\"id\":\"wmd\",\"aliasName\":\"wpklvxw\",\"ruleState\":\"Disabled\",\"schemaName\":\"dxpgpqchiszepnnb\",\"tableName\":\"crxgibb\",\"columnName\":\"axconfozauo\",\"maskingFunction\":\"Text\",\"numberFrom\":\"kokwbqplhlvnu\",\"numberTo\":\"pzlrphw\",\"prefixSize\":\"oldweyuqdu\",\"suffixSize\":\"mnnrwr\",\"replacementString\":\"ork\"},\"location\":\"lywjhh\",\"kind\":\"nhxmsi\",\"id\":\"fomiloxgg\",\"name\":\"ufiqndieuzaof\",\"type\":\"chvcyyysfgdo\"}]}") - .toObject(DataMaskingRuleListResult.class); - Assertions.assertEquals("axkgx", model.value().get(0).aliasName()); - Assertions.assertEquals(DataMaskingRuleState.DISABLED, model.value().get(0).ruleState()); - Assertions.assertEquals("ckpyklyhplu", model.value().get(0).schemaName()); - Assertions.assertEquals("dpvruud", model.value().get(0).tableName()); - Assertions.assertEquals("gzibthostgktstv", model.value().get(0).columnName()); - Assertions.assertEquals(DataMaskingFunction.NUMBER, model.value().get(0).maskingFunction()); - Assertions.assertEquals("clzedqbcvh", model.value().get(0).numberFrom()); - Assertions.assertEquals("h", model.value().get(0).numberTo()); - Assertions.assertEquals("odqkdlwwqfb", model.value().get(0).prefixSize()); - Assertions.assertEquals("lkxt", model.value().get(0).suffixSize()); - Assertions.assertEquals("jfsmlmbtxhwgfwsr", model.value().get(0).replacementString()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataMaskingRuleListResult model = - new DataMaskingRuleListResult() - .withValue( - Arrays - .asList( - new DataMaskingRuleInner() - .withAliasName("axkgx") - .withRuleState(DataMaskingRuleState.DISABLED) - .withSchemaName("ckpyklyhplu") - .withTableName("dpvruud") - .withColumnName("gzibthostgktstv") - .withMaskingFunction(DataMaskingFunction.NUMBER) - .withNumberFrom("clzedqbcvh") - .withNumberTo("h") - .withPrefixSize("odqkdlwwqfb") - .withSuffixSize("lkxt") - .withReplacementString("jfsmlmbtxhwgfwsr"), - new DataMaskingRuleInner() - .withAliasName("yeua") - .withRuleState(DataMaskingRuleState.DISABLED) - .withSchemaName("qabqgzslesjcb") - .withTableName("ernntiewdjcvbquw") - .withColumnName("behwagohb") - .withMaskingFunction(DataMaskingFunction.SSN) - .withNumberFrom("kmr") - .withNumberTo("mvvhmxtdrjfuta") - .withPrefixSize("ebjvewzcjzn") - .withSuffixSize("cpmguaadraufact") - .withReplacementString("hzovaj"), - new DataMaskingRuleInner() - .withAliasName("wpklvxw") - .withRuleState(DataMaskingRuleState.DISABLED) - .withSchemaName("dxpgpqchiszepnnb") - .withTableName("crxgibb") - .withColumnName("axconfozauo") - .withMaskingFunction(DataMaskingFunction.TEXT) - .withNumberFrom("kokwbqplhlvnu") - .withNumberTo("pzlrphw") - .withPrefixSize("oldweyuqdu") - .withSuffixSize("mnnrwr") - .withReplacementString("ork"))); - model = BinaryData.fromObject(model).toObject(DataMaskingRuleListResult.class); - Assertions.assertEquals("axkgx", model.value().get(0).aliasName()); - Assertions.assertEquals(DataMaskingRuleState.DISABLED, model.value().get(0).ruleState()); - Assertions.assertEquals("ckpyklyhplu", model.value().get(0).schemaName()); - Assertions.assertEquals("dpvruud", model.value().get(0).tableName()); - Assertions.assertEquals("gzibthostgktstv", model.value().get(0).columnName()); - Assertions.assertEquals(DataMaskingFunction.NUMBER, model.value().get(0).maskingFunction()); - Assertions.assertEquals("clzedqbcvh", model.value().get(0).numberFrom()); - Assertions.assertEquals("h", model.value().get(0).numberTo()); - Assertions.assertEquals("odqkdlwwqfb", model.value().get(0).prefixSize()); - Assertions.assertEquals("lkxt", model.value().get(0).suffixSize()); - Assertions.assertEquals("jfsmlmbtxhwgfwsr", model.value().get(0).replacementString()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataMaskingRulePropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataMaskingRulePropertiesTests.java deleted file mode 100644 index e69270a7ba81b..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataMaskingRulePropertiesTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.DataMaskingRuleProperties; -import com.azure.resourcemanager.synapse.models.DataMaskingFunction; -import com.azure.resourcemanager.synapse.models.DataMaskingRuleState; -import org.junit.jupiter.api.Assertions; - -public final class DataMaskingRulePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataMaskingRuleProperties model = - BinaryData - .fromString( - "{\"id\":\"dznx\",\"aliasName\":\"dsrhnjiv\",\"ruleState\":\"Disabled\",\"schemaName\":\"tnovqfzgemjdftul\",\"tableName\":\"ltducea\",\"columnName\":\"tmczuomejwcwwqi\",\"maskingFunction\":\"SSN\",\"numberFrom\":\"ssxmojms\",\"numberTo\":\"kjprvk\",\"prefixSize\":\"fz\",\"suffixSize\":\"jyxgtczh\",\"replacementString\":\"dbsdshm\"}") - .toObject(DataMaskingRuleProperties.class); - Assertions.assertEquals("dsrhnjiv", model.aliasName()); - Assertions.assertEquals(DataMaskingRuleState.DISABLED, model.ruleState()); - Assertions.assertEquals("tnovqfzgemjdftul", model.schemaName()); - Assertions.assertEquals("ltducea", model.tableName()); - Assertions.assertEquals("tmczuomejwcwwqi", model.columnName()); - Assertions.assertEquals(DataMaskingFunction.SSN, model.maskingFunction()); - Assertions.assertEquals("ssxmojms", model.numberFrom()); - Assertions.assertEquals("kjprvk", model.numberTo()); - Assertions.assertEquals("fz", model.prefixSize()); - Assertions.assertEquals("jyxgtczh", model.suffixSize()); - Assertions.assertEquals("dbsdshm", model.replacementString()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataMaskingRuleProperties model = - new DataMaskingRuleProperties() - .withAliasName("dsrhnjiv") - .withRuleState(DataMaskingRuleState.DISABLED) - .withSchemaName("tnovqfzgemjdftul") - .withTableName("ltducea") - .withColumnName("tmczuomejwcwwqi") - .withMaskingFunction(DataMaskingFunction.SSN) - .withNumberFrom("ssxmojms") - .withNumberTo("kjprvk") - .withPrefixSize("fz") - .withSuffixSize("jyxgtczh") - .withReplacementString("dbsdshm"); - model = BinaryData.fromObject(model).toObject(DataMaskingRuleProperties.class); - Assertions.assertEquals("dsrhnjiv", model.aliasName()); - Assertions.assertEquals(DataMaskingRuleState.DISABLED, model.ruleState()); - Assertions.assertEquals("tnovqfzgemjdftul", model.schemaName()); - Assertions.assertEquals("ltducea", model.tableName()); - Assertions.assertEquals("tmczuomejwcwwqi", model.columnName()); - Assertions.assertEquals(DataMaskingFunction.SSN, model.maskingFunction()); - Assertions.assertEquals("ssxmojms", model.numberFrom()); - Assertions.assertEquals("kjprvk", model.numberTo()); - Assertions.assertEquals("fz", model.prefixSize()); - Assertions.assertEquals("jyxgtczh", model.suffixSize()); - Assertions.assertEquals("dbsdshm", model.replacementString()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataMaskingRulesCreateOrUpdateWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataMaskingRulesCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 17a8abb521daf..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataMaskingRulesCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.DataMaskingFunction; -import com.azure.resourcemanager.synapse.models.DataMaskingRule; -import com.azure.resourcemanager.synapse.models.DataMaskingRuleState; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DataMaskingRulesCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"id\":\"wly\",\"aliasName\":\"chpqvctsfaeuhww\",\"ruleState\":\"Enabled\",\"schemaName\":\"stvzuzhasupml\",\"tableName\":\"pdpg\",\"columnName\":\"vzqazvbkarkptg\",\"maskingFunction\":\"SSN\",\"numberFrom\":\"ruatsyiysjqhen\",\"numberTo\":\"beqngubabyjde\",\"prefixSize\":\"sc\",\"suffixSize\":\"ydzjemexm\",\"replacementString\":\"kvmuwrxlniwmcp\"},\"location\":\"rdlhvdvmiphbe\",\"kind\":\"qjzmhkdcl\",\"id\":\"croczf\",\"name\":\"unerke\",\"type\":\"uxzshxz\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DataMaskingRule response = - manager - .dataMaskingRules() - .define("aczmuh") - .withExistingSqlPool("abtvkbi", "znhtf", "ficudyhiz") - .withAliasName("mmazdnckid") - .withRuleState(DataMaskingRuleState.DISABLED) - .withSchemaName("glhzqp") - .withTableName("zbawkikcdgfh") - .withColumnName("ssdpjeyoqxded") - .withMaskingFunction(DataMaskingFunction.EMAIL) - .withNumberFrom("iwhagxsur") - .withNumberTo("qrshzzbgullcxiq") - .withPrefixSize("jkoxdupna") - .withSuffixSize("lrouigdmfiv") - .withReplacementString("terdqqi") - .create(); - - Assertions.assertEquals("chpqvctsfaeuhww", response.aliasName()); - Assertions.assertEquals(DataMaskingRuleState.ENABLED, response.ruleState()); - Assertions.assertEquals("stvzuzhasupml", response.schemaName()); - Assertions.assertEquals("pdpg", response.tableName()); - Assertions.assertEquals("vzqazvbkarkptg", response.columnName()); - Assertions.assertEquals(DataMaskingFunction.SSN, response.maskingFunction()); - Assertions.assertEquals("ruatsyiysjqhen", response.numberFrom()); - Assertions.assertEquals("beqngubabyjde", response.numberTo()); - Assertions.assertEquals("sc", response.prefixSize()); - Assertions.assertEquals("ydzjemexm", response.suffixSize()); - Assertions.assertEquals("kvmuwrxlniwmcp", response.replacementString()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataMaskingRulesGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataMaskingRulesGetWithResponseMockTests.java deleted file mode 100644 index 8c7ef766d9732..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataMaskingRulesGetWithResponseMockTests.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.DataMaskingFunction; -import com.azure.resourcemanager.synapse.models.DataMaskingRule; -import com.azure.resourcemanager.synapse.models.DataMaskingRuleState; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DataMaskingRulesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"id\":\"fdz\",\"aliasName\":\"ouzfwofwakuk\",\"ruleState\":\"Disabled\",\"schemaName\":\"tzxsoednlwglihe\",\"tableName\":\"o\",\"columnName\":\"ucmqgisnione\",\"maskingFunction\":\"CCN\",\"numberFrom\":\"dr\",\"numberTo\":\"uenxkgtlzlmt\",\"prefixSize\":\"xcznnhzkb\",\"suffixSize\":\"mxlxmwtygeq\",\"replacementString\":\"sito\"},\"location\":\"ahfsgb\",\"kind\":\"lreesrfwsszvlcwl\",\"id\":\"solntfxxcrqmipf\",\"name\":\"wfo\",\"type\":\"gizmshxxbaizabu\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DataMaskingRule response = - manager - .dataMaskingRules() - .getWithResponse("ftvhkmoogj", "hskb", "gmjgrul", "fogxhcxnw", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ouzfwofwakuk", response.aliasName()); - Assertions.assertEquals(DataMaskingRuleState.DISABLED, response.ruleState()); - Assertions.assertEquals("tzxsoednlwglihe", response.schemaName()); - Assertions.assertEquals("o", response.tableName()); - Assertions.assertEquals("ucmqgisnione", response.columnName()); - Assertions.assertEquals(DataMaskingFunction.CCN, response.maskingFunction()); - Assertions.assertEquals("dr", response.numberFrom()); - Assertions.assertEquals("uenxkgtlzlmt", response.numberTo()); - Assertions.assertEquals("xcznnhzkb", response.prefixSize()); - Assertions.assertEquals("mxlxmwtygeq", response.suffixSize()); - Assertions.assertEquals("sito", response.replacementString()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataMaskingRulesListBySqlPoolMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataMaskingRulesListBySqlPoolMockTests.java deleted file mode 100644 index f1e24963f89b6..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataMaskingRulesListBySqlPoolMockTests.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.DataMaskingFunction; -import com.azure.resourcemanager.synapse.models.DataMaskingRule; -import com.azure.resourcemanager.synapse.models.DataMaskingRuleState; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DataMaskingRulesListBySqlPoolMockTests { - @Test - public void testListBySqlPool() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"id\":\"aydhf\",\"aliasName\":\"ocxm\",\"ruleState\":\"Disabled\",\"schemaName\":\"hksnyzmspamwbw\",\"tableName\":\"bnl\",\"columnName\":\"lcefiqdktw\",\"maskingFunction\":\"Number\",\"numberFrom\":\"ih\",\"numberTo\":\"fliwoynguuzhwvl\",\"prefixSize\":\"p\",\"suffixSize\":\"hjhausy\",\"replacementString\":\"ekymffztsilscvqs\"},\"location\":\"iihfymkoui\",\"kind\":\"eseuugci\",\"id\":\"zhogsmgbvmtdw\",\"name\":\"qbe\",\"type\":\"jnfveg\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.dataMaskingRules().listBySqlPool("nvgskjtoxjd", "jsjznv", "xqqm", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ocxm", response.iterator().next().aliasName()); - Assertions.assertEquals(DataMaskingRuleState.DISABLED, response.iterator().next().ruleState()); - Assertions.assertEquals("hksnyzmspamwbw", response.iterator().next().schemaName()); - Assertions.assertEquals("bnl", response.iterator().next().tableName()); - Assertions.assertEquals("lcefiqdktw", response.iterator().next().columnName()); - Assertions.assertEquals(DataMaskingFunction.NUMBER, response.iterator().next().maskingFunction()); - Assertions.assertEquals("ih", response.iterator().next().numberFrom()); - Assertions.assertEquals("fliwoynguuzhwvl", response.iterator().next().numberTo()); - Assertions.assertEquals("p", response.iterator().next().prefixSize()); - Assertions.assertEquals("hjhausy", response.iterator().next().suffixSize()); - Assertions.assertEquals("ekymffztsilscvqs", response.iterator().next().replacementString()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataWarehouseUserActivitiesInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataWarehouseUserActivitiesInnerTests.java deleted file mode 100644 index b8c3dc8d5c83e..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataWarehouseUserActivitiesInnerTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.DataWarehouseUserActivitiesInner; - -public final class DataWarehouseUserActivitiesInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataWarehouseUserActivitiesInner model = - BinaryData - .fromString( - "{\"properties\":{\"activeQueriesCount\":297001975},\"id\":\"nalaulppg\",\"name\":\"dtpnapnyiropuhp\",\"type\":\"gvpgy\"}") - .toObject(DataWarehouseUserActivitiesInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataWarehouseUserActivitiesInner model = new DataWarehouseUserActivitiesInner(); - model = BinaryData.fromObject(model).toObject(DataWarehouseUserActivitiesInner.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataWarehouseUserActivitiesPropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataWarehouseUserActivitiesPropertiesTests.java deleted file mode 100644 index 26a94001f2c43..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DataWarehouseUserActivitiesPropertiesTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.DataWarehouseUserActivitiesProperties; - -public final class DataWarehouseUserActivitiesPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DataWarehouseUserActivitiesProperties model = - BinaryData - .fromString("{\"activeQueriesCount\":2050375248}") - .toObject(DataWarehouseUserActivitiesProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DataWarehouseUserActivitiesProperties model = new DataWarehouseUserActivitiesProperties(); - model = BinaryData.fromObject(model).toObject(DataWarehouseUserActivitiesProperties.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DatabaseCheckNameRequestTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DatabaseCheckNameRequestTests.java deleted file mode 100644 index 23e355de6ee3d..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DatabaseCheckNameRequestTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.DatabaseCheckNameRequest; -import com.azure.resourcemanager.synapse.models.Type; -import org.junit.jupiter.api.Assertions; - -public final class DatabaseCheckNameRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatabaseCheckNameRequest model = - BinaryData - .fromString("{\"name\":\"xiidloped\",\"type\":\"Microsoft.Synapse/workspaces/kustoPools/databases\"}") - .toObject(DatabaseCheckNameRequest.class); - Assertions.assertEquals("xiidloped", model.name()); - Assertions.assertEquals(Type.MICROSOFT_SYNAPSE_WORKSPACES_KUSTO_POOLS_DATABASES, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatabaseCheckNameRequest model = - new DatabaseCheckNameRequest() - .withName("xiidloped") - .withType(Type.MICROSOFT_SYNAPSE_WORKSPACES_KUSTO_POOLS_DATABASES); - model = BinaryData.fromObject(model).toObject(DatabaseCheckNameRequest.class); - Assertions.assertEquals("xiidloped", model.name()); - Assertions.assertEquals(Type.MICROSOFT_SYNAPSE_WORKSPACES_KUSTO_POOLS_DATABASES, model.type()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DatabaseInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DatabaseInnerTests.java deleted file mode 100644 index 4448e7a058638..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DatabaseInnerTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.DatabaseInner; -import org.junit.jupiter.api.Assertions; - -public final class DatabaseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatabaseInner model = - BinaryData - .fromString( - "{\"kind\":\"Database\",\"location\":\"wyskbruffgll\",\"id\":\"kutvlxhrpqhv\",\"name\":\"blcouqehbhbcdszi\",\"type\":\"yr\"}") - .toObject(DatabaseInner.class); - Assertions.assertEquals("wyskbruffgll", model.location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatabaseInner model = new DatabaseInner().withLocation("wyskbruffgll"); - model = BinaryData.fromObject(model).toObject(DatabaseInner.class); - Assertions.assertEquals("wyskbruffgll", model.location()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DatabaseListResultTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DatabaseListResultTests.java deleted file mode 100644 index 63dbc7a761eee..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DatabaseListResultTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.DatabaseInner; -import com.azure.resourcemanager.synapse.models.DatabaseListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DatabaseListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatabaseListResult model = - BinaryData - .fromString( - "{\"value\":[{\"kind\":\"Database\",\"location\":\"qb\",\"id\":\"h\",\"name\":\"efgwbmqjc\",\"type\":\"ntasfaymxbu\"},{\"kind\":\"Database\",\"location\":\"zealbmqkyo\",\"id\":\"yvfkmbts\",\"name\":\"ahxsgxjcmm\",\"type\":\"rrscubiwsdrnp\"},{\"kind\":\"Database\",\"location\":\"wodiffjxc\",\"id\":\"mmuabwi\",\"name\":\"vjogjonmcyefo\",\"type\":\"zbamwine\"},{\"kind\":\"Database\",\"location\":\"vfkakpold\",\"id\":\"evboclzhzjknyuxg\",\"name\":\"ttxpnrupza\",\"type\":\"mrdixtreki\"}]}") - .toObject(DatabaseListResult.class); - Assertions.assertEquals("qb", model.value().get(0).location()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatabaseListResult model = - new DatabaseListResult() - .withValue( - Arrays - .asList( - new DatabaseInner().withLocation("qb"), - new DatabaseInner().withLocation("zealbmqkyo"), - new DatabaseInner().withLocation("wodiffjxc"), - new DatabaseInner().withLocation("vfkakpold"))); - model = BinaryData.fromObject(model).toObject(DatabaseListResult.class); - Assertions.assertEquals("qb", model.value().get(0).location()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DatabasePrincipalAssignmentCheckNameRequestTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DatabasePrincipalAssignmentCheckNameRequestTests.java deleted file mode 100644 index 1de3ff64d72c7..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DatabasePrincipalAssignmentCheckNameRequestTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.DatabasePrincipalAssignmentCheckNameRequest; -import org.junit.jupiter.api.Assertions; - -public final class DatabasePrincipalAssignmentCheckNameRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatabasePrincipalAssignmentCheckNameRequest model = - BinaryData - .fromString("{\"name\":\"vodrrslblxydkxr\"}") - .toObject(DatabasePrincipalAssignmentCheckNameRequest.class); - Assertions.assertEquals("vodrrslblxydkxr", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatabasePrincipalAssignmentCheckNameRequest model = - new DatabasePrincipalAssignmentCheckNameRequest().withName("vodrrslblxydkxr"); - model = BinaryData.fromObject(model).toObject(DatabasePrincipalAssignmentCheckNameRequest.class); - Assertions.assertEquals("vodrrslblxydkxr", model.name()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DatabasePrincipalAssignmentInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DatabasePrincipalAssignmentInnerTests.java deleted file mode 100644 index e3618e22ed4d1..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DatabasePrincipalAssignmentInnerTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.DatabasePrincipalAssignmentInner; -import com.azure.resourcemanager.synapse.models.DatabasePrincipalRole; -import com.azure.resourcemanager.synapse.models.PrincipalType; -import org.junit.jupiter.api.Assertions; - -public final class DatabasePrincipalAssignmentInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatabasePrincipalAssignmentInner model = - BinaryData - .fromString( - "{\"properties\":{\"principalId\":\"faoytehqpuv\",\"role\":\"Viewer\",\"tenantId\":\"qm\",\"principalType\":\"App\",\"tenantName\":\"ckygroejnndljdju\",\"principalName\":\"br\",\"provisioningState\":\"Moving\",\"aadObjectId\":\"n\"},\"id\":\"eysfaqegplw\",\"name\":\"ysh\",\"type\":\"ddkvbxgkqu\"}") - .toObject(DatabasePrincipalAssignmentInner.class); - Assertions.assertEquals("faoytehqpuv", model.principalId()); - Assertions.assertEquals(DatabasePrincipalRole.VIEWER, model.role()); - Assertions.assertEquals("qm", model.tenantId()); - Assertions.assertEquals(PrincipalType.APP, model.principalType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatabasePrincipalAssignmentInner model = - new DatabasePrincipalAssignmentInner() - .withPrincipalId("faoytehqpuv") - .withRole(DatabasePrincipalRole.VIEWER) - .withTenantId("qm") - .withPrincipalType(PrincipalType.APP); - model = BinaryData.fromObject(model).toObject(DatabasePrincipalAssignmentInner.class); - Assertions.assertEquals("faoytehqpuv", model.principalId()); - Assertions.assertEquals(DatabasePrincipalRole.VIEWER, model.role()); - Assertions.assertEquals("qm", model.tenantId()); - Assertions.assertEquals(PrincipalType.APP, model.principalType()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DatabasePrincipalAssignmentListResultTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DatabasePrincipalAssignmentListResultTests.java deleted file mode 100644 index aff7347f9c167..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DatabasePrincipalAssignmentListResultTests.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.DatabasePrincipalAssignmentInner; -import com.azure.resourcemanager.synapse.models.DatabasePrincipalAssignmentListResult; -import com.azure.resourcemanager.synapse.models.DatabasePrincipalRole; -import com.azure.resourcemanager.synapse.models.PrincipalType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DatabasePrincipalAssignmentListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatabasePrincipalAssignmentListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"principalId\":\"xiwkgfbql\",\"role\":\"Ingestor\",\"tenantId\":\"khychocokulehur\",\"principalType\":\"Group\",\"tenantName\":\"qffawey\",\"principalName\":\"kphyjdxrav\",\"provisioningState\":\"Running\",\"aadObjectId\":\"brxmrgch\"},\"id\":\"pxkiyf\",\"name\":\"j\",\"type\":\"bajbuscgduusi\"},{\"properties\":{\"principalId\":\"cblevpmc\",\"role\":\"User\",\"tenantId\":\"yxkyxlz\",\"principalType\":\"Group\",\"tenantName\":\"gkzz\",\"principalName\":\"afhbzf\",\"provisioningState\":\"Canceled\",\"aadObjectId\":\"mbj\"},\"id\":\"qsczpgvdwnapfdqw\",\"name\":\"wf\",\"type\":\"ptnuwjtkschgc\"},{\"properties\":{\"principalId\":\"y\",\"role\":\"Viewer\",\"tenantId\":\"seyqrhvyeldotjv\",\"principalType\":\"Group\",\"tenantName\":\"iswskuk\",\"principalName\":\"asbvw\",\"provisioningState\":\"Creating\",\"aadObjectId\":\"xkdtxfkndlqvtwkn\"},\"id\":\"mmbugtywatmqaq\",\"name\":\"ueatgroe\",\"type\":\"hoygzcbyfq\"}]}") - .toObject(DatabasePrincipalAssignmentListResult.class); - Assertions.assertEquals("xiwkgfbql", model.value().get(0).principalId()); - Assertions.assertEquals(DatabasePrincipalRole.INGESTOR, model.value().get(0).role()); - Assertions.assertEquals("khychocokulehur", model.value().get(0).tenantId()); - Assertions.assertEquals(PrincipalType.GROUP, model.value().get(0).principalType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatabasePrincipalAssignmentListResult model = - new DatabasePrincipalAssignmentListResult() - .withValue( - Arrays - .asList( - new DatabasePrincipalAssignmentInner() - .withPrincipalId("xiwkgfbql") - .withRole(DatabasePrincipalRole.INGESTOR) - .withTenantId("khychocokulehur") - .withPrincipalType(PrincipalType.GROUP), - new DatabasePrincipalAssignmentInner() - .withPrincipalId("cblevpmc") - .withRole(DatabasePrincipalRole.USER) - .withTenantId("yxkyxlz") - .withPrincipalType(PrincipalType.GROUP), - new DatabasePrincipalAssignmentInner() - .withPrincipalId("y") - .withRole(DatabasePrincipalRole.VIEWER) - .withTenantId("seyqrhvyeldotjv") - .withPrincipalType(PrincipalType.GROUP))); - model = BinaryData.fromObject(model).toObject(DatabasePrincipalAssignmentListResult.class); - Assertions.assertEquals("xiwkgfbql", model.value().get(0).principalId()); - Assertions.assertEquals(DatabasePrincipalRole.INGESTOR, model.value().get(0).role()); - Assertions.assertEquals("khychocokulehur", model.value().get(0).tenantId()); - Assertions.assertEquals(PrincipalType.GROUP, model.value().get(0).principalType()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DatabasePrincipalPropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DatabasePrincipalPropertiesTests.java deleted file mode 100644 index c54f80be4d6e3..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DatabasePrincipalPropertiesTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.DatabasePrincipalProperties; -import com.azure.resourcemanager.synapse.models.DatabasePrincipalRole; -import com.azure.resourcemanager.synapse.models.PrincipalType; -import org.junit.jupiter.api.Assertions; - -public final class DatabasePrincipalPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatabasePrincipalProperties model = - BinaryData - .fromString( - "{\"principalId\":\"ybwptda\",\"role\":\"Monitor\",\"tenantId\":\"vvlfntymtp\",\"principalType\":\"Group\",\"tenantName\":\"enazerohzrsqals\",\"principalName\":\"dnwqapfg\",\"provisioningState\":\"Creating\",\"aadObjectId\":\"vessm\"}") - .toObject(DatabasePrincipalProperties.class); - Assertions.assertEquals("ybwptda", model.principalId()); - Assertions.assertEquals(DatabasePrincipalRole.MONITOR, model.role()); - Assertions.assertEquals("vvlfntymtp", model.tenantId()); - Assertions.assertEquals(PrincipalType.GROUP, model.principalType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatabasePrincipalProperties model = - new DatabasePrincipalProperties() - .withPrincipalId("ybwptda") - .withRole(DatabasePrincipalRole.MONITOR) - .withTenantId("vvlfntymtp") - .withPrincipalType(PrincipalType.GROUP); - model = BinaryData.fromObject(model).toObject(DatabasePrincipalProperties.class); - Assertions.assertEquals("ybwptda", model.principalId()); - Assertions.assertEquals(DatabasePrincipalRole.MONITOR, model.role()); - Assertions.assertEquals("vvlfntymtp", model.tenantId()); - Assertions.assertEquals(PrincipalType.GROUP, model.principalType()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DatabaseStatisticsTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DatabaseStatisticsTests.java deleted file mode 100644 index ee71fa56dbb9b..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DatabaseStatisticsTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.DatabaseStatistics; -import org.junit.jupiter.api.Assertions; - -public final class DatabaseStatisticsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DatabaseStatistics model = BinaryData.fromString("{\"size\":9.833252}").toObject(DatabaseStatistics.class); - Assertions.assertEquals(9.833252F, model.size()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DatabaseStatistics model = new DatabaseStatistics().withSize(9.833252F); - model = BinaryData.fromObject(model).toObject(DatabaseStatistics.class); - Assertions.assertEquals(9.833252F, model.size()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DedicatedSQLminimalTlsSettingsInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DedicatedSQLminimalTlsSettingsInnerTests.java deleted file mode 100644 index 119412e0be95c..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DedicatedSQLminimalTlsSettingsInnerTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.DedicatedSQLminimalTlsSettingsInner; -import org.junit.jupiter.api.Assertions; - -public final class DedicatedSQLminimalTlsSettingsInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DedicatedSQLminimalTlsSettingsInner model = - BinaryData - .fromString( - "{\"location\":\"imlnwiaaomylw\",\"properties\":{\"minimalTlsVersion\":\"ulcsethwwnpj\"},\"id\":\"l\",\"name\":\"zswpchwa\",\"type\":\"fb\"}") - .toObject(DedicatedSQLminimalTlsSettingsInner.class); - Assertions.assertEquals("ulcsethwwnpj", model.minimalTlsVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DedicatedSQLminimalTlsSettingsInner model = - new DedicatedSQLminimalTlsSettingsInner().withMinimalTlsVersion("ulcsethwwnpj"); - model = BinaryData.fromObject(model).toObject(DedicatedSQLminimalTlsSettingsInner.class); - Assertions.assertEquals("ulcsethwwnpj", model.minimalTlsVersion()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DedicatedSQLminimalTlsSettingsListResultTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DedicatedSQLminimalTlsSettingsListResultTests.java deleted file mode 100644 index d4abf6a71d33f..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DedicatedSQLminimalTlsSettingsListResultTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.DedicatedSQLminimalTlsSettingsListResult; - -public final class DedicatedSQLminimalTlsSettingsListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DedicatedSQLminimalTlsSettingsListResult model = - BinaryData - .fromString( - "{\"value\":[{\"location\":\"ykxhdjh\",\"properties\":{\"minimalTlsVersion\":\"mbcxfhbcp\"},\"id\":\"rxvxcjzh\",\"name\":\"izxfpxt\",\"type\":\"qscjavftjuh\"}],\"nextLink\":\"azkmtgguwp\"}") - .toObject(DedicatedSQLminimalTlsSettingsListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DedicatedSQLminimalTlsSettingsListResult model = new DedicatedSQLminimalTlsSettingsListResult(); - model = BinaryData.fromObject(model).toObject(DedicatedSQLminimalTlsSettingsListResult.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DedicatedSQLminimalTlsSettingsPropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DedicatedSQLminimalTlsSettingsPropertiesTests.java deleted file mode 100644 index 5b6526fe610c6..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DedicatedSQLminimalTlsSettingsPropertiesTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.DedicatedSQLminimalTlsSettingsProperties; -import org.junit.jupiter.api.Assertions; - -public final class DedicatedSQLminimalTlsSettingsPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DedicatedSQLminimalTlsSettingsProperties model = - BinaryData - .fromString("{\"minimalTlsVersion\":\"snfepgfewetwlyx\"}") - .toObject(DedicatedSQLminimalTlsSettingsProperties.class); - Assertions.assertEquals("snfepgfewetwlyx", model.minimalTlsVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DedicatedSQLminimalTlsSettingsProperties model = - new DedicatedSQLminimalTlsSettingsProperties().withMinimalTlsVersion("snfepgfewetwlyx"); - model = BinaryData.fromObject(model).toObject(DedicatedSQLminimalTlsSettingsProperties.class); - Assertions.assertEquals("snfepgfewetwlyx", model.minimalTlsVersion()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DynamicExecutorAllocationTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DynamicExecutorAllocationTests.java deleted file mode 100644 index dcfb6624042f0..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/DynamicExecutorAllocationTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.DynamicExecutorAllocation; -import org.junit.jupiter.api.Assertions; - -public final class DynamicExecutorAllocationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DynamicExecutorAllocation model = - BinaryData - .fromString("{\"enabled\":true,\"minExecutors\":1923322437,\"maxExecutors\":55870102}") - .toObject(DynamicExecutorAllocation.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals(1923322437, model.minExecutors()); - Assertions.assertEquals(55870102, model.maxExecutors()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DynamicExecutorAllocation model = - new DynamicExecutorAllocation().withEnabled(true).withMinExecutors(1923322437).withMaxExecutors(55870102); - model = BinaryData.fromObject(model).toObject(DynamicExecutorAllocation.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals(1923322437, model.minExecutors()); - Assertions.assertEquals(55870102, model.maxExecutors()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/EntityReferenceTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/EntityReferenceTests.java deleted file mode 100644 index a82c723f69de5..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/EntityReferenceTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.EntityReference; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeEntityReferenceType; -import org.junit.jupiter.api.Assertions; - -public final class EntityReferenceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EntityReference model = - BinaryData - .fromString("{\"type\":\"LinkedServiceReference\",\"referenceName\":\"hzagxnvhycvdimw\"}") - .toObject(EntityReference.class); - Assertions.assertEquals(IntegrationRuntimeEntityReferenceType.LINKED_SERVICE_REFERENCE, model.type()); - Assertions.assertEquals("hzagxnvhycvdimw", model.referenceName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EntityReference model = - new EntityReference() - .withType(IntegrationRuntimeEntityReferenceType.LINKED_SERVICE_REFERENCE) - .withReferenceName("hzagxnvhycvdimw"); - model = BinaryData.fromObject(model).toObject(EntityReference.class); - Assertions.assertEquals(IntegrationRuntimeEntityReferenceType.LINKED_SERVICE_REFERENCE, model.type()); - Assertions.assertEquals("hzagxnvhycvdimw", model.referenceName()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/EntityResourceTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/EntityResourceTests.java deleted file mode 100644 index c8a50ef4a8aa9..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/EntityResourceTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.EntityResource; - -public final class EntityResourceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EntityResource model = - BinaryData - .fromString( - "{\"etag\":\"mspofapvuhryl\",\"id\":\"iofrzgbzjedmstk\",\"name\":\"nlvxbcuii\",\"type\":\"nktwfansnvpdibmi\"}") - .toObject(EntityResource.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EntityResource model = new EntityResource(); - model = BinaryData.fromObject(model).toObject(EntityResource.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/EnvironmentVariableSetupTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/EnvironmentVariableSetupTests.java deleted file mode 100644 index 15c759255c9ca..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/EnvironmentVariableSetupTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.EnvironmentVariableSetup; -import org.junit.jupiter.api.Assertions; - -public final class EnvironmentVariableSetupTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EnvironmentVariableSetup model = - BinaryData - .fromString( - "{\"type\":\"EnvironmentVariableSetup\",\"typeProperties\":{\"variableName\":\"lxeehuxiq\",\"variableValue\":\"zlrayme\"}}") - .toObject(EnvironmentVariableSetup.class); - Assertions.assertEquals("lxeehuxiq", model.variableName()); - Assertions.assertEquals("zlrayme", model.variableValue()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnvironmentVariableSetup model = - new EnvironmentVariableSetup().withVariableName("lxeehuxiq").withVariableValue("zlrayme"); - model = BinaryData.fromObject(model).toObject(EnvironmentVariableSetup.class); - Assertions.assertEquals("lxeehuxiq", model.variableName()); - Assertions.assertEquals("zlrayme", model.variableValue()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/EnvironmentVariableSetupTypePropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/EnvironmentVariableSetupTypePropertiesTests.java deleted file mode 100644 index 3ac04df1c6c43..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/EnvironmentVariableSetupTypePropertiesTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.EnvironmentVariableSetupTypeProperties; -import org.junit.jupiter.api.Assertions; - -public final class EnvironmentVariableSetupTypePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EnvironmentVariableSetupTypeProperties model = - BinaryData - .fromString("{\"variableName\":\"xls\",\"variableValue\":\"ihmxrfdsajredn\"}") - .toObject(EnvironmentVariableSetupTypeProperties.class); - Assertions.assertEquals("xls", model.variableName()); - Assertions.assertEquals("ihmxrfdsajredn", model.variableValue()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnvironmentVariableSetupTypeProperties model = - new EnvironmentVariableSetupTypeProperties().withVariableName("xls").withVariableValue("ihmxrfdsajredn"); - model = BinaryData.fromObject(model).toObject(EnvironmentVariableSetupTypeProperties.class); - Assertions.assertEquals("xls", model.variableName()); - Assertions.assertEquals("ihmxrfdsajredn", model.variableValue()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/EventGridConnectionPropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/EventGridConnectionPropertiesTests.java deleted file mode 100644 index 897811c09ebc9..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/EventGridConnectionPropertiesTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.EventGridConnectionProperties; -import com.azure.resourcemanager.synapse.models.BlobStorageEventType; -import com.azure.resourcemanager.synapse.models.EventGridDataFormat; -import org.junit.jupiter.api.Assertions; - -public final class EventGridConnectionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EventGridConnectionProperties model = - BinaryData - .fromString( - "{\"storageAccountResourceId\":\"yutrymd\",\"eventHubResourceId\":\"mfjhpycvjqdvdwkq\",\"consumerGroup\":\"ldrlefgnaavua\",\"tableName\":\"tetaoutnpdctuhs\",\"mappingRuleName\":\"efyihduyeuyl\",\"dataFormat\":\"APACHEAVRO\",\"ignoreFirstRecord\":false,\"blobStorageEventType\":\"Microsoft.Storage.BlobRenamed\",\"provisioningState\":\"Running\"}") - .toObject(EventGridConnectionProperties.class); - Assertions.assertEquals("yutrymd", model.storageAccountResourceId()); - Assertions.assertEquals("mfjhpycvjqdvdwkq", model.eventHubResourceId()); - Assertions.assertEquals("ldrlefgnaavua", model.consumerGroup()); - Assertions.assertEquals("tetaoutnpdctuhs", model.tableName()); - Assertions.assertEquals("efyihduyeuyl", model.mappingRuleName()); - Assertions.assertEquals(EventGridDataFormat.APACHEAVRO, model.dataFormat()); - Assertions.assertEquals(false, model.ignoreFirstRecord()); - Assertions.assertEquals(BlobStorageEventType.MICROSOFT_STORAGE_BLOB_RENAMED, model.blobStorageEventType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EventGridConnectionProperties model = - new EventGridConnectionProperties() - .withStorageAccountResourceId("yutrymd") - .withEventHubResourceId("mfjhpycvjqdvdwkq") - .withConsumerGroup("ldrlefgnaavua") - .withTableName("tetaoutnpdctuhs") - .withMappingRuleName("efyihduyeuyl") - .withDataFormat(EventGridDataFormat.APACHEAVRO) - .withIgnoreFirstRecord(false) - .withBlobStorageEventType(BlobStorageEventType.MICROSOFT_STORAGE_BLOB_RENAMED); - model = BinaryData.fromObject(model).toObject(EventGridConnectionProperties.class); - Assertions.assertEquals("yutrymd", model.storageAccountResourceId()); - Assertions.assertEquals("mfjhpycvjqdvdwkq", model.eventHubResourceId()); - Assertions.assertEquals("ldrlefgnaavua", model.consumerGroup()); - Assertions.assertEquals("tetaoutnpdctuhs", model.tableName()); - Assertions.assertEquals("efyihduyeuyl", model.mappingRuleName()); - Assertions.assertEquals(EventGridDataFormat.APACHEAVRO, model.dataFormat()); - Assertions.assertEquals(false, model.ignoreFirstRecord()); - Assertions.assertEquals(BlobStorageEventType.MICROSOFT_STORAGE_BLOB_RENAMED, model.blobStorageEventType()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/EventGridDataConnectionTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/EventGridDataConnectionTests.java deleted file mode 100644 index 299838ca6b65d..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/EventGridDataConnectionTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.BlobStorageEventType; -import com.azure.resourcemanager.synapse.models.EventGridDataConnection; -import com.azure.resourcemanager.synapse.models.EventGridDataFormat; -import org.junit.jupiter.api.Assertions; - -public final class EventGridDataConnectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EventGridDataConnection model = - BinaryData - .fromString( - "{\"kind\":\"EventGrid\",\"properties\":{\"storageAccountResourceId\":\"pmfbfununmpzkr\",\"eventHubResourceId\":\"fyif\",\"consumerGroup\":\"dschlzvfictnkjjw\",\"tableName\":\"wnphbkgfyrto\",\"mappingRuleName\":\"hmjpjscdfpdqwtyg\",\"dataFormat\":\"TSVE\",\"ignoreFirstRecord\":false,\"blobStorageEventType\":\"Microsoft.Storage.BlobCreated\",\"provisioningState\":\"Deleting\"},\"location\":\"xifvqnrxtmbpjpt\",\"id\":\"wjhrsidqpxlbtpa\",\"name\":\"f\",\"type\":\"ngatwmy\"}") - .toObject(EventGridDataConnection.class); - Assertions.assertEquals("xifvqnrxtmbpjpt", model.location()); - Assertions.assertEquals("pmfbfununmpzkr", model.storageAccountResourceId()); - Assertions.assertEquals("fyif", model.eventHubResourceId()); - Assertions.assertEquals("dschlzvfictnkjjw", model.consumerGroup()); - Assertions.assertEquals("wnphbkgfyrto", model.tableName()); - Assertions.assertEquals("hmjpjscdfpdqwtyg", model.mappingRuleName()); - Assertions.assertEquals(EventGridDataFormat.TSVE, model.dataFormat()); - Assertions.assertEquals(false, model.ignoreFirstRecord()); - Assertions.assertEquals(BlobStorageEventType.MICROSOFT_STORAGE_BLOB_CREATED, model.blobStorageEventType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EventGridDataConnection model = - new EventGridDataConnection() - .withLocation("xifvqnrxtmbpjpt") - .withStorageAccountResourceId("pmfbfununmpzkr") - .withEventHubResourceId("fyif") - .withConsumerGroup("dschlzvfictnkjjw") - .withTableName("wnphbkgfyrto") - .withMappingRuleName("hmjpjscdfpdqwtyg") - .withDataFormat(EventGridDataFormat.TSVE) - .withIgnoreFirstRecord(false) - .withBlobStorageEventType(BlobStorageEventType.MICROSOFT_STORAGE_BLOB_CREATED); - model = BinaryData.fromObject(model).toObject(EventGridDataConnection.class); - Assertions.assertEquals("xifvqnrxtmbpjpt", model.location()); - Assertions.assertEquals("pmfbfununmpzkr", model.storageAccountResourceId()); - Assertions.assertEquals("fyif", model.eventHubResourceId()); - Assertions.assertEquals("dschlzvfictnkjjw", model.consumerGroup()); - Assertions.assertEquals("wnphbkgfyrto", model.tableName()); - Assertions.assertEquals("hmjpjscdfpdqwtyg", model.mappingRuleName()); - Assertions.assertEquals(EventGridDataFormat.TSVE, model.dataFormat()); - Assertions.assertEquals(false, model.ignoreFirstRecord()); - Assertions.assertEquals(BlobStorageEventType.MICROSOFT_STORAGE_BLOB_CREATED, model.blobStorageEventType()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/EventHubConnectionPropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/EventHubConnectionPropertiesTests.java deleted file mode 100644 index 3c83cfb059cf9..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/EventHubConnectionPropertiesTests.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.EventHubConnectionProperties; -import com.azure.resourcemanager.synapse.models.Compression; -import com.azure.resourcemanager.synapse.models.EventHubDataFormat; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class EventHubConnectionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EventHubConnectionProperties model = - BinaryData - .fromString( - "{\"eventHubResourceId\":\"gmnhjevd\",\"consumerGroup\":\"znfaj\",\"tableName\":\"kskmqozzkivyhjrl\",\"mappingRuleName\":\"zji\",\"dataFormat\":\"TSVE\",\"eventSystemProperties\":[\"ef\",\"wabs\",\"lronqqlmg\",\"lqxsjxtelex\"],\"compression\":\"None\",\"provisioningState\":\"Succeeded\",\"managedIdentityResourceId\":\"zoolzqoca\"}") - .toObject(EventHubConnectionProperties.class); - Assertions.assertEquals("gmnhjevd", model.eventHubResourceId()); - Assertions.assertEquals("znfaj", model.consumerGroup()); - Assertions.assertEquals("kskmqozzkivyhjrl", model.tableName()); - Assertions.assertEquals("zji", model.mappingRuleName()); - Assertions.assertEquals(EventHubDataFormat.TSVE, model.dataFormat()); - Assertions.assertEquals("ef", model.eventSystemProperties().get(0)); - Assertions.assertEquals(Compression.NONE, model.compression()); - Assertions.assertEquals("zoolzqoca", model.managedIdentityResourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EventHubConnectionProperties model = - new EventHubConnectionProperties() - .withEventHubResourceId("gmnhjevd") - .withConsumerGroup("znfaj") - .withTableName("kskmqozzkivyhjrl") - .withMappingRuleName("zji") - .withDataFormat(EventHubDataFormat.TSVE) - .withEventSystemProperties(Arrays.asList("ef", "wabs", "lronqqlmg", "lqxsjxtelex")) - .withCompression(Compression.NONE) - .withManagedIdentityResourceId("zoolzqoca"); - model = BinaryData.fromObject(model).toObject(EventHubConnectionProperties.class); - Assertions.assertEquals("gmnhjevd", model.eventHubResourceId()); - Assertions.assertEquals("znfaj", model.consumerGroup()); - Assertions.assertEquals("kskmqozzkivyhjrl", model.tableName()); - Assertions.assertEquals("zji", model.mappingRuleName()); - Assertions.assertEquals(EventHubDataFormat.TSVE, model.dataFormat()); - Assertions.assertEquals("ef", model.eventSystemProperties().get(0)); - Assertions.assertEquals(Compression.NONE, model.compression()); - Assertions.assertEquals("zoolzqoca", model.managedIdentityResourceId()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/EventHubDataConnectionTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/EventHubDataConnectionTests.java deleted file mode 100644 index a1312eb46ad45..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/EventHubDataConnectionTests.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.Compression; -import com.azure.resourcemanager.synapse.models.EventHubDataConnection; -import com.azure.resourcemanager.synapse.models.EventHubDataFormat; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class EventHubDataConnectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EventHubDataConnection model = - BinaryData - .fromString( - "{\"kind\":\"EventHub\",\"properties\":{\"eventHubResourceId\":\"lhdjzqd\",\"consumerGroup\":\"a\",\"tableName\":\"vpsozjiihjri\",\"mappingRuleName\":\"mrzoep\",\"dataFormat\":\"PARQUET\",\"eventSystemProperties\":[\"wnjkgvfn\"],\"compression\":\"GZip\",\"provisioningState\":\"Moving\",\"managedIdentityResourceId\":\"q\"},\"location\":\"ibtyibuyvpirfqjp\",\"id\":\"noow\",\"name\":\"bedenrexkx\",\"type\":\"hxvucnu\"}") - .toObject(EventHubDataConnection.class); - Assertions.assertEquals("ibtyibuyvpirfqjp", model.location()); - Assertions.assertEquals("lhdjzqd", model.eventHubResourceId()); - Assertions.assertEquals("a", model.consumerGroup()); - Assertions.assertEquals("vpsozjiihjri", model.tableName()); - Assertions.assertEquals("mrzoep", model.mappingRuleName()); - Assertions.assertEquals(EventHubDataFormat.PARQUET, model.dataFormat()); - Assertions.assertEquals("wnjkgvfn", model.eventSystemProperties().get(0)); - Assertions.assertEquals(Compression.GZIP, model.compression()); - Assertions.assertEquals("q", model.managedIdentityResourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EventHubDataConnection model = - new EventHubDataConnection() - .withLocation("ibtyibuyvpirfqjp") - .withEventHubResourceId("lhdjzqd") - .withConsumerGroup("a") - .withTableName("vpsozjiihjri") - .withMappingRuleName("mrzoep") - .withDataFormat(EventHubDataFormat.PARQUET) - .withEventSystemProperties(Arrays.asList("wnjkgvfn")) - .withCompression(Compression.GZIP) - .withManagedIdentityResourceId("q"); - model = BinaryData.fromObject(model).toObject(EventHubDataConnection.class); - Assertions.assertEquals("ibtyibuyvpirfqjp", model.location()); - Assertions.assertEquals("lhdjzqd", model.eventHubResourceId()); - Assertions.assertEquals("a", model.consumerGroup()); - Assertions.assertEquals("vpsozjiihjri", model.tableName()); - Assertions.assertEquals("mrzoep", model.mappingRuleName()); - Assertions.assertEquals(EventHubDataFormat.PARQUET, model.dataFormat()); - Assertions.assertEquals("wnjkgvfn", model.eventSystemProperties().get(0)); - Assertions.assertEquals(Compression.GZIP, model.compression()); - Assertions.assertEquals("q", model.managedIdentityResourceId()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/FollowerDatabaseDefinitionInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/FollowerDatabaseDefinitionInnerTests.java deleted file mode 100644 index ac7b6d41d6223..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/FollowerDatabaseDefinitionInnerTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.FollowerDatabaseDefinitionInner; -import org.junit.jupiter.api.Assertions; - -public final class FollowerDatabaseDefinitionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FollowerDatabaseDefinitionInner model = - BinaryData - .fromString( - "{\"clusterResourceId\":\"jelaqacigele\",\"attachedDatabaseConfigurationName\":\"hdbvqvwzkjop\",\"databaseName\":\"eonrlkwzdqybxce\"}") - .toObject(FollowerDatabaseDefinitionInner.class); - Assertions.assertEquals("jelaqacigele", model.kustoPoolResourceId()); - Assertions.assertEquals("hdbvqvwzkjop", model.attachedDatabaseConfigurationName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FollowerDatabaseDefinitionInner model = - new FollowerDatabaseDefinitionInner() - .withKustoPoolResourceId("jelaqacigele") - .withAttachedDatabaseConfigurationName("hdbvqvwzkjop"); - model = BinaryData.fromObject(model).toObject(FollowerDatabaseDefinitionInner.class); - Assertions.assertEquals("jelaqacigele", model.kustoPoolResourceId()); - Assertions.assertEquals("hdbvqvwzkjop", model.attachedDatabaseConfigurationName()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/FollowerDatabaseListResultTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/FollowerDatabaseListResultTests.java deleted file mode 100644 index 02362658d5e82..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/FollowerDatabaseListResultTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.FollowerDatabaseDefinitionInner; -import com.azure.resourcemanager.synapse.models.FollowerDatabaseListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class FollowerDatabaseListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - FollowerDatabaseListResult model = - BinaryData - .fromString( - "{\"value\":[{\"clusterResourceId\":\"yqyybxubmdna\",\"attachedDatabaseConfigurationName\":\"cbq\",\"databaseName\":\"e\"}]}") - .toObject(FollowerDatabaseListResult.class); - Assertions.assertEquals("yqyybxubmdna", model.value().get(0).kustoPoolResourceId()); - Assertions.assertEquals("cbq", model.value().get(0).attachedDatabaseConfigurationName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - FollowerDatabaseListResult model = - new FollowerDatabaseListResult() - .withValue( - Arrays - .asList( - new FollowerDatabaseDefinitionInner() - .withKustoPoolResourceId("yqyybxubmdna") - .withAttachedDatabaseConfigurationName("cbq"))); - model = BinaryData.fromObject(model).toObject(FollowerDatabaseListResult.class); - Assertions.assertEquals("yqyybxubmdna", model.value().get(0).kustoPoolResourceId()); - Assertions.assertEquals("cbq", model.value().get(0).attachedDatabaseConfigurationName()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/GeoBackupPolicyInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/GeoBackupPolicyInnerTests.java deleted file mode 100644 index b344d399e8f1f..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/GeoBackupPolicyInnerTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.GeoBackupPolicyInner; -import com.azure.resourcemanager.synapse.models.GeoBackupPolicyState; -import org.junit.jupiter.api.Assertions; - -public final class GeoBackupPolicyInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GeoBackupPolicyInner model = - BinaryData - .fromString( - "{\"properties\":{\"state\":\"Enabled\",\"storageType\":\"sd\"},\"kind\":\"ouwaboekqvkeln\",\"location\":\"vbxwyjsflhh\",\"id\":\"aalnjixi\",\"name\":\"xyawj\",\"type\":\"yaqcslyjpkiidz\"}") - .toObject(GeoBackupPolicyInner.class); - Assertions.assertEquals(GeoBackupPolicyState.ENABLED, model.state()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GeoBackupPolicyInner model = new GeoBackupPolicyInner().withState(GeoBackupPolicyState.ENABLED); - model = BinaryData.fromObject(model).toObject(GeoBackupPolicyInner.class); - Assertions.assertEquals(GeoBackupPolicyState.ENABLED, model.state()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/GeoBackupPolicyListResultTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/GeoBackupPolicyListResultTests.java deleted file mode 100644 index e09233dc5febf..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/GeoBackupPolicyListResultTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.GeoBackupPolicyInner; -import com.azure.resourcemanager.synapse.models.GeoBackupPolicyListResult; -import com.azure.resourcemanager.synapse.models.GeoBackupPolicyState; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class GeoBackupPolicyListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GeoBackupPolicyListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"state\":\"Enabled\",\"storageType\":\"v\"},\"kind\":\"jkbegibtnmxiebww\",\"location\":\"oayqc\",\"id\":\"wrtz\",\"name\":\"uzgwyzmhtx\",\"type\":\"ngmtsavjcb\"},{\"properties\":{\"state\":\"Enabled\",\"storageType\":\"qpsrknftguvri\"},\"kind\":\"prwmdyvxqt\",\"location\":\"riwwroy\",\"id\":\"bexrmcq\",\"name\":\"bycnojvkn\",\"type\":\"e\"},{\"properties\":{\"state\":\"Enabled\",\"storageType\":\"gzva\"},\"kind\":\"pjyzhpv\",\"location\":\"zcjrvxdjzlmwlx\",\"id\":\"vu\",\"name\":\"fhzovawjvzunluth\",\"type\":\"n\"},{\"properties\":{\"state\":\"Disabled\",\"storageType\":\"xipeilpjzuaejx\"},\"kind\":\"ltskzbbtd\",\"location\":\"mv\",\"id\":\"ekg\",\"name\":\"wozuhkf\",\"type\":\"bsjyofdx\"}]}") - .toObject(GeoBackupPolicyListResult.class); - Assertions.assertEquals(GeoBackupPolicyState.ENABLED, model.value().get(0).state()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GeoBackupPolicyListResult model = - new GeoBackupPolicyListResult() - .withValue( - Arrays - .asList( - new GeoBackupPolicyInner().withState(GeoBackupPolicyState.ENABLED), - new GeoBackupPolicyInner().withState(GeoBackupPolicyState.ENABLED), - new GeoBackupPolicyInner().withState(GeoBackupPolicyState.ENABLED), - new GeoBackupPolicyInner().withState(GeoBackupPolicyState.DISABLED))); - model = BinaryData.fromObject(model).toObject(GeoBackupPolicyListResult.class); - Assertions.assertEquals(GeoBackupPolicyState.ENABLED, model.value().get(0).state()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/GeoBackupPolicyPropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/GeoBackupPolicyPropertiesTests.java deleted file mode 100644 index 8a6615181cdd7..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/GeoBackupPolicyPropertiesTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.GeoBackupPolicyProperties; -import com.azure.resourcemanager.synapse.models.GeoBackupPolicyState; -import org.junit.jupiter.api.Assertions; - -public final class GeoBackupPolicyPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GeoBackupPolicyProperties model = - BinaryData - .fromString("{\"state\":\"Enabled\",\"storageType\":\"znelixhnrztfolh\"}") - .toObject(GeoBackupPolicyProperties.class); - Assertions.assertEquals(GeoBackupPolicyState.ENABLED, model.state()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GeoBackupPolicyProperties model = new GeoBackupPolicyProperties().withState(GeoBackupPolicyState.ENABLED); - model = BinaryData.fromObject(model).toObject(GeoBackupPolicyProperties.class); - Assertions.assertEquals(GeoBackupPolicyState.ENABLED, model.state()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/GetSsisObjectMetadataRequestTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/GetSsisObjectMetadataRequestTests.java deleted file mode 100644 index de7569db6a169..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/GetSsisObjectMetadataRequestTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.GetSsisObjectMetadataRequest; -import org.junit.jupiter.api.Assertions; - -public final class GetSsisObjectMetadataRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GetSsisObjectMetadataRequest model = - BinaryData.fromString("{\"metadataPath\":\"prltzkatbhjmz\"}").toObject(GetSsisObjectMetadataRequest.class); - Assertions.assertEquals("prltzkatbhjmz", model.metadataPath()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GetSsisObjectMetadataRequest model = new GetSsisObjectMetadataRequest().withMetadataPath("prltzkatbhjmz"); - model = BinaryData.fromObject(model).toObject(GetSsisObjectMetadataRequest.class); - Assertions.assertEquals("prltzkatbhjmz", model.metadataPath()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/GetsIntegrationRuntimeEnableInteractivequeryWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/GetsIntegrationRuntimeEnableInteractivequeryWithResponseMockTests.java deleted file mode 100644 index 1194bc372914a..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/GetsIntegrationRuntimeEnableInteractivequeryWithResponseMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeEnableinteractivequery; -import com.azure.resourcemanager.synapse.models.WorkspaceStatus; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class GetsIntegrationRuntimeEnableInteractivequeryWithResponseMockTests { - @Test - public void testIntegrationRuntimeEnableInteractivequeryWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"status\":\"Succeeded\",\"name\":\"kwdrqmrp\",\"properties\":\"datauuonjkkxukguehvv\",\"error\":\"joegcjojlleuidp\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - IntegrationRuntimeEnableinteractivequery response = - manager - .gets() - .integrationRuntimeEnableInteractivequeryWithResponse( - "fdtncmspsanma", "eubkqiqmlf", "hlq", "skkqjmxptuei", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(WorkspaceStatus.SUCCEEDED, response.status()); - Assertions.assertEquals("kwdrqmrp", response.name()); - Assertions.assertEquals("joegcjojlleuidp", response.error()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/GetsIntegrationRuntimeStartWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/GetsIntegrationRuntimeStartWithResponseMockTests.java deleted file mode 100644 index 1cd324d387716..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/GetsIntegrationRuntimeStartWithResponseMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeOperationStatus; -import com.azure.resourcemanager.synapse.models.WorkspaceStatus; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class GetsIntegrationRuntimeStartWithResponseMockTests { - @Test - public void testIntegrationRuntimeStartWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"status\":\"Succeeded\",\"name\":\"fmthieatn\",\"properties\":\"datarnminzqplgtkih\",\"error\":\"ikzsrzfffji\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - IntegrationRuntimeOperationStatus response = - manager - .gets() - .integrationRuntimeStartWithResponse( - "yhxess", "vrkdpsqeq", "bdxmd", "esbrujbjpppktl", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(WorkspaceStatus.SUCCEEDED, response.status()); - Assertions.assertEquals("fmthieatn", response.name()); - Assertions.assertEquals("ikzsrzfffji", response.error()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/GetsIntegrationRuntimeStopWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/GetsIntegrationRuntimeStopWithResponseMockTests.java deleted file mode 100644 index 1c20fc5401ba3..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/GetsIntegrationRuntimeStopWithResponseMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeStopOperationStatus; -import com.azure.resourcemanager.synapse.models.WorkspaceStatus; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class GetsIntegrationRuntimeStopWithResponseMockTests { - @Test - public void testIntegrationRuntimeStopWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"status\":\"Succeeded\",\"name\":\"gga\",\"properties\":\"datadgtfpeersc\",\"error\":\"rnrnjrcufmbgacnr\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - IntegrationRuntimeStopOperationStatus response = - manager - .gets() - .integrationRuntimeStopWithResponse( - "z", "bpntogkensckhb", "carmoyfx", "kwykuqdndxl", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(WorkspaceStatus.SUCCEEDED, response.status()); - Assertions.assertEquals("gga", response.name()); - Assertions.assertEquals("rnrnjrcufmbgacnr", response.error()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeComputePropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeComputePropertiesTests.java deleted file mode 100644 index 4790304c267d7..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeComputePropertiesTests.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.DataFlowComputeType; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeComputeProperties; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeDataFlowProperties; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeVNetProperties; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class IntegrationRuntimeComputePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IntegrationRuntimeComputeProperties model = - BinaryData - .fromString( - "{\"location\":\"itpkpztrgdg\",\"nodeSize\":\"coqra\",\"numberOfNodes\":2040757308,\"maxParallelExecutionsPerNode\":601079141,\"dataFlowProperties\":{\"computeType\":\"General\",\"coreCount\":2036171481,\"timeToLive\":151899144,\"cleanup\":false,\"\":{\"yltcoqcuj\":\"datavskbuhzacaq\",\"ztjofqcvovjufyc\":\"datadsxzakuejkmvb\",\"gthortudaw\":\"datajmlbemyejiriux\",\"qerpptcbgqnzm\":\"datapjfe\"}},\"vNetProperties\":{\"vNetId\":\"ilialwcjgc\",\"subnet\":\"bcccgzpra\",\"publicIPs\":[\"yuffatsgf\",\"ipwcxbyu\"],\"subnetId\":\"iqdxyurnpnuh\",\"\":{\"yl\":\"dataccnuhiig\",\"vxva\":\"dataui\",\"lbnb\":\"datavcrk\"}},\"\":{\"syhzlwx\":\"datah\"}}") - .toObject(IntegrationRuntimeComputeProperties.class); - Assertions.assertEquals("itpkpztrgdg", model.location()); - Assertions.assertEquals("coqra", model.nodeSize()); - Assertions.assertEquals(2040757308, model.numberOfNodes()); - Assertions.assertEquals(601079141, model.maxParallelExecutionsPerNode()); - Assertions.assertEquals(DataFlowComputeType.GENERAL, model.dataFlowProperties().computeType()); - Assertions.assertEquals(2036171481, model.dataFlowProperties().coreCount()); - Assertions.assertEquals(151899144, model.dataFlowProperties().timeToLive()); - Assertions.assertEquals(false, model.dataFlowProperties().cleanup()); - Assertions.assertEquals("ilialwcjgc", model.vNetProperties().vNetId()); - Assertions.assertEquals("bcccgzpra", model.vNetProperties().subnet()); - Assertions.assertEquals("yuffatsgf", model.vNetProperties().publicIPs().get(0)); - Assertions.assertEquals("iqdxyurnpnuh", model.vNetProperties().subnetId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IntegrationRuntimeComputeProperties model = - new IntegrationRuntimeComputeProperties() - .withLocation("itpkpztrgdg") - .withNodeSize("coqra") - .withNumberOfNodes(2040757308) - .withMaxParallelExecutionsPerNode(601079141) - .withDataFlowProperties( - new IntegrationRuntimeDataFlowProperties() - .withComputeType(DataFlowComputeType.GENERAL) - .withCoreCount(2036171481) - .withTimeToLive(151899144) - .withCleanup(false) - .withAdditionalProperties(mapOf())) - .withVNetProperties( - new IntegrationRuntimeVNetProperties() - .withVNetId("ilialwcjgc") - .withSubnet("bcccgzpra") - .withPublicIPs(Arrays.asList("yuffatsgf", "ipwcxbyu")) - .withSubnetId("iqdxyurnpnuh") - .withAdditionalProperties(mapOf())) - .withAdditionalProperties(mapOf()); - model = BinaryData.fromObject(model).toObject(IntegrationRuntimeComputeProperties.class); - Assertions.assertEquals("itpkpztrgdg", model.location()); - Assertions.assertEquals("coqra", model.nodeSize()); - Assertions.assertEquals(2040757308, model.numberOfNodes()); - Assertions.assertEquals(601079141, model.maxParallelExecutionsPerNode()); - Assertions.assertEquals(DataFlowComputeType.GENERAL, model.dataFlowProperties().computeType()); - Assertions.assertEquals(2036171481, model.dataFlowProperties().coreCount()); - Assertions.assertEquals(151899144, model.dataFlowProperties().timeToLive()); - Assertions.assertEquals(false, model.dataFlowProperties().cleanup()); - Assertions.assertEquals("ilialwcjgc", model.vNetProperties().vNetId()); - Assertions.assertEquals("bcccgzpra", model.vNetProperties().subnet()); - Assertions.assertEquals("yuffatsgf", model.vNetProperties().publicIPs().get(0)); - Assertions.assertEquals("iqdxyurnpnuh", model.vNetProperties().subnetId()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeCredentialsSyncWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeCredentialsSyncWithResponseMockTests.java deleted file mode 100644 index cbe783e653ace..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeCredentialsSyncWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IntegrationRuntimeCredentialsSyncWithResponseMockTests { - @Test - public void testSyncWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .integrationRuntimeCredentials() - .syncWithResponse("iyvndjokgwes", "mzqhrqp", "zlpejtznxlueaujq", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeDataFlowPropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeDataFlowPropertiesTests.java deleted file mode 100644 index 93c4ec41a0f50..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeDataFlowPropertiesTests.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.DataFlowComputeType; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeDataFlowProperties; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class IntegrationRuntimeDataFlowPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IntegrationRuntimeDataFlowProperties model = - BinaryData - .fromString( - "{\"computeType\":\"General\",\"coreCount\":1277865813,\"timeToLive\":92922352,\"cleanup\":true,\"\":{\"bdweade\":\"datad\",\"mvmmagoaqylkjz\":\"datazmwntopagt\"}}") - .toObject(IntegrationRuntimeDataFlowProperties.class); - Assertions.assertEquals(DataFlowComputeType.GENERAL, model.computeType()); - Assertions.assertEquals(1277865813, model.coreCount()); - Assertions.assertEquals(92922352, model.timeToLive()); - Assertions.assertEquals(true, model.cleanup()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IntegrationRuntimeDataFlowProperties model = - new IntegrationRuntimeDataFlowProperties() - .withComputeType(DataFlowComputeType.GENERAL) - .withCoreCount(1277865813) - .withTimeToLive(92922352) - .withCleanup(true) - .withAdditionalProperties(mapOf()); - model = BinaryData.fromObject(model).toObject(IntegrationRuntimeDataFlowProperties.class); - Assertions.assertEquals(DataFlowComputeType.GENERAL, model.computeType()); - Assertions.assertEquals(1277865813, model.coreCount()); - Assertions.assertEquals(92922352, model.timeToLive()); - Assertions.assertEquals(true, model.cleanup()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeDataProxyPropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeDataProxyPropertiesTests.java deleted file mode 100644 index 1177ec724f4fd..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeDataProxyPropertiesTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.EntityReference; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeDataProxyProperties; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeEntityReferenceType; -import org.junit.jupiter.api.Assertions; - -public final class IntegrationRuntimeDataProxyPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IntegrationRuntimeDataProxyProperties model = - BinaryData - .fromString( - "{\"connectVia\":{\"type\":\"LinkedServiceReference\",\"referenceName\":\"wofali\"},\"stagingLinkedService\":{\"type\":\"IntegrationRuntimeReference\",\"referenceName\":\"iqtamtyvsknxrw\"},\"path\":\"wnv\"}") - .toObject(IntegrationRuntimeDataProxyProperties.class); - Assertions - .assertEquals(IntegrationRuntimeEntityReferenceType.LINKED_SERVICE_REFERENCE, model.connectVia().type()); - Assertions.assertEquals("wofali", model.connectVia().referenceName()); - Assertions - .assertEquals( - IntegrationRuntimeEntityReferenceType.INTEGRATION_RUNTIME_REFERENCE, - model.stagingLinkedService().type()); - Assertions.assertEquals("iqtamtyvsknxrw", model.stagingLinkedService().referenceName()); - Assertions.assertEquals("wnv", model.path()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IntegrationRuntimeDataProxyProperties model = - new IntegrationRuntimeDataProxyProperties() - .withConnectVia( - new EntityReference() - .withType(IntegrationRuntimeEntityReferenceType.LINKED_SERVICE_REFERENCE) - .withReferenceName("wofali")) - .withStagingLinkedService( - new EntityReference() - .withType(IntegrationRuntimeEntityReferenceType.INTEGRATION_RUNTIME_REFERENCE) - .withReferenceName("iqtamtyvsknxrw")) - .withPath("wnv"); - model = BinaryData.fromObject(model).toObject(IntegrationRuntimeDataProxyProperties.class); - Assertions - .assertEquals(IntegrationRuntimeEntityReferenceType.LINKED_SERVICE_REFERENCE, model.connectVia().type()); - Assertions.assertEquals("wofali", model.connectVia().referenceName()); - Assertions - .assertEquals( - IntegrationRuntimeEntityReferenceType.INTEGRATION_RUNTIME_REFERENCE, - model.stagingLinkedService().type()); - Assertions.assertEquals("iqtamtyvsknxrw", model.stagingLinkedService().referenceName()); - Assertions.assertEquals("wnv", model.path()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeEnableinteractivequeryInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeEnableinteractivequeryInnerTests.java deleted file mode 100644 index a1329c49795ea..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeEnableinteractivequeryInnerTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.IntegrationRuntimeEnableinteractivequeryInner; -import com.azure.resourcemanager.synapse.models.WorkspaceStatus; -import org.junit.jupiter.api.Assertions; - -public final class IntegrationRuntimeEnableinteractivequeryInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IntegrationRuntimeEnableinteractivequeryInner model = - BinaryData - .fromString( - "{\"status\":\"Failed\",\"name\":\"bgdlfgtdysna\",\"properties\":\"dataflq\",\"error\":\"tqhamzjrw\"}") - .toObject(IntegrationRuntimeEnableinteractivequeryInner.class); - Assertions.assertEquals(WorkspaceStatus.FAILED, model.status()); - Assertions.assertEquals("bgdlfgtdysna", model.name()); - Assertions.assertEquals("tqhamzjrw", model.error()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IntegrationRuntimeEnableinteractivequeryInner model = - new IntegrationRuntimeEnableinteractivequeryInner() - .withStatus(WorkspaceStatus.FAILED) - .withName("bgdlfgtdysna") - .withProperties("dataflq") - .withError("tqhamzjrw"); - model = BinaryData.fromObject(model).toObject(IntegrationRuntimeEnableinteractivequeryInner.class); - Assertions.assertEquals(WorkspaceStatus.FAILED, model.status()); - Assertions.assertEquals("bgdlfgtdysna", model.name()); - Assertions.assertEquals("tqhamzjrw", model.error()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeListResponseTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeListResponseTests.java deleted file mode 100644 index 7cccbc579e649..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeListResponseTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.IntegrationRuntimeResourceInner; -import com.azure.resourcemanager.synapse.models.IntegrationRuntime; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeListResponse; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class IntegrationRuntimeListResponseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IntegrationRuntimeListResponse model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"type\":\"IntegrationRuntime\",\"description\":\"zytqjtwhauunfpr\",\"\":{}},\"etag\":\"etlxsm\",\"id\":\"pddouifamowaziyn\",\"name\":\"nlqwzdvpiwhx\",\"type\":\"szdtmaajquh\"},{\"properties\":{\"type\":\"IntegrationRuntime\",\"description\":\"ylr\",\"\":{}},\"etag\":\"ty\",\"id\":\"jbmzyospspsh\",\"name\":\"kfkyjp\",\"type\":\"sp\"},{\"properties\":{\"type\":\"IntegrationRuntime\",\"description\":\"ssdfpp\",\"\":{}},\"etag\":\"tieyujtvczkcny\",\"id\":\"rxmunjdxvgln\",\"name\":\"vxlx\",\"type\":\"aglqivbgkcvkh\"}],\"nextLink\":\"vuqd\"}") - .toObject(IntegrationRuntimeListResponse.class); - Assertions.assertEquals("zytqjtwhauunfpr", model.value().get(0).properties().description()); - Assertions.assertEquals("vuqd", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IntegrationRuntimeListResponse model = - new IntegrationRuntimeListResponse() - .withValue( - Arrays - .asList( - new IntegrationRuntimeResourceInner() - .withProperties( - new IntegrationRuntime() - .withDescription("zytqjtwhauunfpr") - .withAdditionalProperties(mapOf("type", "IntegrationRuntime"))), - new IntegrationRuntimeResourceInner() - .withProperties( - new IntegrationRuntime() - .withDescription("ylr") - .withAdditionalProperties(mapOf("type", "IntegrationRuntime"))), - new IntegrationRuntimeResourceInner() - .withProperties( - new IntegrationRuntime() - .withDescription("ssdfpp") - .withAdditionalProperties(mapOf("type", "IntegrationRuntime"))))) - .withNextLink("vuqd"); - model = BinaryData.fromObject(model).toObject(IntegrationRuntimeListResponse.class); - Assertions.assertEquals("zytqjtwhauunfpr", model.value().get(0).properties().description()); - Assertions.assertEquals("vuqd", model.nextLink()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeMonitoringDataInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeMonitoringDataInnerTests.java deleted file mode 100644 index 41c8c90cadc93..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeMonitoringDataInnerTests.java +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.IntegrationRuntimeMonitoringDataInner; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeNodeMonitoringData; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class IntegrationRuntimeMonitoringDataInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IntegrationRuntimeMonitoringDataInner model = - BinaryData - .fromString( - "{\"name\":\"jfrnxousxauzlwv\",\"nodes\":[{\"nodeName\":\"ohqfzizv\",\"availableMemoryInMB\":1707376707,\"cpuUtilization\":1537872857,\"concurrentJobsLimit\":898982207,\"concurrentJobsRunning\":2035263923,\"maxConcurrentJobs\":1281920058,\"sentBytes\":12.24882,\"receivedBytes\":47.57043,\"\":{\"lu\":\"dataovmribiattg\",\"fhnykzcugs\":\"datafotang\",\"xmcuqud\":\"datavxwlmzqwmvtxnj\"}},{\"nodeName\":\"vclx\",\"availableMemoryInMB\":1138354387,\"cpuUtilization\":267466114,\"concurrentJobsLimit\":1887329670,\"concurrentJobsRunning\":1186529927,\"maxConcurrentJobs\":1392311287,\"sentBytes\":75.20067,\"receivedBytes\":24.185776,\"\":{\"oxgjiuqhibt\":\"datazphdugneiknp\",\"pqwjedm\":\"dataz\",\"lkm\":\"datarrxxgewpktvq\"}},{\"nodeName\":\"zoyhlfbcgwg\",\"availableMemoryInMB\":1700222183,\"cpuUtilization\":325536454,\"concurrentJobsLimit\":809854276,\"concurrentJobsRunning\":189021776,\"maxConcurrentJobs\":1567586671,\"sentBytes\":49.565147,\"receivedBytes\":30.378746,\"\":{\"zpofoiyjwpfilk\":\"dataujqlafcbahh\",\"ogphuartvtiu\":\"datakkholvdndvia\",\"ahmnxhkxjqirw\":\"datayefchnm\"}},{\"nodeName\":\"eooxffifh\",\"availableMemoryInMB\":2004143928,\"cpuUtilization\":109793124,\"concurrentJobsLimit\":225627049,\"concurrentJobsRunning\":682704724,\"maxConcurrentJobs\":557932259,\"sentBytes\":78.87173,\"receivedBytes\":99.20141,\"\":{\"abo\":\"dataamhsycxhxzgazt\"}}]}") - .toObject(IntegrationRuntimeMonitoringDataInner.class); - Assertions.assertEquals("jfrnxousxauzlwv", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IntegrationRuntimeMonitoringDataInner model = - new IntegrationRuntimeMonitoringDataInner() - .withName("jfrnxousxauzlwv") - .withNodes( - Arrays - .asList( - new IntegrationRuntimeNodeMonitoringData() - .withAdditionalProperties( - mapOf( - "nodeName", - "ohqfzizv", - "cpuUtilization", - 1537872857, - "receivedBytes", - 47.57043f, - "concurrentJobsLimit", - 898982207, - "concurrentJobsRunning", - 2035263923, - "maxConcurrentJobs", - 1281920058, - "availableMemoryInMB", - 1707376707, - "sentBytes", - 12.24882f)), - new IntegrationRuntimeNodeMonitoringData() - .withAdditionalProperties( - mapOf( - "nodeName", - "vclx", - "cpuUtilization", - 267466114, - "receivedBytes", - 24.185776f, - "concurrentJobsLimit", - 1887329670, - "concurrentJobsRunning", - 1186529927, - "maxConcurrentJobs", - 1392311287, - "availableMemoryInMB", - 1138354387, - "sentBytes", - 75.20067f)), - new IntegrationRuntimeNodeMonitoringData() - .withAdditionalProperties( - mapOf( - "nodeName", - "zoyhlfbcgwg", - "cpuUtilization", - 325536454, - "receivedBytes", - 30.378746f, - "concurrentJobsLimit", - 809854276, - "concurrentJobsRunning", - 189021776, - "maxConcurrentJobs", - 1567586671, - "availableMemoryInMB", - 1700222183, - "sentBytes", - 49.565147f)), - new IntegrationRuntimeNodeMonitoringData() - .withAdditionalProperties( - mapOf( - "nodeName", - "eooxffifh", - "cpuUtilization", - 109793124, - "receivedBytes", - 99.20141f, - "concurrentJobsLimit", - 225627049, - "concurrentJobsRunning", - 682704724, - "maxConcurrentJobs", - 557932259, - "availableMemoryInMB", - 2004143928, - "sentBytes", - 78.87173f)))); - model = BinaryData.fromObject(model).toObject(IntegrationRuntimeMonitoringDataInner.class); - Assertions.assertEquals("jfrnxousxauzlwv", model.name()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeMonitoringDatasListWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeMonitoringDatasListWithResponseMockTests.java deleted file mode 100644 index 150fed612bb7e..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeMonitoringDatasListWithResponseMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeMonitoringData; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IntegrationRuntimeMonitoringDatasListWithResponseMockTests { - @Test - public void testListWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"name\":\"vvbq\",\"nodes\":[{\"nodeName\":\"pecqxgiqasifubn\",\"availableMemoryInMB\":1709688838,\"cpuUtilization\":1611996375,\"concurrentJobsLimit\":1639928530,\"concurrentJobsRunning\":1006537929,\"maxConcurrentJobs\":1346091286,\"sentBytes\":19.122356,\"receivedBytes\":85.350815,\"\":{\"ztsm\":\"datapsvyouweuiyxfw\"}},{\"nodeName\":\"b\",\"availableMemoryInMB\":1928757915,\"cpuUtilization\":1814212451,\"concurrentJobsLimit\":1282004231,\"concurrentJobsRunning\":144160834,\"maxConcurrentJobs\":391617196,\"sentBytes\":82.4508,\"receivedBytes\":53.69606,\"\":{\"gfzdgjfcycrsvl\":\"datado\",\"ajquzxpixhyoi\":\"datayyhigqkzjuqw\",\"bennmfkbp\":\"datanfdbgsoscienezf\"}},{\"nodeName\":\"rtek\",\"availableMemoryInMB\":1427118648,\"cpuUtilization\":1710851051,\"concurrentJobsLimit\":434969559,\"concurrentJobsRunning\":1382237615,\"maxConcurrentJobs\":379543430,\"sentBytes\":41.117268,\"receivedBytes\":37.443043,\"\":{\"youergaghp\":\"dataztvktjhffecqko\"}},{\"nodeName\":\"xkpyehhfdyldh\",\"availableMemoryInMB\":1925877640,\"cpuUtilization\":773030447,\"concurrentJobsLimit\":711923719,\"concurrentJobsRunning\":1024474601,\"maxConcurrentJobs\":774713965,\"sentBytes\":49.221462,\"receivedBytes\":70.63647,\"\":{\"hpjlwyxedznmxrf\":\"dataeunokakz\",\"px\":\"datamckewvmyif\"}}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - IntegrationRuntimeMonitoringData response = - manager - .integrationRuntimeMonitoringDatas() - .listWithResponse("kk", "xvlzjxplhpevasyn", "vzjyielb", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("vvbq", response.name()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodeIpAddressInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodeIpAddressInnerTests.java deleted file mode 100644 index db61effc25e61..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodeIpAddressInnerTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.IntegrationRuntimeNodeIpAddressInner; - -public final class IntegrationRuntimeNodeIpAddressInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IntegrationRuntimeNodeIpAddressInner model = - BinaryData.fromString("{\"ipAddress\":\"tlt\"}").toObject(IntegrationRuntimeNodeIpAddressInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IntegrationRuntimeNodeIpAddressInner model = new IntegrationRuntimeNodeIpAddressInner(); - model = BinaryData.fromObject(model).toObject(IntegrationRuntimeNodeIpAddressInner.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodeIpAddressOperationsGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodeIpAddressOperationsGetWithResponseMockTests.java deleted file mode 100644 index 16a58e7f91f35..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodeIpAddressOperationsGetWithResponseMockTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeNodeIpAddress; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IntegrationRuntimeNodeIpAddressOperationsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"ipAddress\":\"kmv\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - IntegrationRuntimeNodeIpAddress response = - manager - .integrationRuntimeNodeIpAddressOperations() - .getWithResponse("opdweoft", "or", "a", "gsioc", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodeMonitoringDataTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodeMonitoringDataTests.java deleted file mode 100644 index 6bfcc64dd0995..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodeMonitoringDataTests.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeNodeMonitoringData; -import java.util.HashMap; -import java.util.Map; - -public final class IntegrationRuntimeNodeMonitoringDataTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IntegrationRuntimeNodeMonitoringData model = - BinaryData - .fromString( - "{\"nodeName\":\"vmfqhppubo\",\"availableMemoryInMB\":1380428673,\"cpuUtilization\":1908236647,\"concurrentJobsLimit\":61402651,\"concurrentJobsRunning\":58075104,\"maxConcurrentJobs\":342947659,\"sentBytes\":99.36763,\"receivedBytes\":14.429962,\"\":{\"kauxof\":\"datatcjuahokqto\",\"ywhslwkojpllndnp\":\"datahfphwpnulaiywze\"}}") - .toObject(IntegrationRuntimeNodeMonitoringData.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IntegrationRuntimeNodeMonitoringData model = - new IntegrationRuntimeNodeMonitoringData() - .withAdditionalProperties( - mapOf( - "nodeName", - "vmfqhppubo", - "cpuUtilization", - 1908236647, - "receivedBytes", - 14.429962f, - "concurrentJobsLimit", - 61402651, - "concurrentJobsRunning", - 58075104, - "maxConcurrentJobs", - 342947659, - "availableMemoryInMB", - 1380428673, - "sentBytes", - 99.36763f)); - model = BinaryData.fromObject(model).toObject(IntegrationRuntimeNodeMonitoringData.class); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodesDeleteWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodesDeleteWithResponseMockTests.java deleted file mode 100644 index be2b97ba65fb9..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IntegrationRuntimeNodesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .integrationRuntimeNodes() - .deleteWithResponse("qz", "ti", "gufy", "fdk", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodesGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodesGetWithResponseMockTests.java deleted file mode 100644 index c348e3952b756..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodesGetWithResponseMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.SelfHostedIntegrationRuntimeNode; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IntegrationRuntimeNodesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"nodeName\":\"snqliwkmzojfe\",\"machineName\":\"alhtgmknaz\",\"hostServiceUri\":\"jbhrpgiqsttcu\",\"status\":\"Upgrading\",\"capabilities\":{\"wifhbksldttohq\":\"aixpqj\"},\"versionStatus\":\"naihtgsiqikvllr\",\"version\":\"p\",\"registerTime\":\"2021-06-12T06:33:48Z\",\"lastConnectTime\":\"2020-12-24T05:36:47Z\",\"expiryTime\":\"2021-02-19T00:24Z\",\"lastStartTime\":\"2021-04-10T17:50:58Z\",\"lastStopTime\":\"2021-10-02T11:27:17Z\",\"lastUpdateResult\":\"Fail\",\"lastStartUpdateTime\":\"2021-08-08T15:01:23Z\",\"lastEndUpdateTime\":\"2021-06-24T10:13:12Z\",\"isActiveDispatcher\":false,\"concurrentJobsLimit\":505721663,\"maxConcurrentJobs\":608355983,\"\":{\"epr\":\"dataklwzlw\",\"zfjsxscbd\":\"dataejzltka\",\"nwsb\":\"dataxapgrcqebmvrdjom\"}}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SelfHostedIntegrationRuntimeNode response = - manager - .integrationRuntimeNodes() - .getWithResponse("bkkteo", "ejogmkor", "vmvm", "ofnqhlbs", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodesUpdateWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodesUpdateWithResponseMockTests.java deleted file mode 100644 index b2af6e4c208af..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeNodesUpdateWithResponseMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.SelfHostedIntegrationRuntimeNode; -import com.azure.resourcemanager.synapse.models.UpdateIntegrationRuntimeNodeRequest; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IntegrationRuntimeNodesUpdateWithResponseMockTests { - @Test - public void testUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"nodeName\":\"toj\",\"machineName\":\"fnybydhuihaouw\",\"hostServiceUri\":\"huao\",\"status\":\"Initializing\",\"capabilities\":{\"amqprlo\":\"hwvumosqir\",\"zcmtagelajdyolj\":\"rugejcvjkjy\",\"qfmzsizzhravrc\":\"qy\"},\"versionStatus\":\"jymgqbgcxhn\",\"version\":\"gzxlermkmerghski\",\"registerTime\":\"2021-05-14T02:10:11Z\",\"lastConnectTime\":\"2021-02-27T06:12:37Z\",\"expiryTime\":\"2021-11-21T06:30:45Z\",\"lastStartTime\":\"2021-03-02T04:05:56Z\",\"lastStopTime\":\"2021-02-15T10:23:10Z\",\"lastUpdateResult\":\"None\",\"lastStartUpdateTime\":\"2021-11-07T19:57:43Z\",\"lastEndUpdateTime\":\"2021-05-23T05:58:13Z\",\"isActiveDispatcher\":true,\"concurrentJobsLimit\":1899853683,\"maxConcurrentJobs\":882272566,\"\":{\"yuf\":\"datahkpafyaloowwzizz\"}}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SelfHostedIntegrationRuntimeNode response = - manager - .integrationRuntimeNodes() - .updateWithResponse( - "vdlsflxkqesdfeds", - "gzancoinmphy", - "cqidkltvdhqnufbx", - "e", - new UpdateIntegrationRuntimeNodeRequest().withConcurrentJobsLimit(440645964), - com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeObjectMetadatasListWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeObjectMetadatasListWithResponseMockTests.java deleted file mode 100644 index f6d0a0a60bb76..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeObjectMetadatasListWithResponseMockTests.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.GetSsisObjectMetadataRequest; -import com.azure.resourcemanager.synapse.models.SsisObjectMetadataListResponse; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IntegrationRuntimeObjectMetadatasListWithResponseMockTests { - @Test - public void testListWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"type\":\"SsisObjectMetadata\",\"id\":6737583390037331667,\"name\":\"zwyhjmbjiqe\",\"description\":\"xdbsohcw\"},{\"type\":\"SsisObjectMetadata\",\"id\":2416182295765214933,\"name\":\"kgdet\",\"description\":\"wcanzbjekwuyckyv\"},{\"type\":\"SsisObjectMetadata\",\"id\":3184946001439055930,\"name\":\"uffiwjbctvbpzu\",\"description\":\"jtotdxposcs\"}],\"nextLink\":\"wuusiecktybh\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SsisObjectMetadataListResponse response = - manager - .integrationRuntimeObjectMetadatas() - .listWithResponse( - "a", - "xvzfffhtjnwos", - "tfjxtvlx", - new GetSsisObjectMetadataRequest().withMetadataPath("qfcwr"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(6737583390037331667L, response.value().get(0).id()); - Assertions.assertEquals("zwyhjmbjiqe", response.value().get(0).name()); - Assertions.assertEquals("xdbsohcw", response.value().get(0).description()); - Assertions.assertEquals("wuusiecktybh", response.nextLink()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeObjectMetadatasRefreshMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeObjectMetadatasRefreshMockTests.java deleted file mode 100644 index f676ab5171414..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeObjectMetadatasRefreshMockTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.SsisObjectMetadataStatusResponse; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IntegrationRuntimeObjectMetadatasRefreshMockTests { - @Test - public void testRefresh() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"status\":\"rslaatep\",\"name\":\"ujjzgxq\",\"properties\":\"wlxrhgt\",\"error\":\"vtqqy\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SsisObjectMetadataStatusResponse response = - manager - .integrationRuntimeObjectMetadatas() - .refresh("uxidhhxomilddxj", "d", "gxwjwil", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("rslaatep", response.status()); - Assertions.assertEquals("ujjzgxq", response.name()); - Assertions.assertEquals("wlxrhgt", response.properties()); - Assertions.assertEquals("vtqqy", response.error()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeOperationStatusInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeOperationStatusInnerTests.java deleted file mode 100644 index 2334bcecf9dd9..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeOperationStatusInnerTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.IntegrationRuntimeOperationStatusInner; -import com.azure.resourcemanager.synapse.models.WorkspaceStatus; -import org.junit.jupiter.api.Assertions; - -public final class IntegrationRuntimeOperationStatusInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IntegrationRuntimeOperationStatusInner model = - BinaryData - .fromString( - "{\"status\":\"InProgress\",\"name\":\"uughtuqfecjxeyg\",\"properties\":\"datahxuicbuewmrs\",\"error\":\"jlxuz\"}") - .toObject(IntegrationRuntimeOperationStatusInner.class); - Assertions.assertEquals(WorkspaceStatus.IN_PROGRESS, model.status()); - Assertions.assertEquals("uughtuqfecjxeyg", model.name()); - Assertions.assertEquals("jlxuz", model.error()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IntegrationRuntimeOperationStatusInner model = - new IntegrationRuntimeOperationStatusInner() - .withStatus(WorkspaceStatus.IN_PROGRESS) - .withName("uughtuqfecjxeyg") - .withProperties("datahxuicbuewmrs") - .withError("jlxuz"); - model = BinaryData.fromObject(model).toObject(IntegrationRuntimeOperationStatusInner.class); - Assertions.assertEquals(WorkspaceStatus.IN_PROGRESS, model.status()); - Assertions.assertEquals("uughtuqfecjxeyg", model.name()); - Assertions.assertEquals("jlxuz", model.error()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpointTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpointTests.java deleted file mode 100644 index 2c8d55ef8be6f..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpointTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeOutboundNetworkDependenciesEndpoint; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint model = - BinaryData - .fromString( - "{\"category\":\"ixjawrtm\",\"endpoints\":[{\"domainName\":\"yccxlzhcox\",\"endpointDetails\":[]},{\"domainName\":\"khenlus\",\"endpointDetails\":[]},{\"domainName\":\"tjxtxr\",\"endpointDetails\":[]},{\"domainName\":\"jvidttge\",\"endpointDetails\":[]}]}") - .toObject(IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint.class); - Assertions.assertEquals("ixjawrtm", model.category()); - Assertions.assertEquals("yccxlzhcox", model.endpoints().get(0).domainName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint model = - new IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint() - .withCategory("ixjawrtm") - .withEndpoints( - Arrays - .asList( - new IntegrationRuntimeOutboundNetworkDependenciesEndpoint() - .withDomainName("yccxlzhcox") - .withEndpointDetails(Arrays.asList()), - new IntegrationRuntimeOutboundNetworkDependenciesEndpoint() - .withDomainName("khenlus") - .withEndpointDetails(Arrays.asList()), - new IntegrationRuntimeOutboundNetworkDependenciesEndpoint() - .withDomainName("tjxtxr") - .withEndpointDetails(Arrays.asList()), - new IntegrationRuntimeOutboundNetworkDependenciesEndpoint() - .withDomainName("jvidttge") - .withEndpointDetails(Arrays.asList()))); - model = - BinaryData.fromObject(model).toObject(IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint.class); - Assertions.assertEquals("ixjawrtm", model.category()); - Assertions.assertEquals("yccxlzhcox", model.endpoints().get(0).domainName()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeOutboundNetworkDependenciesEndpointDetailsTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeOutboundNetworkDependenciesEndpointDetailsTests.java deleted file mode 100644 index 7ea20809a150d..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeOutboundNetworkDependenciesEndpointDetailsTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails; -import org.junit.jupiter.api.Assertions; - -public final class IntegrationRuntimeOutboundNetworkDependenciesEndpointDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails model = - BinaryData - .fromString("{\"port\":1798028438}") - .toObject(IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails.class); - Assertions.assertEquals(1798028438, model.port()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails model = - new IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails().withPort(1798028438); - model = - BinaryData.fromObject(model).toObject(IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails.class); - Assertions.assertEquals(1798028438, model.port()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeOutboundNetworkDependenciesEndpointTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeOutboundNetworkDependenciesEndpointTests.java deleted file mode 100644 index 89e95cc7006f6..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeOutboundNetworkDependenciesEndpointTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeOutboundNetworkDependenciesEndpoint; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class IntegrationRuntimeOutboundNetworkDependenciesEndpointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IntegrationRuntimeOutboundNetworkDependenciesEndpoint model = - BinaryData - .fromString("{\"domainName\":\"vyjtcvu\",\"endpointDetails\":[{\"port\":1264024384}]}") - .toObject(IntegrationRuntimeOutboundNetworkDependenciesEndpoint.class); - Assertions.assertEquals("vyjtcvu", model.domainName()); - Assertions.assertEquals(1264024384, model.endpointDetails().get(0).port()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IntegrationRuntimeOutboundNetworkDependenciesEndpoint model = - new IntegrationRuntimeOutboundNetworkDependenciesEndpoint() - .withDomainName("vyjtcvu") - .withEndpointDetails( - Arrays - .asList( - new IntegrationRuntimeOutboundNetworkDependenciesEndpointDetails().withPort(1264024384))); - model = BinaryData.fromObject(model).toObject(IntegrationRuntimeOutboundNetworkDependenciesEndpoint.class); - Assertions.assertEquals("vyjtcvu", model.domainName()); - Assertions.assertEquals(1264024384, model.endpointDetails().get(0).port()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponseInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponseInnerTests.java deleted file mode 100644 index d1a7a1b19c927..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponseInnerTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponseInner; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponseInner model = - BinaryData - .fromString( - "{\"value\":[{\"category\":\"tfjgt\",\"endpoints\":[]},{\"category\":\"vzuyturmlmu\",\"endpoints\":[]},{\"category\":\"bauiropi\",\"endpoints\":[]},{\"category\":\"onwpnga\",\"endpoints\":[]}]}") - .toObject(IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponseInner.class); - Assertions.assertEquals("tfjgt", model.value().get(0).category()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponseInner model = - new IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponseInner() - .withValue( - Arrays - .asList( - new IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint() - .withCategory("tfjgt") - .withEndpoints(Arrays.asList()), - new IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint() - .withCategory("vzuyturmlmu") - .withEndpoints(Arrays.asList()), - new IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint() - .withCategory("bauiropi") - .withEndpoints(Arrays.asList()), - new IntegrationRuntimeOutboundNetworkDependenciesCategoryEndpoint() - .withCategory("onwpnga") - .withEndpoints(Arrays.asList()))); - model = - BinaryData - .fromObject(model) - .toObject(IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponseInner.class); - Assertions.assertEquals("tfjgt", model.value().get(0).category()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeResourceInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeResourceInnerTests.java deleted file mode 100644 index 075a0333951a1..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeResourceInnerTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.IntegrationRuntimeResourceInner; -import com.azure.resourcemanager.synapse.models.IntegrationRuntime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class IntegrationRuntimeResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IntegrationRuntimeResourceInner model = - BinaryData - .fromString( - "{\"properties\":{\"type\":\"IntegrationRuntime\",\"description\":\"xlxqzvn\",\"\":{\"brqbsmswzi\":\"databycucrwnamikz\",\"vhczznvfby\":\"datagfuhokzrusw\",\"vumwmxqh\":\"datajsxjwwix\",\"hflzokxco\":\"datadvnoamldsehaohdj\"}},\"etag\":\"e\",\"id\":\"nje\",\"name\":\"agltsxoa\",\"type\":\"ftgz\"}") - .toObject(IntegrationRuntimeResourceInner.class); - Assertions.assertEquals("xlxqzvn", model.properties().description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IntegrationRuntimeResourceInner model = - new IntegrationRuntimeResourceInner() - .withProperties( - new IntegrationRuntime() - .withDescription("xlxqzvn") - .withAdditionalProperties(mapOf("type", "IntegrationRuntime"))); - model = BinaryData.fromObject(model).toObject(IntegrationRuntimeResourceInner.class); - Assertions.assertEquals("xlxqzvn", model.properties().description()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeStatusOperationsGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeStatusOperationsGetWithResponseMockTests.java deleted file mode 100644 index 1b6c90a5c18ad..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeStatusOperationsGetWithResponseMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeStatusResponse; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IntegrationRuntimeStatusOperationsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"name\":\"gjpytpmpvdnogehl\",\"properties\":{\"type\":\"IntegrationRuntimeStatus\",\"dataFactoryName\":\"b\",\"state\":\"AccessDenied\",\"\":{\"k\":\"datau\",\"bx\":\"dataaxzs\",\"clflioe\":\"datayjisskobq\"}}}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - IntegrationRuntimeStatusResponse response = - manager - .integrationRuntimeStatusOperations() - .getWithResponse("jjtpdyzoutxfptof", "gnuywezygva", "gaaqw", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeStatusResponseInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeStatusResponseInnerTests.java deleted file mode 100644 index 066aed3dd28ab..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeStatusResponseInnerTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.IntegrationRuntimeStatusResponseInner; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeStatus; -import java.util.HashMap; -import java.util.Map; - -public final class IntegrationRuntimeStatusResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IntegrationRuntimeStatusResponseInner model = - BinaryData - .fromString( - "{\"name\":\"cpzgpxtiv\",\"properties\":{\"type\":\"IntegrationRuntimeStatus\",\"dataFactoryName\":\"knidib\",\"state\":\"Offline\",\"\":{\"r\":\"datap\",\"rmzvupo\":\"datagovfgpikqmhhaow\"}}}") - .toObject(IntegrationRuntimeStatusResponseInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IntegrationRuntimeStatusResponseInner model = - new IntegrationRuntimeStatusResponseInner() - .withProperties( - new IntegrationRuntimeStatus() - .withAdditionalProperties( - mapOf( - "dataFactoryName", "knidib", "state", "Offline", "type", "IntegrationRuntimeStatus"))); - model = BinaryData.fromObject(model).toObject(IntegrationRuntimeStatusResponseInner.class); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeStatusTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeStatusTests.java deleted file mode 100644 index 84cfda64ec777..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeStatusTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeStatus; -import java.util.HashMap; -import java.util.Map; - -public final class IntegrationRuntimeStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IntegrationRuntimeStatus model = - BinaryData - .fromString( - "{\"type\":\"IntegrationRuntimeStatus\",\"dataFactoryName\":\"zdfuydzvkfvxcnqm\",\"state\":\"Offline\",\"\":{\"bemzqkzszuwi\":\"dataokmvkhlggd\",\"ljfp\":\"datatglxx\",\"pqcbfrmbodthsq\":\"datapicrmnzhrgmqgjsx\"}}") - .toObject(IntegrationRuntimeStatus.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IntegrationRuntimeStatus model = - new IntegrationRuntimeStatus() - .withAdditionalProperties( - mapOf( - "dataFactoryName", "zdfuydzvkfvxcnqm", "state", "Offline", "type", "IntegrationRuntimeStatus")); - model = BinaryData.fromObject(model).toObject(IntegrationRuntimeStatus.class); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeStopOperationStatusInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeStopOperationStatusInnerTests.java deleted file mode 100644 index d95cca3e16863..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeStopOperationStatusInnerTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.IntegrationRuntimeStopOperationStatusInner; -import com.azure.resourcemanager.synapse.models.WorkspaceStatus; -import org.junit.jupiter.api.Assertions; - -public final class IntegrationRuntimeStopOperationStatusInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IntegrationRuntimeStopOperationStatusInner model = - BinaryData - .fromString( - "{\"status\":\"InProgress\",\"name\":\"usxjbaqehg\",\"properties\":\"dataohzjqatucoigeb\",\"error\":\"cnwfepbnwgfmxjg\"}") - .toObject(IntegrationRuntimeStopOperationStatusInner.class); - Assertions.assertEquals(WorkspaceStatus.IN_PROGRESS, model.status()); - Assertions.assertEquals("usxjbaqehg", model.name()); - Assertions.assertEquals("cnwfepbnwgfmxjg", model.error()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IntegrationRuntimeStopOperationStatusInner model = - new IntegrationRuntimeStopOperationStatusInner() - .withStatus(WorkspaceStatus.IN_PROGRESS) - .withName("usxjbaqehg") - .withProperties("dataohzjqatucoigeb") - .withError("cnwfepbnwgfmxjg"); - model = BinaryData.fromObject(model).toObject(IntegrationRuntimeStopOperationStatusInner.class); - Assertions.assertEquals(WorkspaceStatus.IN_PROGRESS, model.status()); - Assertions.assertEquals("usxjbaqehg", model.name()); - Assertions.assertEquals("cnwfepbnwgfmxjg", model.error()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeTests.java deleted file mode 100644 index d273632079164..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeTests.java +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.IntegrationRuntime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class IntegrationRuntimeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IntegrationRuntime model = - BinaryData - .fromString( - "{\"type\":\"IntegrationRuntime\",\"description\":\"pbswvefloccsrm\",\"\":{\"cjxgrytf\":\"datahmipgawtxxpkyjc\",\"noxuztrksx\":\"datapcycilrmcaykg\",\"jtwkjaos\":\"datapndfcpfnznt\",\"smgbzahgxqdl\":\"dataxuzvoamktcqi\"}}") - .toObject(IntegrationRuntime.class); - Assertions.assertEquals("pbswvefloccsrm", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IntegrationRuntime model = - new IntegrationRuntime() - .withDescription("pbswvefloccsrm") - .withAdditionalProperties(mapOf("type", "IntegrationRuntime")); - model = BinaryData.fromObject(model).toObject(IntegrationRuntime.class); - Assertions.assertEquals("pbswvefloccsrm", model.description()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeVNetPropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeVNetPropertiesTests.java deleted file mode 100644 index 41254ae1cb488..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimeVNetPropertiesTests.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeVNetProperties; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class IntegrationRuntimeVNetPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IntegrationRuntimeVNetProperties model = - BinaryData - .fromString( - "{\"vNetId\":\"iua\",\"subnet\":\"cgm\",\"publicIPs\":[\"pfinzcpdltkrlg\",\"mtbdrvcqgu\",\"fzhompheq\",\"urelyujlfyoump\"],\"subnetId\":\"yec\",\"\":{\"joclxiutgjcyzy\":\"dataigptajbrzmqxucyc\"}}") - .toObject(IntegrationRuntimeVNetProperties.class); - Assertions.assertEquals("iua", model.vNetId()); - Assertions.assertEquals("cgm", model.subnet()); - Assertions.assertEquals("pfinzcpdltkrlg", model.publicIPs().get(0)); - Assertions.assertEquals("yec", model.subnetId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IntegrationRuntimeVNetProperties model = - new IntegrationRuntimeVNetProperties() - .withVNetId("iua") - .withSubnet("cgm") - .withPublicIPs(Arrays.asList("pfinzcpdltkrlg", "mtbdrvcqgu", "fzhompheq", "urelyujlfyoump")) - .withSubnetId("yec") - .withAdditionalProperties(mapOf()); - model = BinaryData.fromObject(model).toObject(IntegrationRuntimeVNetProperties.class); - Assertions.assertEquals("iua", model.vNetId()); - Assertions.assertEquals("cgm", model.subnet()); - Assertions.assertEquals("pfinzcpdltkrlg", model.publicIPs().get(0)); - Assertions.assertEquals("yec", model.subnetId()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesCreateMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesCreateMockTests.java deleted file mode 100644 index 5556721544216..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesCreateMockTests.java +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.IntegrationRuntime; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IntegrationRuntimesCreateMockTests { - @Test - public void testCreate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"type\":\"IntegrationRuntime\",\"description\":\"rkgjnmzpaslavxjf\",\"\":{\"qywjopa\":\"datafpieidzlvs\"}},\"etag\":\"yhydvikmfn\",\"id\":\"pmillxgjsci\",\"name\":\"wgsoriobijeiydy\",\"type\":\"uynhbokayrgwybr\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - IntegrationRuntimeResource response = - manager - .integrationRuntimes() - .define("gtnse") - .withExistingWorkspace("dcaytujraxd", "pryj") - .withProperties( - new IntegrationRuntime() - .withDescription("uxlymsvvyl") - .withAdditionalProperties(mapOf("type", "IntegrationRuntime"))) - .withIfMatch("eylqlocvvujexayg") - .create(); - - Assertions.assertEquals("rkgjnmzpaslavxjf", response.properties().description()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesDeleteMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesDeleteMockTests.java deleted file mode 100644 index 5ecd1007a53e5..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IntegrationRuntimesDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.integrationRuntimes().delete("xlu", "vsolzwil", "ngojfsqebuuxjx", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesDisableInteractiveQueryMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesDisableInteractiveQueryMockTests.java deleted file mode 100644 index d4227c8e758fb..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesDisableInteractiveQueryMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IntegrationRuntimesDisableInteractiveQueryMockTests { - @Test - public void testDisableInteractiveQuery() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .integrationRuntimes() - .disableInteractiveQuery("b", "s", "uerbgpxebjl", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesEnableInteractiveQueryMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesEnableInteractiveQueryMockTests.java deleted file mode 100644 index ee74cdaad0eb8..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesEnableInteractiveQueryMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IntegrationRuntimesEnableInteractiveQueryMockTests { - @Test - public void testEnableInteractiveQuery() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .integrationRuntimes() - .enableInteractiveQuery("jqlxspmrj", "tryldsxebuhsxr", "nmgsdaluyckhef", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesGetWithResponseMockTests.java deleted file mode 100644 index 0c987574c2ff9..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesGetWithResponseMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IntegrationRuntimesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"type\":\"IntegrationRuntime\",\"description\":\"v\",\"\":{\"aqm\":\"dataytoxuwhttnzq\",\"dzzmssgpgv\":\"databgszplusdek\",\"squnycwztlv\":\"datakyejidbdq\"}},\"etag\":\"snmr\",\"id\":\"kyjtrepw\",\"name\":\"wfkcauxuvavcpf\",\"type\":\"dofuckclb\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - IntegrationRuntimeResource response = - manager - .integrationRuntimes() - .getWithResponse("stgfczl", "d", "cidt", "vamyyznmrgcdo", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("v", response.properties().description()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesListByWorkspaceMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesListByWorkspaceMockTests.java deleted file mode 100644 index f67f784318aed..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesListByWorkspaceMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IntegrationRuntimesListByWorkspaceMockTests { - @Test - public void testListByWorkspace() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"type\":\"IntegrationRuntime\",\"description\":\"w\",\"\":{\"mqiydvxcgdh\":\"dataxakglhpsesrfg\",\"cbqp\":\"datahgoqgsoyqyxyj\"}},\"etag\":\"spglq\",\"id\":\"o\",\"name\":\"tdahneaoovtyjzti\",\"type\":\"fwjlof\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .integrationRuntimes() - .listByWorkspace("laumydmhweqjf", "xydgtokvqbvwg", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("w", response.iterator().next().properties().description()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesListOutboundNetworkDependenciesEndpointsWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesListOutboundNetworkDependenciesEndpointsWithResponseMockTests.java deleted file mode 100644 index e097f0cdc5a40..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesListOutboundNetworkDependenciesEndpointsWithResponseMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponse; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IntegrationRuntimesListOutboundNetworkDependenciesEndpointsWithResponseMockTests { - @Test - public void testListOutboundNetworkDependenciesEndpointsWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"value\":[{\"category\":\"gbsfsgsaenwldf\",\"endpoints\":[]}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - IntegrationRuntimeOutboundNetworkDependenciesEndpointsResponse response = - manager - .integrationRuntimes() - .listOutboundNetworkDependenciesEndpointsWithResponse( - "znllaslk", "khjqjpvbaihxjtg", "gtaiywbq", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("gbsfsgsaenwldf", response.value().get(0).category()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesStartMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesStartMockTests.java deleted file mode 100644 index e2abb5a875b5b..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesStartMockTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeStatusResponse; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IntegrationRuntimesStartMockTests { - @Test - public void testStart() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"name\":\"wxn\",\"properties\":{\"type\":\"IntegrationRuntimeStatus\",\"dataFactoryName\":\"hhnoyrzaaoee\",\"state\":\"Starting\",\"\":{\"xoxdjxldnaryyi\":\"datanvjeateaxxc\",\"edoyqxlunkft\":\"datazkdolrndwdbvxvza\",\"n\":\"datamcxqqxmyzklao\"}}}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - IntegrationRuntimeStatusResponse response = - manager.integrationRuntimes().start("ekfsrm", "uklajvcfoc", "hapejov", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesStopMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesStopMockTests.java deleted file mode 100644 index 91a0bc2334c0c..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesStopMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IntegrationRuntimesStopMockTests { - @Test - public void testStop() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.integrationRuntimes().stop("ohrvmz", "qr", "zadi", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesUpgradeWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesUpgradeWithResponseMockTests.java deleted file mode 100644 index 0a4af40835bfa..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IntegrationRuntimesUpgradeWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IntegrationRuntimesUpgradeWithResponseMockTests { - @Test - public void testUpgradeWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .integrationRuntimes() - .upgradeWithResponse("fxfjwp", "kktpmbmxbmbr", "gzzxljbkhxsd", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IotHubConnectionPropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IotHubConnectionPropertiesTests.java deleted file mode 100644 index 6b925209125d8..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IotHubConnectionPropertiesTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.IotHubConnectionProperties; -import com.azure.resourcemanager.synapse.models.IotHubDataFormat; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class IotHubConnectionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IotHubConnectionProperties model = - BinaryData - .fromString( - "{\"iotHubResourceId\":\"to\",\"consumerGroup\":\"alswbnfd\",\"tableName\":\"pld\",\"mappingRuleName\":\"jnsfzygleexahvmy\",\"dataFormat\":\"PSV\",\"eventSystemProperties\":[\"carycsjjzyvoaqa\",\"uvehzptd\",\"krrbhmpful\"],\"sharedAccessPolicyName\":\"be\",\"provisioningState\":\"Moving\"}") - .toObject(IotHubConnectionProperties.class); - Assertions.assertEquals("to", model.iotHubResourceId()); - Assertions.assertEquals("alswbnfd", model.consumerGroup()); - Assertions.assertEquals("pld", model.tableName()); - Assertions.assertEquals("jnsfzygleexahvmy", model.mappingRuleName()); - Assertions.assertEquals(IotHubDataFormat.PSV, model.dataFormat()); - Assertions.assertEquals("carycsjjzyvoaqa", model.eventSystemProperties().get(0)); - Assertions.assertEquals("be", model.sharedAccessPolicyName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IotHubConnectionProperties model = - new IotHubConnectionProperties() - .withIotHubResourceId("to") - .withConsumerGroup("alswbnfd") - .withTableName("pld") - .withMappingRuleName("jnsfzygleexahvmy") - .withDataFormat(IotHubDataFormat.PSV) - .withEventSystemProperties(Arrays.asList("carycsjjzyvoaqa", "uvehzptd", "krrbhmpful")) - .withSharedAccessPolicyName("be"); - model = BinaryData.fromObject(model).toObject(IotHubConnectionProperties.class); - Assertions.assertEquals("to", model.iotHubResourceId()); - Assertions.assertEquals("alswbnfd", model.consumerGroup()); - Assertions.assertEquals("pld", model.tableName()); - Assertions.assertEquals("jnsfzygleexahvmy", model.mappingRuleName()); - Assertions.assertEquals(IotHubDataFormat.PSV, model.dataFormat()); - Assertions.assertEquals("carycsjjzyvoaqa", model.eventSystemProperties().get(0)); - Assertions.assertEquals("be", model.sharedAccessPolicyName()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IotHubDataConnectionTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IotHubDataConnectionTests.java deleted file mode 100644 index 88946a4b2553c..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IotHubDataConnectionTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.IotHubDataConnection; -import com.azure.resourcemanager.synapse.models.IotHubDataFormat; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class IotHubDataConnectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IotHubDataConnection model = - BinaryData - .fromString( - "{\"kind\":\"IotHub\",\"properties\":{\"iotHubResourceId\":\"uzlbcnn\",\"consumerGroup\":\"t\",\"tableName\":\"xawqy\",\"mappingRuleName\":\"lhdyzmyckzex\",\"dataFormat\":\"TXT\",\"eventSystemProperties\":[\"kywymxgaabj\",\"dtfohfaog\",\"vkiwrsiwdyjqu\"],\"sharedAccessPolicyName\":\"ykcrraue\",\"provisioningState\":\"Succeeded\"},\"location\":\"uehogdd\",\"id\":\"bcbgydlqidywmhm\",\"name\":\"tyrilkfbnrqqxvz\",\"type\":\"pbnfnqtx\"}") - .toObject(IotHubDataConnection.class); - Assertions.assertEquals("uehogdd", model.location()); - Assertions.assertEquals("uzlbcnn", model.iotHubResourceId()); - Assertions.assertEquals("t", model.consumerGroup()); - Assertions.assertEquals("xawqy", model.tableName()); - Assertions.assertEquals("lhdyzmyckzex", model.mappingRuleName()); - Assertions.assertEquals(IotHubDataFormat.TXT, model.dataFormat()); - Assertions.assertEquals("kywymxgaabj", model.eventSystemProperties().get(0)); - Assertions.assertEquals("ykcrraue", model.sharedAccessPolicyName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IotHubDataConnection model = - new IotHubDataConnection() - .withLocation("uehogdd") - .withIotHubResourceId("uzlbcnn") - .withConsumerGroup("t") - .withTableName("xawqy") - .withMappingRuleName("lhdyzmyckzex") - .withDataFormat(IotHubDataFormat.TXT) - .withEventSystemProperties(Arrays.asList("kywymxgaabj", "dtfohfaog", "vkiwrsiwdyjqu")) - .withSharedAccessPolicyName("ykcrraue"); - model = BinaryData.fromObject(model).toObject(IotHubDataConnection.class); - Assertions.assertEquals("uehogdd", model.location()); - Assertions.assertEquals("uzlbcnn", model.iotHubResourceId()); - Assertions.assertEquals("t", model.consumerGroup()); - Assertions.assertEquals("xawqy", model.tableName()); - Assertions.assertEquals("lhdyzmyckzex", model.mappingRuleName()); - Assertions.assertEquals(IotHubDataFormat.TXT, model.dataFormat()); - Assertions.assertEquals("kywymxgaabj", model.eventSystemProperties().get(0)); - Assertions.assertEquals("ykcrraue", model.sharedAccessPolicyName()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IpFirewallRuleInfoInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IpFirewallRuleInfoInnerTests.java deleted file mode 100644 index 01857d4c3039f..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IpFirewallRuleInfoInnerTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.IpFirewallRuleInfoInner; -import org.junit.jupiter.api.Assertions; - -public final class IpFirewallRuleInfoInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpFirewallRuleInfoInner model = - BinaryData - .fromString( - "{\"properties\":{\"endIpAddress\":\"kuksjtxukcdm\",\"provisioningState\":\"Succeeded\",\"startIpAddress\":\"ryuanzwuxzdxtay\"},\"id\":\"lhmwhfpmrqobm\",\"name\":\"u\",\"type\":\"knryrtihfxtij\"}") - .toObject(IpFirewallRuleInfoInner.class); - Assertions.assertEquals("kuksjtxukcdm", model.endIpAddress()); - Assertions.assertEquals("ryuanzwuxzdxtay", model.startIpAddress()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpFirewallRuleInfoInner model = - new IpFirewallRuleInfoInner().withEndIpAddress("kuksjtxukcdm").withStartIpAddress("ryuanzwuxzdxtay"); - model = BinaryData.fromObject(model).toObject(IpFirewallRuleInfoInner.class); - Assertions.assertEquals("kuksjtxukcdm", model.endIpAddress()); - Assertions.assertEquals("ryuanzwuxzdxtay", model.startIpAddress()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IpFirewallRuleInfoListResultTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IpFirewallRuleInfoListResultTests.java deleted file mode 100644 index 39a592406765f..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IpFirewallRuleInfoListResultTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.IpFirewallRuleInfoInner; -import com.azure.resourcemanager.synapse.models.IpFirewallRuleInfoListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class IpFirewallRuleInfoListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpFirewallRuleInfoListResult model = - BinaryData - .fromString( - "{\"nextLink\":\"ifsqesaagdfmg\",\"value\":[{\"properties\":{\"endIpAddress\":\"xrifkwmrvkts\",\"provisioningState\":\"Succeeded\",\"startIpAddress\":\"ocipaouajpsqucm\"},\"id\":\"o\",\"name\":\"fdkfogk\",\"type\":\"ygjofjdd\"},{\"properties\":{\"endIpAddress\":\"rd\",\"provisioningState\":\"Deleting\",\"startIpAddress\":\"wnw\"},\"id\":\"eitjz\",\"name\":\"flusarhmof\",\"type\":\"qhsmyurkdtml\"}]}") - .toObject(IpFirewallRuleInfoListResult.class); - Assertions.assertEquals("ifsqesaagdfmg", model.nextLink()); - Assertions.assertEquals("xrifkwmrvkts", model.value().get(0).endIpAddress()); - Assertions.assertEquals("ocipaouajpsqucm", model.value().get(0).startIpAddress()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpFirewallRuleInfoListResult model = - new IpFirewallRuleInfoListResult() - .withNextLink("ifsqesaagdfmg") - .withValue( - Arrays - .asList( - new IpFirewallRuleInfoInner() - .withEndIpAddress("xrifkwmrvkts") - .withStartIpAddress("ocipaouajpsqucm"), - new IpFirewallRuleInfoInner().withEndIpAddress("rd").withStartIpAddress("wnw"))); - model = BinaryData.fromObject(model).toObject(IpFirewallRuleInfoListResult.class); - Assertions.assertEquals("ifsqesaagdfmg", model.nextLink()); - Assertions.assertEquals("xrifkwmrvkts", model.value().get(0).endIpAddress()); - Assertions.assertEquals("ocipaouajpsqucm", model.value().get(0).startIpAddress()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulePropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulePropertiesTests.java deleted file mode 100644 index aedfa73b09bfb..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulePropertiesTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.IpFirewallRuleProperties; -import org.junit.jupiter.api.Assertions; - -public final class IpFirewallRulePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpFirewallRuleProperties model = - BinaryData - .fromString( - "{\"endIpAddress\":\"zvgnwzs\",\"provisioningState\":\"Provisioning\",\"startIpAddress\":\"zufcyzkohdbi\"}") - .toObject(IpFirewallRuleProperties.class); - Assertions.assertEquals("zvgnwzs", model.endIpAddress()); - Assertions.assertEquals("zufcyzkohdbi", model.startIpAddress()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpFirewallRuleProperties model = - new IpFirewallRuleProperties().withEndIpAddress("zvgnwzs").withStartIpAddress("zufcyzkohdbi"); - model = BinaryData.fromObject(model).toObject(IpFirewallRuleProperties.class); - Assertions.assertEquals("zvgnwzs", model.endIpAddress()); - Assertions.assertEquals("zufcyzkohdbi", model.startIpAddress()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesCreateOrUpdateMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesCreateOrUpdateMockTests.java deleted file mode 100644 index 363f756b4c018..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesCreateOrUpdateMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.IpFirewallRuleInfo; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IpFirewallRulesCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"endIpAddress\":\"bmfuvqarwzxu\",\"provisioningState\":\"Succeeded\",\"startIpAddress\":\"lui\"},\"id\":\"mbwxsfg\",\"name\":\"dmbvxekraok\",\"type\":\"kbudbtwaokb\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - IpFirewallRuleInfo response = - manager - .ipFirewallRules() - .define("smmd") - .withExistingWorkspace("yyrlhgenu", "ejgvkvebaqszllrz") - .withEndIpAddress("ihzpimcqrhnxtmi") - .withStartIpAddress("gxsvtza") - .create(); - - Assertions.assertEquals("bmfuvqarwzxu", response.endIpAddress()); - Assertions.assertEquals("lui", response.startIpAddress()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesDeleteMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesDeleteMockTests.java deleted file mode 100644 index 3533734f25492..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesDeleteMockTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.IpFirewallRuleInfo; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IpFirewallRulesDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"endIpAddress\":\"bglcjkayspthzodu\",\"provisioningState\":\"Succeeded\",\"startIpAddress\":\"jtgblios\"},\"id\":\"kfmkmfdjxyxgbk\",\"name\":\"qvjcteoe\",\"type\":\"l\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - IpFirewallRuleInfo response = - manager.ipFirewallRules().delete("ygg", "pmcrdcuelj", "iahxmfqryarvs", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("bglcjkayspthzodu", response.endIpAddress()); - Assertions.assertEquals("jtgblios", response.startIpAddress()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesGetWithResponseMockTests.java deleted file mode 100644 index ca75a46553ad1..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesGetWithResponseMockTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.IpFirewallRuleInfo; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IpFirewallRulesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"endIpAddress\":\"cnabxzf\",\"provisioningState\":\"Provisioning\",\"startIpAddress\":\"ytexvzilmhivzk\"},\"id\":\"ww\",\"name\":\"cknrzda\",\"type\":\"lskzptjxul\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - IpFirewallRuleInfo response = - manager - .ipFirewallRules() - .getWithResponse("slskkz", "xv", "nzdpvoco", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("cnabxzf", response.endIpAddress()); - Assertions.assertEquals("ytexvzilmhivzk", response.startIpAddress()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesListByWorkspaceMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesListByWorkspaceMockTests.java deleted file mode 100644 index 1170611a2f214..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesListByWorkspaceMockTests.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.IpFirewallRuleInfo; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IpFirewallRulesListByWorkspaceMockTests { - @Test - public void testListByWorkspace() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"endIpAddress\":\"mufun\",\"provisioningState\":\"Provisioning\",\"startIpAddress\":\"xvi\"},\"id\":\"yeyng\",\"name\":\"g\",\"type\":\"rquv\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.ipFirewallRules().listByWorkspace("ifdxkecifhocjxw", "loozrvt", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("mufun", response.iterator().next().endIpAddress()); - Assertions.assertEquals("xvi", response.iterator().next().startIpAddress()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesReplaceAllMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesReplaceAllMockTests.java deleted file mode 100644 index a22edb7d15e04..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/IpFirewallRulesReplaceAllMockTests.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.fluent.models.IpFirewallRuleProperties; -import com.azure.resourcemanager.synapse.models.ReplaceAllFirewallRulesOperationResponse; -import com.azure.resourcemanager.synapse.models.ReplaceAllIpFirewallRulesRequest; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class IpFirewallRulesReplaceAllMockTests { - @Test - public void testReplaceAll() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"operationId\":\"kpysthhzagjf\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ReplaceAllFirewallRulesOperationResponse response = - manager - .ipFirewallRules() - .replaceAll( - "eucyrth", - "qlehmcgcjeinu", - new ReplaceAllIpFirewallRulesRequest() - .withIpFirewallRules( - mapOf( - "ttmbqdabzfiv", - new IpFirewallRuleProperties().withEndIpAddress("am").withStartIpAddress("vq"))), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("kpysthhzagjf", response.operationId()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KekIdentityPropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KekIdentityPropertiesTests.java deleted file mode 100644 index 8d13d58eb4118..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KekIdentityPropertiesTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.KekIdentityProperties; -import org.junit.jupiter.api.Assertions; - -public final class KekIdentityPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - KekIdentityProperties model = - BinaryData - .fromString("{\"userAssignedIdentity\":\"rc\",\"useSystemAssignedIdentity\":\"datatso\"}") - .toObject(KekIdentityProperties.class); - Assertions.assertEquals("rc", model.userAssignedIdentity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - KekIdentityProperties model = - new KekIdentityProperties().withUserAssignedIdentity("rc").withUseSystemAssignedIdentity("datatso"); - model = BinaryData.fromObject(model).toObject(KekIdentityProperties.class); - Assertions.assertEquals("rc", model.userAssignedIdentity()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoOperationsListMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoOperationsListMockTests.java deleted file mode 100644 index 6980d0fa7ebac..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoOperationsListMockTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.Operation; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoOperationsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"leev\",\"display\":{\"provider\":\"ayrehj\",\"operation\":\"wvap\",\"resource\":\"lzhpzihacenq\",\"description\":\"lxnqzubfonfdbgmk\"},\"origin\":\"mjcwtewfhxwyrkbr\",\"properties\":\"datazl\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.kustoOperations().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("leev", response.iterator().next().name()); - Assertions.assertEquals("ayrehj", response.iterator().next().display().provider()); - Assertions.assertEquals("wvap", response.iterator().next().display().operation()); - Assertions.assertEquals("lzhpzihacenq", response.iterator().next().display().resource()); - Assertions.assertEquals("lxnqzubfonfdbgmk", response.iterator().next().display().description()); - Assertions.assertEquals("mjcwtewfhxwyrkbr", response.iterator().next().origin()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolAttachedDatabaseConfigurationsCreateOrUpdateMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolAttachedDatabaseConfigurationsCreateOrUpdateMockTests.java deleted file mode 100644 index df1057fde8787..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolAttachedDatabaseConfigurationsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.AttachedDatabaseConfiguration; -import com.azure.resourcemanager.synapse.models.DefaultPrincipalsModificationKind; -import com.azure.resourcemanager.synapse.models.TableLevelSharingProperties; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoPoolAttachedDatabaseConfigurationsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"location\":\"frbzakp\",\"properties\":{\"provisioningState\":\"Succeeded\",\"databaseName\":\"raqp\",\"clusterResourceId\":\"jpsucmxi\",\"attachedDatabaseNames\":[\"qxynqj\",\"satkyvscb\",\"ngcrusxhircpgcvs\",\"kkjbjolpy\"],\"defaultPrincipalsModificationKind\":\"Union\",\"tableLevelSharingProperties\":{\"tablesToInclude\":[],\"tablesToExclude\":[],\"externalTablesToInclude\":[],\"externalTablesToExclude\":[],\"materializedViewsToInclude\":[],\"materializedViewsToExclude\":[]}},\"id\":\"vhmlieoi\",\"name\":\"owxxbh\",\"type\":\"psyioqemqwtqszzg\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - AttachedDatabaseConfiguration response = - manager - .kustoPoolAttachedDatabaseConfigurations() - .define("kpkpkocmacc") - .withExistingKustoPool("lhqvbk", "rbpyhssrl", "bxxo") - .withRegion("icyvspeslh") - .withDatabaseName("gvrccpu") - .withKustoPoolResourceId("ddhgajkrdyd") - .withDefaultPrincipalsModificationKind(DefaultPrincipalsModificationKind.UNION) - .withTableLevelSharingProperties( - new TableLevelSharingProperties() - .withTablesToInclude(Arrays.asList()) - .withTablesToExclude(Arrays.asList()) - .withExternalTablesToInclude(Arrays.asList()) - .withExternalTablesToExclude(Arrays.asList()) - .withMaterializedViewsToInclude(Arrays.asList()) - .withMaterializedViewsToExclude(Arrays.asList())) - .create(); - - Assertions.assertEquals("frbzakp", response.location()); - Assertions.assertEquals("raqp", response.databaseName()); - Assertions.assertEquals("jpsucmxi", response.kustoPoolResourceId()); - Assertions.assertEquals(DefaultPrincipalsModificationKind.UNION, response.defaultPrincipalsModificationKind()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolAttachedDatabaseConfigurationsDeleteMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolAttachedDatabaseConfigurationsDeleteMockTests.java deleted file mode 100644 index 817bf79e91490..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolAttachedDatabaseConfigurationsDeleteMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoPoolAttachedDatabaseConfigurationsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .kustoPoolAttachedDatabaseConfigurations() - .delete("dzffzjwztsmpchg", "ryelgfyatigfg", "rrkdknczgor", "wnvojtvmdev", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolAttachedDatabaseConfigurationsGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolAttachedDatabaseConfigurationsGetWithResponseMockTests.java deleted file mode 100644 index 995725724a821..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolAttachedDatabaseConfigurationsGetWithResponseMockTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.AttachedDatabaseConfiguration; -import com.azure.resourcemanager.synapse.models.DefaultPrincipalsModificationKind; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoPoolAttachedDatabaseConfigurationsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"location\":\"rdetawevxehuekdx\",\"properties\":{\"provisioningState\":\"Deleting\",\"databaseName\":\"dovbrbler\",\"clusterResourceId\":\"prdaqcc\",\"attachedDatabaseNames\":[\"bnygdjc\",\"xwbpwyykdig\"],\"defaultPrincipalsModificationKind\":\"None\",\"tableLevelSharingProperties\":{\"tablesToInclude\":[],\"tablesToExclude\":[],\"externalTablesToInclude\":[],\"externalTablesToExclude\":[],\"materializedViewsToInclude\":[],\"materializedViewsToExclude\":[]}},\"id\":\"nidmjqmvytg\",\"name\":\"iqlarhqtwvcaze\",\"type\":\"d\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - AttachedDatabaseConfiguration response = - manager - .kustoPoolAttachedDatabaseConfigurations() - .getWithResponse( - "fpcrtnuguef", "xijtebdveywet", "rhlolmcnwepfg", "vbbvaqdljnpetl", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("rdetawevxehuekdx", response.location()); - Assertions.assertEquals("dovbrbler", response.databaseName()); - Assertions.assertEquals("prdaqcc", response.kustoPoolResourceId()); - Assertions.assertEquals(DefaultPrincipalsModificationKind.NONE, response.defaultPrincipalsModificationKind()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolAttachedDatabaseConfigurationsListByKustoPoolMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolAttachedDatabaseConfigurationsListByKustoPoolMockTests.java deleted file mode 100644 index 08d68d5af25a0..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolAttachedDatabaseConfigurationsListByKustoPoolMockTests.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.AttachedDatabaseConfiguration; -import com.azure.resourcemanager.synapse.models.DefaultPrincipalsModificationKind; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoPoolAttachedDatabaseConfigurationsListByKustoPoolMockTests { - @Test - public void testListByKustoPool() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"location\":\"uqvcmlaexbzbqufp\",\"properties\":{\"provisioningState\":\"Succeeded\",\"databaseName\":\"jzay\",\"clusterResourceId\":\"ldrorhyogzmsimeh\",\"attachedDatabaseNames\":[\"uwdhtq\",\"hyhnimxtns\"],\"defaultPrincipalsModificationKind\":\"Union\",\"tableLevelSharingProperties\":{\"tablesToInclude\":[],\"tablesToExclude\":[],\"externalTablesToInclude\":[],\"externalTablesToExclude\":[],\"materializedViewsToInclude\":[],\"materializedViewsToExclude\":[]}},\"id\":\"nghojov\",\"name\":\"eyym\",\"type\":\"cjixxf\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .kustoPoolAttachedDatabaseConfigurations() - .listByKustoPool("wxywpjhspboxhif", "pskpeswyhhmif", "uajxwwvcmmpeg", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("uqvcmlaexbzbqufp", response.iterator().next().location()); - Assertions.assertEquals("jzay", response.iterator().next().databaseName()); - Assertions.assertEquals("ldrorhyogzmsimeh", response.iterator().next().kustoPoolResourceId()); - Assertions - .assertEquals( - DefaultPrincipalsModificationKind.UNION, - response.iterator().next().defaultPrincipalsModificationKind()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolCheckNameRequestTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolCheckNameRequestTests.java deleted file mode 100644 index 6a4c730ca0486..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolCheckNameRequestTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.KustoPoolCheckNameRequest; -import org.junit.jupiter.api.Assertions; - -public final class KustoPoolCheckNameRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - KustoPoolCheckNameRequest model = - BinaryData.fromString("{\"name\":\"fiqgeaar\"}").toObject(KustoPoolCheckNameRequest.class); - Assertions.assertEquals("fiqgeaar", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - KustoPoolCheckNameRequest model = new KustoPoolCheckNameRequest().withName("fiqgeaar"); - model = BinaryData.fromObject(model).toObject(KustoPoolCheckNameRequest.class); - Assertions.assertEquals("fiqgeaar", model.name()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolChildResourcesCheckNameAvailabilityWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolChildResourcesCheckNameAvailabilityWithResponseMockTests.java deleted file mode 100644 index a50f2dc989652..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolChildResourcesCheckNameAvailabilityWithResponseMockTests.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.CheckNameResult; -import com.azure.resourcemanager.synapse.models.DatabaseCheckNameRequest; -import com.azure.resourcemanager.synapse.models.Reason; -import com.azure.resourcemanager.synapse.models.Type; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoPoolChildResourcesCheckNameAvailabilityWithResponseMockTests { - @Test - public void testCheckNameAvailabilityWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"nameAvailable\":true,\"name\":\"hlbecgih\",\"message\":\"pemnrrabo\",\"reason\":\"AlreadyExists\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CheckNameResult response = - manager - .kustoPoolChildResources() - .checkNameAvailabilityWithResponse( - "bfjzabbwzgvzuaix", - "dckixspsaigavkmv", - "xzerej", - new DatabaseCheckNameRequest() - .withName("kpzjbyetjxryopt") - .withType(Type.MICROSOFT_SYNAPSE_WORKSPACES_KUSTO_POOLS_ATTACHED_DATABASE_CONFIGURATIONS), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(true, response.nameAvailable()); - Assertions.assertEquals("hlbecgih", response.name()); - Assertions.assertEquals("pemnrrabo", response.message()); - Assertions.assertEquals(Reason.ALREADY_EXISTS, response.reason()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDataConnectionsCheckNameAvailabilityWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDataConnectionsCheckNameAvailabilityWithResponseMockTests.java deleted file mode 100644 index ace522d02ca31..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDataConnectionsCheckNameAvailabilityWithResponseMockTests.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.CheckNameResult; -import com.azure.resourcemanager.synapse.models.DataConnectionCheckNameRequest; -import com.azure.resourcemanager.synapse.models.Reason; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoPoolDataConnectionsCheckNameAvailabilityWithResponseMockTests { - @Test - public void testCheckNameAvailabilityWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"nameAvailable\":true,\"name\":\"vxrktjcjigcwtsp\",\"message\":\"bqxasevchefpgee\",\"reason\":\"Invalid\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CheckNameResult response = - manager - .kustoPoolDataConnections() - .checkNameAvailabilityWithResponse( - "bkdbtq", - "vmmnii", - "yholhjns", - "bggicnqwlctmw", - new DataConnectionCheckNameRequest().withName("blxk"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(true, response.nameAvailable()); - Assertions.assertEquals("vxrktjcjigcwtsp", response.name()); - Assertions.assertEquals("bqxasevchefpgee", response.message()); - Assertions.assertEquals(Reason.INVALID, response.reason()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDataConnectionsCreateOrUpdateMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDataConnectionsCreateOrUpdateMockTests.java deleted file mode 100644 index 5f2a05c922286..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDataConnectionsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.fluent.models.DataConnectionInner; -import com.azure.resourcemanager.synapse.models.DataConnection; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoPoolDataConnectionsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"kind\":\"DataConnection\",\"location\":\"tkqowsd\",\"id\":\"hczygpmg\",\"name\":\"jculojhhylx\",\"type\":\"evfiyymotu\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DataConnection response = - manager - .kustoPoolDataConnections() - .createOrUpdate( - "mw", - "bios", - "qsykq", - "dqwdrtxtfdaglmr", - "ok", - new DataConnectionInner().withLocation("ert"), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("tkqowsd", response.location()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDataConnectionsDataConnectionValidationMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDataConnectionsDataConnectionValidationMockTests.java deleted file mode 100644 index 3e069a0899b75..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDataConnectionsDataConnectionValidationMockTests.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.fluent.models.DataConnectionInner; -import com.azure.resourcemanager.synapse.fluent.models.DataConnectionValidationInner; -import com.azure.resourcemanager.synapse.models.DataConnectionValidationListResult; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoPoolDataConnectionsDataConnectionValidationMockTests { - @Test - public void testDataConnectionValidation() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"value\":[{\"errorMessage\":\"xwc\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DataConnectionValidationListResult response = - manager - .kustoPoolDataConnections() - .dataConnectionValidation( - "bruho", - "aemwcgimm", - "imaabsqqlon", - "z", - new DataConnectionValidationInner() - .withDataConnectionName("wcahdkmbjsmihr") - .withProperties(new DataConnectionInner().withLocation("zbfsjwfczglk")), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("xwc", response.value().get(0).errorMessage()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDataConnectionsDeleteMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDataConnectionsDeleteMockTests.java deleted file mode 100644 index 74b5e2573d4b3..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDataConnectionsDeleteMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoPoolDataConnectionsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .kustoPoolDataConnections() - .delete("xbozpcjcnwjz", "qblxrnwvds", "oq", "zawwsdsorgf", "jxsawooau", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDataConnectionsGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDataConnectionsGetWithResponseMockTests.java deleted file mode 100644 index 8f0591ade4952..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDataConnectionsGetWithResponseMockTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.DataConnection; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoPoolDataConnectionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"kind\":\"DataConnection\",\"location\":\"jwyuveox\",\"id\":\"z\",\"name\":\"wahdrdvhaztkxbi\",\"type\":\"zfgxmbry\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DataConnection response = - manager - .kustoPoolDataConnections() - .getWithResponse( - "txoqxtdn", - "ujsjirkrpskcj", - "mmofbnivdqtkyk", - "axnlsfgnysca", - "cptbzetxygxxicee", - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("jwyuveox", response.location()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDataConnectionsListByDatabaseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDataConnectionsListByDatabaseMockTests.java deleted file mode 100644 index 95754efb50000..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDataConnectionsListByDatabaseMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.DataConnection; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoPoolDataConnectionsListByDatabaseMockTests { - @Test - public void testListByDatabase() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"kind\":\"DataConnection\",\"location\":\"ddtbfmekjcnginxd\",\"id\":\"aoy\",\"name\":\"xf\",\"type\":\"gyxzmxynofxl\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .kustoPoolDataConnections() - .listByDatabase("faspsdzkucszghd", "aqipmnxclfrsbzrn", "u", "wvpu", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ddtbfmekjcnginxd", response.iterator().next().location()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDataConnectionsUpdateMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDataConnectionsUpdateMockTests.java deleted file mode 100644 index 5df8f3b0d3f22..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDataConnectionsUpdateMockTests.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.fluent.models.DataConnectionInner; -import com.azure.resourcemanager.synapse.models.DataConnection; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoPoolDataConnectionsUpdateMockTests { - @Test - public void testUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"kind\":\"DataConnection\",\"location\":\"ufxuzmsvzyqrbr\",\"id\":\"hj\",\"name\":\"lxfikjkxaravww\",\"type\":\"asnjeglht\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DataConnection response = - manager - .kustoPoolDataConnections() - .update( - "bybwjmtftcvelnir", - "pk", - "nstp", - "qp", - "bj", - new DataConnectionInner().withLocation("vswmehfxrtt"), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ufxuzmsvzyqrbr", response.location()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDatabasePrincipalAssignmentsCheckNameAvailabilityWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDatabasePrincipalAssignmentsCheckNameAvailabilityWithResponseMockTests.java deleted file mode 100644 index 31b3d91ea4cdf..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDatabasePrincipalAssignmentsCheckNameAvailabilityWithResponseMockTests.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.CheckNameResult; -import com.azure.resourcemanager.synapse.models.DatabasePrincipalAssignmentCheckNameRequest; -import com.azure.resourcemanager.synapse.models.Reason; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoPoolDatabasePrincipalAssignmentsCheckNameAvailabilityWithResponseMockTests { - @Test - public void testCheckNameAvailabilityWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"nameAvailable\":false,\"name\":\"fuqmmfjewfeqb\",\"message\":\"dostwygufmwe\",\"reason\":\"Invalid\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CheckNameResult response = - manager - .kustoPoolDatabasePrincipalAssignments() - .checkNameAvailabilityWithResponse( - "zisvbrqgcyjpgaw", - "pkwonrzpghlr", - "tbgblxbuibrvjzta", - "lvsmfjihv", - new DatabasePrincipalAssignmentCheckNameRequest().withName("jcq"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(false, response.nameAvailable()); - Assertions.assertEquals("fuqmmfjewfeqb", response.name()); - Assertions.assertEquals("dostwygufmwe", response.message()); - Assertions.assertEquals(Reason.INVALID, response.reason()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDatabasePrincipalAssignmentsCreateOrUpdateMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDatabasePrincipalAssignmentsCreateOrUpdateMockTests.java deleted file mode 100644 index f43e5f8b9d93e..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDatabasePrincipalAssignmentsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.DatabasePrincipalAssignment; -import com.azure.resourcemanager.synapse.models.DatabasePrincipalRole; -import com.azure.resourcemanager.synapse.models.PrincipalType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoPoolDatabasePrincipalAssignmentsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"principalId\":\"ttak\",\"role\":\"Monitor\",\"tenantId\":\"zigh\",\"principalType\":\"Group\",\"tenantName\":\"b\",\"principalName\":\"vucfvvraab\",\"provisioningState\":\"Succeeded\",\"aadObjectId\":\"eewlsuxpcbw\"},\"id\":\"wjyji\",\"name\":\"nioroofmft\",\"type\":\"spmcreihuftrnigh\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DatabasePrincipalAssignment response = - manager - .kustoPoolDatabasePrincipalAssignments() - .define("lynzlyvap") - .withExistingDatabase("scmyhrhjvszf", "bokndwpppq", "ojoevzzufytdx", "krbuoggtdltlcuha") - .withPrincipalId("ijvaylze") - .withRole(DatabasePrincipalRole.UNRESTRICTED_VIEWER) - .withTenantId("psftqkrvmhvbvvc") - .withPrincipalType(PrincipalType.USER) - .create(); - - Assertions.assertEquals("ttak", response.principalId()); - Assertions.assertEquals(DatabasePrincipalRole.MONITOR, response.role()); - Assertions.assertEquals("zigh", response.tenantId()); - Assertions.assertEquals(PrincipalType.GROUP, response.principalType()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDatabasePrincipalAssignmentsDeleteMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDatabasePrincipalAssignmentsDeleteMockTests.java deleted file mode 100644 index e2f03b5023297..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDatabasePrincipalAssignmentsDeleteMockTests.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoPoolDatabasePrincipalAssignmentsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .kustoPoolDatabasePrincipalAssignments() - .delete( - "ocytjgoeayokrw", - "mihwpadhedb", - "o", - "dczvothmkh", - "aozvbwfcnjhbpoel", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDatabasePrincipalAssignmentsGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDatabasePrincipalAssignmentsGetWithResponseMockTests.java deleted file mode 100644 index 5728fb517b683..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDatabasePrincipalAssignmentsGetWithResponseMockTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.DatabasePrincipalAssignment; -import com.azure.resourcemanager.synapse.models.DatabasePrincipalRole; -import com.azure.resourcemanager.synapse.models.PrincipalType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoPoolDatabasePrincipalAssignmentsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"principalId\":\"syqcjnqswxdowum\",\"role\":\"Viewer\",\"tenantId\":\"krcdi\",\"principalType\":\"Group\",\"tenantName\":\"lqddnhfknebwedd\",\"principalName\":\"yzcwy\",\"provisioningState\":\"Creating\",\"aadObjectId\":\"aqld\"},\"id\":\"bnwvpaq\",\"name\":\"qxfbbigcfddofx\",\"type\":\"fbmjyyrqaedwo\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DatabasePrincipalAssignment response = - manager - .kustoPoolDatabasePrincipalAssignments() - .getWithResponse( - "l", "okjyghzt", "smiwtpcflc", "zswwvwi", "tdjtvbfpfhru", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("syqcjnqswxdowum", response.principalId()); - Assertions.assertEquals(DatabasePrincipalRole.VIEWER, response.role()); - Assertions.assertEquals("krcdi", response.tenantId()); - Assertions.assertEquals(PrincipalType.GROUP, response.principalType()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDatabasePrincipalAssignmentsListMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDatabasePrincipalAssignmentsListMockTests.java deleted file mode 100644 index c6e86611a86fa..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDatabasePrincipalAssignmentsListMockTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.DatabasePrincipalAssignment; -import com.azure.resourcemanager.synapse.models.DatabasePrincipalRole; -import com.azure.resourcemanager.synapse.models.PrincipalType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoPoolDatabasePrincipalAssignmentsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"principalId\":\"dvhhplkhwwdkatve\",\"role\":\"Admin\",\"tenantId\":\"k\",\"principalType\":\"App\",\"tenantName\":\"zeyxryearmhp\",\"principalName\":\"uklvsmfa\",\"provisioningState\":\"Failed\",\"aadObjectId\":\"v\"},\"id\":\"poil\",\"name\":\"s\",\"type\":\"aemcezevftmh\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .kustoPoolDatabasePrincipalAssignments() - .list("gwzz", "wdtlcjgpvc", "zvzrbvgwxhlx", "mxvmdrwynbgovazo", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("dvhhplkhwwdkatve", response.iterator().next().principalId()); - Assertions.assertEquals(DatabasePrincipalRole.ADMIN, response.iterator().next().role()); - Assertions.assertEquals("k", response.iterator().next().tenantId()); - Assertions.assertEquals(PrincipalType.APP, response.iterator().next().principalType()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDatabasesCreateOrUpdateMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDatabasesCreateOrUpdateMockTests.java deleted file mode 100644 index 5f81099cd7cac..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDatabasesCreateOrUpdateMockTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.fluent.models.DatabaseInner; -import com.azure.resourcemanager.synapse.models.Database; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoPoolDatabasesCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"kind\":\"Database\",\"location\":\"tcxmmqm\",\"id\":\"jkyjrexw\",\"name\":\"onbexft\",\"type\":\"daubheeggzgr\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Database response = - manager - .kustoPoolDatabases() - .createOrUpdate( - "xexatmdmnrs", - "nxoirxy", - "dmiplois", - "kzsoxz", - new DatabaseInner().withLocation("twg"), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("tcxmmqm", response.location()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDatabasesDeleteMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDatabasesDeleteMockTests.java deleted file mode 100644 index 9afb92a189e75..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDatabasesDeleteMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoPoolDatabasesDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .kustoPoolDatabases() - .delete("t", "dhmfppinm", "ikesmkwtzgfr", "gjhxerxl", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDatabasesGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDatabasesGetWithResponseMockTests.java deleted file mode 100644 index 805019933e711..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDatabasesGetWithResponseMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.Database; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoPoolDatabasesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"kind\":\"Database\",\"location\":\"sudy\",\"id\":\"mbhdo\",\"name\":\"m\",\"type\":\"ngkqlgxzduvxd\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Database response = - manager - .kustoPoolDatabases() - .getWithResponse("bjepzwhj", "nfd", "bggcj", "zhblivw", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("sudy", response.location()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDatabasesListByKustoPoolMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDatabasesListByKustoPoolMockTests.java deleted file mode 100644 index e9a9e2d619995..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDatabasesListByKustoPoolMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.Database; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoPoolDatabasesListByKustoPoolMockTests { - @Test - public void testListByKustoPool() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"kind\":\"Database\",\"location\":\"pgcmahiwfr\",\"id\":\"w\",\"name\":\"ch\",\"type\":\"apitskshfyftt\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .kustoPoolDatabases() - .listByKustoPool("ksikawanvmwdv", "jqcrbk", "mpnbnfgyweoj", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("pgcmahiwfr", response.iterator().next().location()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDatabasesUpdateMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDatabasesUpdateMockTests.java deleted file mode 100644 index 0da310adf82c0..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolDatabasesUpdateMockTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.fluent.models.DatabaseInner; -import com.azure.resourcemanager.synapse.models.Database; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoPoolDatabasesUpdateMockTests { - @Test - public void testUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"kind\":\"Database\",\"location\":\"ofe\",\"id\":\"hpfixoskkzdf\",\"name\":\"vsujybsrwz\",\"type\":\"mr\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Database response = - manager - .kustoPoolDatabases() - .update( - "qtlfoz", - "umrtgjqg", - "cant", - "syxzxjmkanbc", - new DatabaseInner().withLocation("zofmexvtemaspm"), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ofe", response.location()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolInnerTests.java deleted file mode 100644 index 911835f6d6a85..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolInnerTests.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.KustoPoolInner; -import com.azure.resourcemanager.synapse.models.AzureSku; -import com.azure.resourcemanager.synapse.models.OptimizedAutoscale; -import com.azure.resourcemanager.synapse.models.SkuName; -import com.azure.resourcemanager.synapse.models.SkuSize; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class KustoPoolInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - KustoPoolInner model = - BinaryData - .fromString( - "{\"sku\":{\"name\":\"Storage" - + " optimized\",\"capacity\":882727572,\"size\":\"Large\"},\"properties\":{\"state\":\"Creating\",\"provisioningState\":\"Moving\",\"uri\":\"kdfrdbiqmrjgeihf\",\"dataIngestionUri\":\"ggwfiwz\",\"stateReason\":\"mjpb\",\"optimizedAutoscale\":{\"version\":1813948953,\"isEnabled\":true,\"minimum\":1564431663,\"maximum\":342558293},\"enableStreamingIngest\":false,\"enablePurge\":false,\"languageExtensions\":{\"value\":[]},\"workspaceUID\":\"yfqi\"},\"etag\":\"xhnpo\",\"location\":\"qwcabvnui\",\"tags\":{\"fjlrxwtoauk\":\"yaswlpaugmr\"},\"id\":\"fkvcisi\",\"name\":\"moaedsxj\",\"type\":\"uivedwcgyeewxeiq\"}") - .toObject(KustoPoolInner.class); - Assertions.assertEquals("qwcabvnui", model.location()); - Assertions.assertEquals("yaswlpaugmr", model.tags().get("fjlrxwtoauk")); - Assertions.assertEquals(SkuName.STORAGE_OPTIMIZED, model.sku().name()); - Assertions.assertEquals(882727572, model.sku().capacity()); - Assertions.assertEquals(SkuSize.LARGE, model.sku().size()); - Assertions.assertEquals(1813948953, model.optimizedAutoscale().version()); - Assertions.assertEquals(true, model.optimizedAutoscale().isEnabled()); - Assertions.assertEquals(1564431663, model.optimizedAutoscale().minimum()); - Assertions.assertEquals(342558293, model.optimizedAutoscale().maximum()); - Assertions.assertEquals(false, model.enableStreamingIngest()); - Assertions.assertEquals(false, model.enablePurge()); - Assertions.assertEquals("yfqi", model.workspaceUid()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - KustoPoolInner model = - new KustoPoolInner() - .withLocation("qwcabvnui") - .withTags(mapOf("fjlrxwtoauk", "yaswlpaugmr")) - .withSku( - new AzureSku().withName(SkuName.STORAGE_OPTIMIZED).withCapacity(882727572).withSize(SkuSize.LARGE)) - .withOptimizedAutoscale( - new OptimizedAutoscale() - .withVersion(1813948953) - .withIsEnabled(true) - .withMinimum(1564431663) - .withMaximum(342558293)) - .withEnableStreamingIngest(false) - .withEnablePurge(false) - .withWorkspaceUid("yfqi"); - model = BinaryData.fromObject(model).toObject(KustoPoolInner.class); - Assertions.assertEquals("qwcabvnui", model.location()); - Assertions.assertEquals("yaswlpaugmr", model.tags().get("fjlrxwtoauk")); - Assertions.assertEquals(SkuName.STORAGE_OPTIMIZED, model.sku().name()); - Assertions.assertEquals(882727572, model.sku().capacity()); - Assertions.assertEquals(SkuSize.LARGE, model.sku().size()); - Assertions.assertEquals(1813948953, model.optimizedAutoscale().version()); - Assertions.assertEquals(true, model.optimizedAutoscale().isEnabled()); - Assertions.assertEquals(1564431663, model.optimizedAutoscale().minimum()); - Assertions.assertEquals(342558293, model.optimizedAutoscale().maximum()); - Assertions.assertEquals(false, model.enableStreamingIngest()); - Assertions.assertEquals(false, model.enablePurge()); - Assertions.assertEquals("yfqi", model.workspaceUid()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolListResultInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolListResultInnerTests.java deleted file mode 100644 index 23a29a2c85986..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolListResultInnerTests.java +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.KustoPoolInner; -import com.azure.resourcemanager.synapse.fluent.models.KustoPoolListResultInner; -import com.azure.resourcemanager.synapse.models.AzureSku; -import com.azure.resourcemanager.synapse.models.SkuName; -import com.azure.resourcemanager.synapse.models.SkuSize; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class KustoPoolListResultInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - KustoPoolListResultInner model = - BinaryData - .fromString( - "{\"value\":[{\"sku\":{\"name\":\"Storage" - + " optimized\",\"capacity\":949193893,\"size\":\"Medium\"},\"properties\":{\"state\":\"Deleted\",\"provisioningState\":\"Moving\",\"uri\":\"jcitdigsxcdglj\",\"dataIngestionUri\":\"keuachtomf\",\"stateReason\":\"ytswfp\",\"enableStreamingIngest\":true,\"enablePurge\":true,\"workspaceUID\":\"mskwhqjjysl\"},\"etag\":\"lpshhkvpedwqslsr\",\"location\":\"pq\",\"tags\":{\"qejo\":\"skondcbrwimu\",\"tljqobbpih\":\"ovyrrleaesinu\",\"bbmpxdlvykfre\":\"hcecybmrqbr\",\"wjksghudgzhxo\":\"crse\"},\"id\":\"jggsvo\",\"name\":\"jkxibda\",\"type\":\"hrkmdyomkxfbvfbh\"},{\"sku\":{\"name\":\"Compute" - + " optimized\",\"capacity\":1026762793,\"size\":\"Large\"},\"properties\":{\"state\":\"Stopped\",\"provisioningState\":\"Deleting\",\"uri\":\"eimawzovgkkumui\",\"dataIngestionUri\":\"cjc\",\"stateReason\":\"tbw\",\"enableStreamingIngest\":false,\"enablePurge\":false,\"workspaceUID\":\"comlikytwvczc\"},\"etag\":\"k\",\"location\":\"ve\",\"tags\":{\"qthe\":\"dvlvhbwrnfxtgdd\"},\"id\":\"n\",\"name\":\"naoyank\",\"type\":\"oe\"},{\"sku\":{\"name\":\"Storage" - + " optimized\",\"capacity\":1901940761,\"size\":\"Small\"},\"properties\":{\"state\":\"Deleting\",\"provisioningState\":\"Moving\",\"uri\":\"hdroznnh\",\"dataIngestionUri\":\"lktgjc\",\"stateReason\":\"guxhem\",\"enableStreamingIngest\":true,\"enablePurge\":false,\"workspaceUID\":\"zgfbukklelssx\"},\"etag\":\"ycsxzu\",\"location\":\"srlsmd\",\"tags\":{\"cdoewbidyv\":\"plpvm\",\"deugf\":\"eowxvgpi\"},\"id\":\"xzecpaxwkufykhvu\",\"name\":\"xepmrut\",\"type\":\"nabaobnslujd\"},{\"sku\":{\"name\":\"Storage" - + " optimized\",\"capacity\":571478298,\"size\":\"Large\"},\"properties\":{\"state\":\"Stopped\",\"provisioningState\":\"Running\",\"uri\":\"hywartspph\",\"dataIngestionUri\":\"xkykxdssjp\",\"stateReason\":\"mucfxhikkf\",\"enableStreamingIngest\":true,\"enablePurge\":false,\"workspaceUID\":\"cqlh\"},\"etag\":\"s\",\"location\":\"lmiiiovg\",\"tags\":{\"otiowlxteqd\":\"xuugqkc\",\"anblwphqlkccu\":\"tjgwdtguk\",\"iul\":\"gygqwah\",\"wzdufypivlsbb\":\"gniiprglvaw\"},\"id\":\"pmcubkmifoxxkub\",\"name\":\"phavpmhbrb\",\"type\":\"gvgovpbbttefjo\"}]}") - .toObject(KustoPoolListResultInner.class); - Assertions.assertEquals("pq", model.value().get(0).location()); - Assertions.assertEquals("skondcbrwimu", model.value().get(0).tags().get("qejo")); - Assertions.assertEquals(SkuName.STORAGE_OPTIMIZED, model.value().get(0).sku().name()); - Assertions.assertEquals(949193893, model.value().get(0).sku().capacity()); - Assertions.assertEquals(SkuSize.MEDIUM, model.value().get(0).sku().size()); - Assertions.assertEquals(true, model.value().get(0).enableStreamingIngest()); - Assertions.assertEquals(true, model.value().get(0).enablePurge()); - Assertions.assertEquals("mskwhqjjysl", model.value().get(0).workspaceUid()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - KustoPoolListResultInner model = - new KustoPoolListResultInner() - .withValue( - Arrays - .asList( - new KustoPoolInner() - .withLocation("pq") - .withTags( - mapOf( - "qejo", - "skondcbrwimu", - "tljqobbpih", - "ovyrrleaesinu", - "bbmpxdlvykfre", - "hcecybmrqbr", - "wjksghudgzhxo", - "crse")) - .withSku( - new AzureSku() - .withName(SkuName.STORAGE_OPTIMIZED) - .withCapacity(949193893) - .withSize(SkuSize.MEDIUM)) - .withEnableStreamingIngest(true) - .withEnablePurge(true) - .withWorkspaceUid("mskwhqjjysl"), - new KustoPoolInner() - .withLocation("ve") - .withTags(mapOf("qthe", "dvlvhbwrnfxtgdd")) - .withSku( - new AzureSku() - .withName(SkuName.COMPUTE_OPTIMIZED) - .withCapacity(1026762793) - .withSize(SkuSize.LARGE)) - .withEnableStreamingIngest(false) - .withEnablePurge(false) - .withWorkspaceUid("comlikytwvczc"), - new KustoPoolInner() - .withLocation("srlsmd") - .withTags(mapOf("cdoewbidyv", "plpvm", "deugf", "eowxvgpi")) - .withSku( - new AzureSku() - .withName(SkuName.STORAGE_OPTIMIZED) - .withCapacity(1901940761) - .withSize(SkuSize.SMALL)) - .withEnableStreamingIngest(true) - .withEnablePurge(false) - .withWorkspaceUid("zgfbukklelssx"), - new KustoPoolInner() - .withLocation("lmiiiovg") - .withTags( - mapOf( - "otiowlxteqd", - "xuugqkc", - "anblwphqlkccu", - "tjgwdtguk", - "iul", - "gygqwah", - "wzdufypivlsbb", - "gniiprglvaw")) - .withSku( - new AzureSku() - .withName(SkuName.STORAGE_OPTIMIZED) - .withCapacity(571478298) - .withSize(SkuSize.LARGE)) - .withEnableStreamingIngest(true) - .withEnablePurge(false) - .withWorkspaceUid("cqlh"))); - model = BinaryData.fromObject(model).toObject(KustoPoolListResultInner.class); - Assertions.assertEquals("pq", model.value().get(0).location()); - Assertions.assertEquals("skondcbrwimu", model.value().get(0).tags().get("qejo")); - Assertions.assertEquals(SkuName.STORAGE_OPTIMIZED, model.value().get(0).sku().name()); - Assertions.assertEquals(949193893, model.value().get(0).sku().capacity()); - Assertions.assertEquals(SkuSize.MEDIUM, model.value().get(0).sku().size()); - Assertions.assertEquals(true, model.value().get(0).enableStreamingIngest()); - Assertions.assertEquals(true, model.value().get(0).enablePurge()); - Assertions.assertEquals("mskwhqjjysl", model.value().get(0).workspaceUid()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolPrincipalAssignmentsCheckNameAvailabilityWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolPrincipalAssignmentsCheckNameAvailabilityWithResponseMockTests.java deleted file mode 100644 index f83cc24f88491..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolPrincipalAssignmentsCheckNameAvailabilityWithResponseMockTests.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.CheckNameResult; -import com.azure.resourcemanager.synapse.models.ClusterPrincipalAssignmentCheckNameRequest; -import com.azure.resourcemanager.synapse.models.Reason; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoPoolPrincipalAssignmentsCheckNameAvailabilityWithResponseMockTests { - @Test - public void testCheckNameAvailabilityWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"nameAvailable\":false,\"name\":\"ocjnzdaiovrbhr\",\"message\":\"phkvyyz\",\"reason\":\"AlreadyExists\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CheckNameResult response = - manager - .kustoPoolPrincipalAssignments() - .checkNameAvailabilityWithResponse( - "fh", - "fqkmwz", - "d", - new ClusterPrincipalAssignmentCheckNameRequest().withName("yoybm"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(false, response.nameAvailable()); - Assertions.assertEquals("ocjnzdaiovrbhr", response.name()); - Assertions.assertEquals("phkvyyz", response.message()); - Assertions.assertEquals(Reason.ALREADY_EXISTS, response.reason()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolPrincipalAssignmentsCreateOrUpdateMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolPrincipalAssignmentsCreateOrUpdateMockTests.java deleted file mode 100644 index c3b6abf5ba3c7..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolPrincipalAssignmentsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.ClusterPrincipalAssignment; -import com.azure.resourcemanager.synapse.models.ClusterPrincipalRole; -import com.azure.resourcemanager.synapse.models.PrincipalType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoPoolPrincipalAssignmentsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"principalId\":\"duydwnwgru\",\"role\":\"AllDatabasesAdmin\",\"tenantId\":\"ldrdymnswx\",\"principalType\":\"User\",\"tenantName\":\"qwqnghxnimvy\",\"principalName\":\"rxgunnqgy\",\"provisioningState\":\"Succeeded\",\"aadObjectId\":\"ny\"},\"id\":\"uevqmvyumgmm\",\"name\":\"ebsnz\",\"type\":\"wgsqufmjxcyoseqc\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ClusterPrincipalAssignment response = - manager - .kustoPoolPrincipalAssignments() - .define("ulmwqgmhmqmiwx") - .withExistingKustoPool("ncgaull", "styygjq", "fvvzucqfgufjnbx") - .withPrincipalId("mwdukinhl") - .withRole(ClusterPrincipalRole.ALL_DATABASES_ADMIN) - .withTenantId("dekekzouyveww") - .withPrincipalType(PrincipalType.APP) - .create(); - - Assertions.assertEquals("duydwnwgru", response.principalId()); - Assertions.assertEquals(ClusterPrincipalRole.ALL_DATABASES_ADMIN, response.role()); - Assertions.assertEquals("ldrdymnswx", response.tenantId()); - Assertions.assertEquals(PrincipalType.USER, response.principalType()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolPrincipalAssignmentsDeleteMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolPrincipalAssignmentsDeleteMockTests.java deleted file mode 100644 index ba7d993b3c3f1..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolPrincipalAssignmentsDeleteMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoPoolPrincipalAssignmentsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .kustoPoolPrincipalAssignments() - .delete("qnpfydrfb", "cnyxbyx", "k", "mq", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolPrincipalAssignmentsGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolPrincipalAssignmentsGetWithResponseMockTests.java deleted file mode 100644 index 33699213e3d46..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolPrincipalAssignmentsGetWithResponseMockTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.ClusterPrincipalAssignment; -import com.azure.resourcemanager.synapse.models.ClusterPrincipalRole; -import com.azure.resourcemanager.synapse.models.PrincipalType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoPoolPrincipalAssignmentsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"principalId\":\"vwjdthkvpy\",\"role\":\"AllDatabasesAdmin\",\"tenantId\":\"afinmp\",\"principalType\":\"User\",\"tenantName\":\"pdkjrzfwkyluobdx\",\"principalName\":\"qdcclcv\",\"provisioningState\":\"Deleting\",\"aadObjectId\":\"p\"},\"id\":\"lcvwbzmfx\",\"name\":\"ry\",\"type\":\"fjxlpiy\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ClusterPrincipalAssignment response = - manager - .kustoPoolPrincipalAssignments() - .getWithResponse("zmz", "pcxitmh", "xrq", "cf", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("vwjdthkvpy", response.principalId()); - Assertions.assertEquals(ClusterPrincipalRole.ALL_DATABASES_ADMIN, response.role()); - Assertions.assertEquals("afinmp", response.tenantId()); - Assertions.assertEquals(PrincipalType.USER, response.principalType()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolPrincipalAssignmentsListMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolPrincipalAssignmentsListMockTests.java deleted file mode 100644 index 39d95da23535d..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolPrincipalAssignmentsListMockTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.ClusterPrincipalAssignment; -import com.azure.resourcemanager.synapse.models.ClusterPrincipalRole; -import com.azure.resourcemanager.synapse.models.PrincipalType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoPoolPrincipalAssignmentsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"principalId\":\"shrmnkcclpctuog\",\"role\":\"AllDatabasesViewer\",\"tenantId\":\"xjfsg\",\"principalType\":\"App\",\"tenantName\":\"poebnxsqcow\",\"principalName\":\"uyfqla\",\"provisioningState\":\"Deleting\",\"aadObjectId\":\"hsujk\"},\"id\":\"uzp\",\"name\":\"xqpwnikxkcajgrbr\",\"type\":\"tsvgoocqs\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .kustoPoolPrincipalAssignments() - .list("rxylaypd", "yzvelffo", "uriwhjdfrw", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("shrmnkcclpctuog", response.iterator().next().principalId()); - Assertions.assertEquals(ClusterPrincipalRole.ALL_DATABASES_VIEWER, response.iterator().next().role()); - Assertions.assertEquals("xjfsg", response.iterator().next().tenantId()); - Assertions.assertEquals(PrincipalType.APP, response.iterator().next().principalType()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolPrivateLinkResourcesInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolPrivateLinkResourcesInnerTests.java deleted file mode 100644 index d138884b71fa9..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolPrivateLinkResourcesInnerTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.KustoPoolPrivateLinkResourcesInner; - -public final class KustoPoolPrivateLinkResourcesInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - KustoPoolPrivateLinkResourcesInner model = - BinaryData - .fromString( - "{\"properties\":{\"groupId\":\"mxhzzysevus\",\"requiredMembers\":[\"zrrryv\",\"imipskdyzatvfuz\",\"aftjvvruxwigsy\"],\"requiredZoneNames\":[\"qdsmjtg\"],\"provisioningState\":\"Moving\"},\"id\":\"gkkileplkcsmkn\",\"name\":\"wtbbaedorvvmqf\",\"type\":\"oygbdgwumgxd\"}") - .toObject(KustoPoolPrivateLinkResourcesInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - KustoPoolPrivateLinkResourcesInner model = new KustoPoolPrivateLinkResourcesInner(); - model = BinaryData.fromObject(model).toObject(KustoPoolPrivateLinkResourcesInner.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolPrivateLinkResourcesOperationsListMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolPrivateLinkResourcesOperationsListMockTests.java deleted file mode 100644 index 6a78e2dfb2731..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolPrivateLinkResourcesOperationsListMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.KustoPoolPrivateLinkResources; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoPoolPrivateLinkResourcesOperationsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"groupId\":\"jowz\",\"requiredMembers\":[\"erclblt\",\"hpwachyeu\",\"jwmvwryvdi\"],\"requiredZoneNames\":[\"ikgpruccwmec\"],\"provisioningState\":\"Succeeded\"},\"id\":\"ytrtexegwmrq\",\"name\":\"ywiwhvycfjncind\",\"type\":\"loqkajwjuri\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .kustoPoolPrivateLinkResourcesOperations() - .list("inuwqxungrob", "wfmsxj", "dylwx", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolPropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolPropertiesTests.java deleted file mode 100644 index ba8301daa8281..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolPropertiesTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.KustoPoolProperties; -import com.azure.resourcemanager.synapse.models.OptimizedAutoscale; -import org.junit.jupiter.api.Assertions; - -public final class KustoPoolPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - KustoPoolProperties model = - BinaryData - .fromString( - "{\"state\":\"Running\",\"provisioningState\":\"Moving\",\"uri\":\"mljdlrgmsplzga\",\"dataIngestionUri\":\"cshhv\",\"stateReason\":\"wgnxkympqanxrj\",\"optimizedAutoscale\":{\"version\":1472510277,\"isEnabled\":false,\"minimum\":1632181186,\"maximum\":781825712},\"enableStreamingIngest\":false,\"enablePurge\":true,\"languageExtensions\":{\"value\":[{\"languageExtensionName\":\"R\"}]},\"workspaceUID\":\"hxcylhkgm\"}") - .toObject(KustoPoolProperties.class); - Assertions.assertEquals(1472510277, model.optimizedAutoscale().version()); - Assertions.assertEquals(false, model.optimizedAutoscale().isEnabled()); - Assertions.assertEquals(1632181186, model.optimizedAutoscale().minimum()); - Assertions.assertEquals(781825712, model.optimizedAutoscale().maximum()); - Assertions.assertEquals(false, model.enableStreamingIngest()); - Assertions.assertEquals(true, model.enablePurge()); - Assertions.assertEquals("hxcylhkgm", model.workspaceUid()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - KustoPoolProperties model = - new KustoPoolProperties() - .withOptimizedAutoscale( - new OptimizedAutoscale() - .withVersion(1472510277) - .withIsEnabled(false) - .withMinimum(1632181186) - .withMaximum(781825712)) - .withEnableStreamingIngest(false) - .withEnablePurge(true) - .withWorkspaceUid("hxcylhkgm"); - model = BinaryData.fromObject(model).toObject(KustoPoolProperties.class); - Assertions.assertEquals(1472510277, model.optimizedAutoscale().version()); - Assertions.assertEquals(false, model.optimizedAutoscale().isEnabled()); - Assertions.assertEquals(1632181186, model.optimizedAutoscale().minimum()); - Assertions.assertEquals(781825712, model.optimizedAutoscale().maximum()); - Assertions.assertEquals(false, model.enableStreamingIngest()); - Assertions.assertEquals(true, model.enablePurge()); - Assertions.assertEquals("hxcylhkgm", model.workspaceUid()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolUpdateTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolUpdateTests.java deleted file mode 100644 index e5e302815892e..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolUpdateTests.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.AzureSku; -import com.azure.resourcemanager.synapse.models.KustoPoolUpdate; -import com.azure.resourcemanager.synapse.models.OptimizedAutoscale; -import com.azure.resourcemanager.synapse.models.SkuName; -import com.azure.resourcemanager.synapse.models.SkuSize; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class KustoPoolUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - KustoPoolUpdate model = - BinaryData - .fromString( - "{\"tags\":{\"qpd\":\"omacluzvxnqmhr\",\"ssffxuifmc\":\"wmkoisq\",\"zsylollgt\":\"ypobkdqzr\",\"vuaurk\":\"czzydmxzjij\"},\"sku\":{\"name\":\"Compute" - + " optimized\",\"capacity\":772541424,\"size\":\"Medium\"},\"properties\":{\"state\":\"Creating\",\"provisioningState\":\"Failed\",\"uri\":\"c\",\"dataIngestionUri\":\"nbkkjanurnnq\",\"stateReason\":\"q\",\"optimizedAutoscale\":{\"version\":170755995,\"isEnabled\":true,\"minimum\":1872065986,\"maximum\":1388268954},\"enableStreamingIngest\":true,\"enablePurge\":false,\"languageExtensions\":{\"value\":[]},\"workspaceUID\":\"pxrxvbfihwu\"},\"id\":\"vctafsrb\",\"name\":\"rblmli\",\"type\":\"wxihs\"}") - .toObject(KustoPoolUpdate.class); - Assertions.assertEquals("omacluzvxnqmhr", model.tags().get("qpd")); - Assertions.assertEquals(SkuName.COMPUTE_OPTIMIZED, model.sku().name()); - Assertions.assertEquals(772541424, model.sku().capacity()); - Assertions.assertEquals(SkuSize.MEDIUM, model.sku().size()); - Assertions.assertEquals(170755995, model.optimizedAutoscale().version()); - Assertions.assertEquals(true, model.optimizedAutoscale().isEnabled()); - Assertions.assertEquals(1872065986, model.optimizedAutoscale().minimum()); - Assertions.assertEquals(1388268954, model.optimizedAutoscale().maximum()); - Assertions.assertEquals(true, model.enableStreamingIngest()); - Assertions.assertEquals(false, model.enablePurge()); - Assertions.assertEquals("pxrxvbfihwu", model.workspaceUid()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - KustoPoolUpdate model = - new KustoPoolUpdate() - .withTags( - mapOf( - "qpd", - "omacluzvxnqmhr", - "ssffxuifmc", - "wmkoisq", - "zsylollgt", - "ypobkdqzr", - "vuaurk", - "czzydmxzjij")) - .withSku( - new AzureSku().withName(SkuName.COMPUTE_OPTIMIZED).withCapacity(772541424).withSize(SkuSize.MEDIUM)) - .withOptimizedAutoscale( - new OptimizedAutoscale() - .withVersion(170755995) - .withIsEnabled(true) - .withMinimum(1872065986) - .withMaximum(1388268954)) - .withEnableStreamingIngest(true) - .withEnablePurge(false) - .withWorkspaceUid("pxrxvbfihwu"); - model = BinaryData.fromObject(model).toObject(KustoPoolUpdate.class); - Assertions.assertEquals("omacluzvxnqmhr", model.tags().get("qpd")); - Assertions.assertEquals(SkuName.COMPUTE_OPTIMIZED, model.sku().name()); - Assertions.assertEquals(772541424, model.sku().capacity()); - Assertions.assertEquals(SkuSize.MEDIUM, model.sku().size()); - Assertions.assertEquals(170755995, model.optimizedAutoscale().version()); - Assertions.assertEquals(true, model.optimizedAutoscale().isEnabled()); - Assertions.assertEquals(1872065986, model.optimizedAutoscale().minimum()); - Assertions.assertEquals(1388268954, model.optimizedAutoscale().maximum()); - Assertions.assertEquals(true, model.enableStreamingIngest()); - Assertions.assertEquals(false, model.enablePurge()); - Assertions.assertEquals("pxrxvbfihwu", model.workspaceUid()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolsAddLanguageExtensionsMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolsAddLanguageExtensionsMockTests.java deleted file mode 100644 index 6d1970fe6f049..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolsAddLanguageExtensionsMockTests.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.fluent.models.LanguageExtensionInner; -import com.azure.resourcemanager.synapse.models.LanguageExtensionName; -import com.azure.resourcemanager.synapse.models.LanguageExtensionsList; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoPoolsAddLanguageExtensionsMockTests { - @Test - public void testAddLanguageExtensions() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .kustoPools() - .addLanguageExtensions( - "rdlmzjotprrmu", - "cuhtuzlxiwy", - "pgarpfctw", - new LanguageExtensionsList() - .withValue( - Arrays - .asList( - new LanguageExtensionInner().withLanguageExtensionName(LanguageExtensionName.R), - new LanguageExtensionInner().withLanguageExtensionName(LanguageExtensionName.PYTHON), - new LanguageExtensionInner().withLanguageExtensionName(LanguageExtensionName.R))), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolsCheckNameAvailabilityWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolsCheckNameAvailabilityWithResponseMockTests.java deleted file mode 100644 index d770374d72c29..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolsCheckNameAvailabilityWithResponseMockTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.CheckNameResult; -import com.azure.resourcemanager.synapse.models.KustoPoolCheckNameRequest; -import com.azure.resourcemanager.synapse.models.Reason; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoPoolsCheckNameAvailabilityWithResponseMockTests { - @Test - public void testCheckNameAvailabilityWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"nameAvailable\":false,\"name\":\"flobhahq\",\"message\":\"mfecorkfrocgbmxl\",\"reason\":\"AlreadyExists\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CheckNameResult response = - manager - .kustoPools() - .checkNameAvailabilityWithResponse( - "hfcaeo", new KustoPoolCheckNameRequest().withName("ifq"), com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(false, response.nameAvailable()); - Assertions.assertEquals("flobhahq", response.name()); - Assertions.assertEquals("mfecorkfrocgbmxl", response.message()); - Assertions.assertEquals(Reason.ALREADY_EXISTS, response.reason()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolsCreateOrUpdateMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolsCreateOrUpdateMockTests.java deleted file mode 100644 index 598968f4517bd..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.AzureSku; -import com.azure.resourcemanager.synapse.models.KustoPool; -import com.azure.resourcemanager.synapse.models.OptimizedAutoscale; -import com.azure.resourcemanager.synapse.models.SkuName; -import com.azure.resourcemanager.synapse.models.SkuSize; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoPoolsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"sku\":{\"name\":\"Storage optimized\",\"capacity\":1921573518,\"size\":\"Extra" - + " small\"},\"properties\":{\"state\":\"Running\",\"provisioningState\":\"Succeeded\",\"uri\":\"gzb\",\"dataIngestionUri\":\"qfbifo\",\"stateReason\":\"jxdwdrpazqjkr\",\"optimizedAutoscale\":{\"version\":1166812452,\"isEnabled\":false,\"minimum\":1534601140,\"maximum\":178824260},\"enableStreamingIngest\":false,\"enablePurge\":true,\"languageExtensions\":{\"value\":[]},\"workspaceUID\":\"jigpgayiawohfmh\"},\"etag\":\"zmecjjkmqenhai\",\"location\":\"rpvsgloiovs\",\"tags\":{\"suvw\":\"v\",\"i\":\"enbg\",\"oa\":\"pkhc\"},\"id\":\"xukuicjuftekio\",\"name\":\"anduew\",\"type\":\"hvpxjhxz\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - KustoPool response = - manager - .kustoPools() - .define("kwopswnyinxupr") - .withRegion("gvp") - .withExistingWorkspace("pjwkosnyxigf", "ujjcxgdqmrlhn") - .withSku( - new AzureSku().withName(SkuName.STORAGE_OPTIMIZED).withCapacity(1081669809).withSize(SkuSize.LARGE)) - .withTags( - mapOf( - "ulwkq", - "gjjktfinfhoksmm", - "okr", - "cru", - "tqpqsdoctpzpujzf", - "flsgaoj", - "lu", - "mcdsgxcelujisw")) - .withOptimizedAutoscale( - new OptimizedAutoscale() - .withVersion(918352946) - .withIsEnabled(false) - .withMinimum(482333072) - .withMaximum(1912292720)) - .withEnableStreamingIngest(true) - .withEnablePurge(true) - .withWorkspaceUid("m") - .withIfMatch("yt") - .withIfNoneMatch("pdz") - .create(); - - Assertions.assertEquals("rpvsgloiovs", response.location()); - Assertions.assertEquals("v", response.tags().get("suvw")); - Assertions.assertEquals(SkuName.STORAGE_OPTIMIZED, response.sku().name()); - Assertions.assertEquals(1921573518, response.sku().capacity()); - Assertions.assertEquals(SkuSize.EXTRA_SMALL, response.sku().size()); - Assertions.assertEquals(1166812452, response.optimizedAutoscale().version()); - Assertions.assertEquals(false, response.optimizedAutoscale().isEnabled()); - Assertions.assertEquals(1534601140, response.optimizedAutoscale().minimum()); - Assertions.assertEquals(178824260, response.optimizedAutoscale().maximum()); - Assertions.assertEquals(false, response.enableStreamingIngest()); - Assertions.assertEquals(true, response.enablePurge()); - Assertions.assertEquals("jigpgayiawohfmh", response.workspaceUid()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolsDeleteMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolsDeleteMockTests.java deleted file mode 100644 index af2ad78b08114..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolsDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoPoolsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.kustoPools().delete("dxckdl", "zwhcukvb", "sjjfd", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolsDetachFollowerDatabasesMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolsDetachFollowerDatabasesMockTests.java deleted file mode 100644 index f7166335f2208..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolsDetachFollowerDatabasesMockTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.fluent.models.FollowerDatabaseDefinitionInner; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoPoolsDetachFollowerDatabasesMockTests { - @Test - public void testDetachFollowerDatabases() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .kustoPools() - .detachFollowerDatabases( - "sp", - "r", - "cspimtcvvfxrdy", - new FollowerDatabaseDefinitionInner() - .withKustoPoolResourceId("zfslxizhqikmgob") - .withAttachedDatabaseConfigurationName("iqemcdiiisklbon"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolsGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolsGetWithResponseMockTests.java deleted file mode 100644 index 491b00faf58a1..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolsGetWithResponseMockTests.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.KustoPool; -import com.azure.resourcemanager.synapse.models.SkuName; -import com.azure.resourcemanager.synapse.models.SkuSize; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoPoolsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"sku\":{\"name\":\"Compute" - + " optimized\",\"capacity\":797241887,\"size\":\"Medium\"},\"properties\":{\"state\":\"Stopped\",\"provisioningState\":\"Moving\",\"uri\":\"npiyuxlv\",\"dataIngestionUri\":\"prrv\",\"stateReason\":\"onleqflvtl\",\"optimizedAutoscale\":{\"version\":407535743,\"isEnabled\":false,\"minimum\":1195854621,\"maximum\":1769963402},\"enableStreamingIngest\":false,\"enablePurge\":true,\"languageExtensions\":{\"value\":[]},\"workspaceUID\":\"nttlnrjd\"},\"etag\":\"dbuziciqppoqvg\",\"location\":\"e\",\"tags\":{\"wjnoxuo\":\"w\",\"cjmgvsnvbtqdxfm\":\"tfnressfepgck\"},\"id\":\"ym\",\"name\":\"n\",\"type\":\"jluqllbsupu\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - KustoPool response = - manager - .kustoPools() - .getWithResponse("pkvegeatt", "zkgtzqn", "qsttewuvcysjeuf", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("e", response.location()); - Assertions.assertEquals("w", response.tags().get("wjnoxuo")); - Assertions.assertEquals(SkuName.COMPUTE_OPTIMIZED, response.sku().name()); - Assertions.assertEquals(797241887, response.sku().capacity()); - Assertions.assertEquals(SkuSize.MEDIUM, response.sku().size()); - Assertions.assertEquals(407535743, response.optimizedAutoscale().version()); - Assertions.assertEquals(false, response.optimizedAutoscale().isEnabled()); - Assertions.assertEquals(1195854621, response.optimizedAutoscale().minimum()); - Assertions.assertEquals(1769963402, response.optimizedAutoscale().maximum()); - Assertions.assertEquals(false, response.enableStreamingIngest()); - Assertions.assertEquals(true, response.enablePurge()); - Assertions.assertEquals("nttlnrjd", response.workspaceUid()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolsListByWorkspaceWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolsListByWorkspaceWithResponseMockTests.java deleted file mode 100644 index aa76cd14e7593..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolsListByWorkspaceWithResponseMockTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.KustoPoolListResult; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoPoolsListByWorkspaceWithResponseMockTests { - @Test - public void testListByWorkspaceWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"etag\":\"g\",\"location\":\"y\",\"tags\":{\"sc\":\"zu\",\"hmgw\":\"gqyvouprsytqzss\"},\"id\":\"nivrxpfduio\",\"name\":\"hgyqvpbfj\",\"type\":\"oqzucfzluczdq\"},{\"etag\":\"bormvhvzielbp\",\"location\":\"qu\",\"tags\":{\"mnwsvh\":\"zcqyg\",\"ejto\":\"ngqiw\"},\"id\":\"drrp\",\"name\":\"rehkunsbfjhh\",\"type\":\"w\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - KustoPoolListResult response = - manager - .kustoPools() - .listByWorkspaceWithResponse("zezbjes", "lslu", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("y", response.value().get(0).location()); - Assertions.assertEquals("zu", response.value().get(0).tags().get("sc")); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolsListFollowerDatabasesMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolsListFollowerDatabasesMockTests.java deleted file mode 100644 index 90d46363a9f0c..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolsListFollowerDatabasesMockTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.FollowerDatabaseDefinition; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoPoolsListFollowerDatabasesMockTests { - @Test - public void testListFollowerDatabases() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"clusterResourceId\":\"freprfvm\",\"attachedDatabaseConfigurationName\":\"inwteyrqsh\",\"databaseName\":\"bcejopylbl\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .kustoPools() - .listFollowerDatabases( - "kaupwhlz", "ckremgjlmsvdorsi", "xxhyrkqakofa", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("freprfvm", response.iterator().next().kustoPoolResourceId()); - Assertions.assertEquals("inwteyrqsh", response.iterator().next().attachedDatabaseConfigurationName()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolsListLanguageExtensionsMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolsListLanguageExtensionsMockTests.java deleted file mode 100644 index c0b66a831d3dd..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolsListLanguageExtensionsMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.LanguageExtension; -import com.azure.resourcemanager.synapse.models.LanguageExtensionName; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoPoolsListLanguageExtensionsMockTests { - @Test - public void testListLanguageExtensions() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"value\":[{\"languageExtensionName\":\"R\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .kustoPools() - .listLanguageExtensions("sgfenffdxb", "wfqjch", "vdrijanxndm", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(LanguageExtensionName.R, response.iterator().next().languageExtensionName()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolsListMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolsListMockTests.java deleted file mode 100644 index f9d2a15b09119..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolsListMockTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.SkuDescription; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoPoolsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"resourceType\":\"njpchamkaeplr\",\"name\":\"ubowuywevtj\",\"size\":\"eikmwlaoklfni\",\"locations\":[\"gucbmt\",\"ed\",\"cnnstjcyy\",\"vtzrxzhclecwwtz\"],\"locationInfo\":[{\"location\":\"loyhyupgidhzgy\",\"zones\":[\"gzsdtmwbyorjp\",\"bchycha\",\"vyrfbqvum\",\"xqjsiuepm\"]},{\"location\":\"xfnzlpq\",\"zones\":[\"t\"]}],\"restrictions\":[\"datavulb\",\"datamrtuxyp\"]}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.kustoPools().list(com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolsListSkusByResourceMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolsListSkusByResourceMockTests.java deleted file mode 100644 index 3bfbf18fe849f..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolsListSkusByResourceMockTests.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.AzureResourceSku; -import com.azure.resourcemanager.synapse.models.AzureScaleType; -import com.azure.resourcemanager.synapse.models.SkuName; -import com.azure.resourcemanager.synapse.models.SkuSize; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoPoolsListSkusByResourceMockTests { - @Test - public void testListSkusByResource() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"resourceType\":\"dxdyyrudma\",\"sku\":{\"name\":\"Compute" - + " optimized\",\"capacity\":1725220315,\"size\":\"Small\"},\"capacity\":{\"scaleType\":\"automatic\",\"minimum\":1881904123,\"maximum\":561042330,\"default\":1978635992}}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .kustoPools() - .listSkusByResource("crtfodqhuauzm", "iv", "trfzhhezvh", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("dxdyyrudma", response.iterator().next().resourceType()); - Assertions.assertEquals(SkuName.COMPUTE_OPTIMIZED, response.iterator().next().sku().name()); - Assertions.assertEquals(1725220315, response.iterator().next().sku().capacity()); - Assertions.assertEquals(SkuSize.SMALL, response.iterator().next().sku().size()); - Assertions.assertEquals(AzureScaleType.AUTOMATIC, response.iterator().next().capacity().scaleType()); - Assertions.assertEquals(1881904123, response.iterator().next().capacity().minimum()); - Assertions.assertEquals(561042330, response.iterator().next().capacity().maximum()); - Assertions.assertEquals(1978635992, response.iterator().next().capacity().defaultProperty()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolsRemoveLanguageExtensionsMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolsRemoveLanguageExtensionsMockTests.java deleted file mode 100644 index f4bf77f1b8c72..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolsRemoveLanguageExtensionsMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.fluent.models.LanguageExtensionInner; -import com.azure.resourcemanager.synapse.models.LanguageExtensionName; -import com.azure.resourcemanager.synapse.models.LanguageExtensionsList; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoPoolsRemoveLanguageExtensionsMockTests { - @Test - public void testRemoveLanguageExtensions() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .kustoPools() - .removeLanguageExtensions( - "yvzesipiysnjq", - "owa", - "dcndazabun", - new LanguageExtensionsList() - .withValue( - Arrays.asList(new LanguageExtensionInner().withLanguageExtensionName(LanguageExtensionName.R))), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolsStartMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolsStartMockTests.java deleted file mode 100644 index 0e02f1ddfcdd8..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolsStartMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoPoolsStartMockTests { - @Test - public void testStart() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.kustoPools().start("dgujjgnfgrzxbarc", "paefzqsy", "jwenjcytesmf", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolsStopMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolsStopMockTests.java deleted file mode 100644 index 4edb0f1703ada..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/KustoPoolsStopMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class KustoPoolsStopMockTests { - @Test - public void testStop() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.kustoPools().stop("zhrjqfyaytvsly", "kcgn", "uarlcjiwgsxfaioc", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/LanguageExtensionInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/LanguageExtensionInnerTests.java deleted file mode 100644 index 209ac6bac2d2d..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/LanguageExtensionInnerTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.LanguageExtensionInner; -import com.azure.resourcemanager.synapse.models.LanguageExtensionName; -import org.junit.jupiter.api.Assertions; - -public final class LanguageExtensionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LanguageExtensionInner model = - BinaryData.fromString("{\"languageExtensionName\":\"PYTHON\"}").toObject(LanguageExtensionInner.class); - Assertions.assertEquals(LanguageExtensionName.PYTHON, model.languageExtensionName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LanguageExtensionInner model = - new LanguageExtensionInner().withLanguageExtensionName(LanguageExtensionName.PYTHON); - model = BinaryData.fromObject(model).toObject(LanguageExtensionInner.class); - Assertions.assertEquals(LanguageExtensionName.PYTHON, model.languageExtensionName()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/LanguageExtensionsListTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/LanguageExtensionsListTests.java deleted file mode 100644 index f9ef243098f2f..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/LanguageExtensionsListTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.LanguageExtensionInner; -import com.azure.resourcemanager.synapse.models.LanguageExtensionName; -import com.azure.resourcemanager.synapse.models.LanguageExtensionsList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class LanguageExtensionsListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LanguageExtensionsList model = - BinaryData - .fromString( - "{\"value\":[{\"languageExtensionName\":\"PYTHON\"},{\"languageExtensionName\":\"R\"},{\"languageExtensionName\":\"PYTHON\"},{\"languageExtensionName\":\"R\"}]}") - .toObject(LanguageExtensionsList.class); - Assertions.assertEquals(LanguageExtensionName.PYTHON, model.value().get(0).languageExtensionName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LanguageExtensionsList model = - new LanguageExtensionsList() - .withValue( - Arrays - .asList( - new LanguageExtensionInner().withLanguageExtensionName(LanguageExtensionName.PYTHON), - new LanguageExtensionInner().withLanguageExtensionName(LanguageExtensionName.R), - new LanguageExtensionInner().withLanguageExtensionName(LanguageExtensionName.PYTHON), - new LanguageExtensionInner().withLanguageExtensionName(LanguageExtensionName.R))); - model = BinaryData.fromObject(model).toObject(LanguageExtensionsList.class); - Assertions.assertEquals(LanguageExtensionName.PYTHON, model.value().get(0).languageExtensionName()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/LibrariesGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/LibrariesGetWithResponseMockTests.java deleted file mode 100644 index e9e60cf1edf09..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/LibrariesGetWithResponseMockTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.LibraryResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class LibrariesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"name\":\"ocpajt\",\"path\":\"yvkbdgddk\",\"containerName\":\"dccxbeuuqu\",\"uploadedTimestamp\":\"2021-06-25T15:50:46Z\",\"type\":\"tjwwg\",\"provisioningStatus\":\"ytijcxfnond\",\"creatorId\":\"jdydhq\"},\"etag\":\"kbjuckcatuqbhp\",\"id\":\"wcnxtpzdlyseid\",\"name\":\"oa\",\"type\":\"atprytgrhzbq\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - LibraryResource response = - manager - .libraries() - .getWithResponse("kwx", "auwxsuykznhrfgsl", "lhpryjfzihuio", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ocpajt", response.namePropertiesName()); - Assertions.assertEquals("yvkbdgddk", response.path()); - Assertions.assertEquals("dccxbeuuqu", response.containerName()); - Assertions.assertEquals("tjwwg", response.typePropertiesType()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/LibrariesOperationsListByWorkspaceMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/LibrariesOperationsListByWorkspaceMockTests.java deleted file mode 100644 index 11b43b3686ac3..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/LibrariesOperationsListByWorkspaceMockTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.LibraryResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class LibrariesOperationsListByWorkspaceMockTests { - @Test - public void testListByWorkspace() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"name\":\"ptvcs\",\"path\":\"kutzct\",\"containerName\":\"qgdirda\",\"uploadedTimestamp\":\"2021-05-15T11:21:30Z\",\"type\":\"jgcf\",\"provisioningStatus\":\"xtbw\",\"creatorId\":\"irmu\"},\"etag\":\"gftt\",\"id\":\"dofgeoagfuoftnx\",\"name\":\"dwxmda\",\"type\":\"wiygmgsevmdmzenl\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.librariesOperations().listByWorkspace("d", "fa", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ptvcs", response.iterator().next().namePropertiesName()); - Assertions.assertEquals("kutzct", response.iterator().next().path()); - Assertions.assertEquals("qgdirda", response.iterator().next().containerName()); - Assertions.assertEquals("jgcf", response.iterator().next().typePropertiesType()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/LibraryInfoTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/LibraryInfoTests.java deleted file mode 100644 index 9101aa6810bf6..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/LibraryInfoTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.LibraryInfo; -import org.junit.jupiter.api.Assertions; - -public final class LibraryInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LibraryInfo model = - BinaryData - .fromString( - "{\"name\":\"kbzefezrxcczurt\",\"path\":\"ipqxbkwvzgnzv\",\"containerName\":\"bzdixzmq\",\"uploadedTimestamp\":\"2021-03-19T22:04:23Z\",\"type\":\"awopqh\",\"provisioningStatus\":\"jptmcgsbost\",\"creatorId\":\"lnd\"}") - .toObject(LibraryInfo.class); - Assertions.assertEquals("kbzefezrxcczurt", model.name()); - Assertions.assertEquals("ipqxbkwvzgnzv", model.path()); - Assertions.assertEquals("bzdixzmq", model.containerName()); - Assertions.assertEquals("awopqh", model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LibraryInfo model = - new LibraryInfo() - .withName("kbzefezrxcczurt") - .withPath("ipqxbkwvzgnzv") - .withContainerName("bzdixzmq") - .withType("awopqh"); - model = BinaryData.fromObject(model).toObject(LibraryInfo.class); - Assertions.assertEquals("kbzefezrxcczurt", model.name()); - Assertions.assertEquals("ipqxbkwvzgnzv", model.path()); - Assertions.assertEquals("bzdixzmq", model.containerName()); - Assertions.assertEquals("awopqh", model.type()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/LibraryListResponseTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/LibraryListResponseTests.java deleted file mode 100644 index 20593c816e1db..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/LibraryListResponseTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.LibraryResourceInner; -import com.azure.resourcemanager.synapse.models.LibraryListResponse; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class LibraryListResponseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LibraryListResponse model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"name\":\"fwyfwlwxjwet\",\"path\":\"sihclafzvaylp\",\"containerName\":\"sqqw\",\"uploadedTimestamp\":\"2021-10-08T01:02:03Z\",\"type\":\"w\",\"provisioningStatus\":\"chcxwaxfewzj\",\"creatorId\":\"exfdeqvhpsylk\"},\"etag\":\"hkbffmbm\",\"id\":\"zjrgyww\",\"name\":\"gjxsnptfu\",\"type\":\"gicgaaoepttaq\"},{\"properties\":{\"name\":\"dewemxswv\",\"path\":\"unzzjgehk\",\"containerName\":\"imrt\",\"uploadedTimestamp\":\"2021-10-31T23:30:22Z\",\"type\":\"fqyinljqepqw\",\"provisioningStatus\":\"xmonstshi\",\"creatorId\":\"gvelfc\"},\"etag\":\"uccbirdsvuw\",\"id\":\"o\",\"name\":\"iegstm\",\"type\":\"inwjizcilngh\"}],\"nextLink\":\"h\"}") - .toObject(LibraryListResponse.class); - Assertions.assertEquals("fwyfwlwxjwet", model.value().get(0).namePropertiesName()); - Assertions.assertEquals("sihclafzvaylp", model.value().get(0).path()); - Assertions.assertEquals("sqqw", model.value().get(0).containerName()); - Assertions.assertEquals("w", model.value().get(0).typePropertiesType()); - Assertions.assertEquals("h", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LibraryListResponse model = - new LibraryListResponse() - .withValue( - Arrays - .asList( - new LibraryResourceInner() - .withNamePropertiesName("fwyfwlwxjwet") - .withPath("sihclafzvaylp") - .withContainerName("sqqw") - .withTypePropertiesType("w"), - new LibraryResourceInner() - .withNamePropertiesName("dewemxswv") - .withPath("unzzjgehk") - .withContainerName("imrt") - .withTypePropertiesType("fqyinljqepqw"))) - .withNextLink("h"); - model = BinaryData.fromObject(model).toObject(LibraryListResponse.class); - Assertions.assertEquals("fwyfwlwxjwet", model.value().get(0).namePropertiesName()); - Assertions.assertEquals("sihclafzvaylp", model.value().get(0).path()); - Assertions.assertEquals("sqqw", model.value().get(0).containerName()); - Assertions.assertEquals("w", model.value().get(0).typePropertiesType()); - Assertions.assertEquals("h", model.nextLink()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/LibraryRequirementsTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/LibraryRequirementsTests.java deleted file mode 100644 index 5a17be959db43..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/LibraryRequirementsTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.LibraryRequirements; -import org.junit.jupiter.api.Assertions; - -public final class LibraryRequirementsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LibraryRequirements model = - BinaryData - .fromString( - "{\"time\":\"2021-02-12T17:13:55Z\",\"content\":\"kfkbgbzbowxeqocl\",\"filename\":\"ygvkzqkjj\"}") - .toObject(LibraryRequirements.class); - Assertions.assertEquals("kfkbgbzbowxeqocl", model.content()); - Assertions.assertEquals("ygvkzqkjj", model.filename()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LibraryRequirements model = new LibraryRequirements().withContent("kfkbgbzbowxeqocl").withFilename("ygvkzqkjj"); - model = BinaryData.fromObject(model).toObject(LibraryRequirements.class); - Assertions.assertEquals("kfkbgbzbowxeqocl", model.content()); - Assertions.assertEquals("ygvkzqkjj", model.filename()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/LibraryResourceInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/LibraryResourceInnerTests.java deleted file mode 100644 index d350ecf26eee2..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/LibraryResourceInnerTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.LibraryResourceInner; -import org.junit.jupiter.api.Assertions; - -public final class LibraryResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LibraryResourceInner model = - BinaryData - .fromString( - "{\"properties\":{\"name\":\"tmwwi\",\"path\":\"ehfqpofvwbc\",\"containerName\":\"embnkbw\",\"uploadedTimestamp\":\"2021-03-18T02:40:22Z\",\"type\":\"kdi\",\"provisioningStatus\":\"ihebwtsw\",\"creatorId\":\"uwfmduragegizvc\"},\"etag\":\"elisdjub\",\"id\":\"gbqi\",\"name\":\"kxkbsazgakgacyr\",\"type\":\"m\"}") - .toObject(LibraryResourceInner.class); - Assertions.assertEquals("tmwwi", model.namePropertiesName()); - Assertions.assertEquals("ehfqpofvwbc", model.path()); - Assertions.assertEquals("embnkbw", model.containerName()); - Assertions.assertEquals("kdi", model.typePropertiesType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LibraryResourceInner model = - new LibraryResourceInner() - .withNamePropertiesName("tmwwi") - .withPath("ehfqpofvwbc") - .withContainerName("embnkbw") - .withTypePropertiesType("kdi"); - model = BinaryData.fromObject(model).toObject(LibraryResourceInner.class); - Assertions.assertEquals("tmwwi", model.namePropertiesName()); - Assertions.assertEquals("ehfqpofvwbc", model.path()); - Assertions.assertEquals("embnkbw", model.containerName()); - Assertions.assertEquals("kdi", model.typePropertiesType()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/LinkedIntegrationRuntimeRbacAuthorizationTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/LinkedIntegrationRuntimeRbacAuthorizationTests.java deleted file mode 100644 index 4da7c1956c3bc..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/LinkedIntegrationRuntimeRbacAuthorizationTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.LinkedIntegrationRuntimeRbacAuthorization; -import org.junit.jupiter.api.Assertions; - -public final class LinkedIntegrationRuntimeRbacAuthorizationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LinkedIntegrationRuntimeRbacAuthorization model = - BinaryData - .fromString("{\"authorizationType\":\"RBAC\",\"resourceId\":\"qm\"}") - .toObject(LinkedIntegrationRuntimeRbacAuthorization.class); - Assertions.assertEquals("qm", model.resourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LinkedIntegrationRuntimeRbacAuthorization model = - new LinkedIntegrationRuntimeRbacAuthorization().withResourceId("qm"); - model = BinaryData.fromObject(model).toObject(LinkedIntegrationRuntimeRbacAuthorization.class); - Assertions.assertEquals("qm", model.resourceId()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/LinkedIntegrationRuntimeTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/LinkedIntegrationRuntimeTests.java deleted file mode 100644 index a91c8757fc033..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/LinkedIntegrationRuntimeTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.LinkedIntegrationRuntime; - -public final class LinkedIntegrationRuntimeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LinkedIntegrationRuntime model = - BinaryData - .fromString( - "{\"name\":\"s\",\"subscriptionId\":\"k\",\"dataFactoryName\":\"bcufqbvntn\",\"dataFactoryLocation\":\"mqso\",\"createTime\":\"2021-05-17T14:08:07Z\"}") - .toObject(LinkedIntegrationRuntime.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LinkedIntegrationRuntime model = new LinkedIntegrationRuntime(); - model = BinaryData.fromObject(model).toObject(LinkedIntegrationRuntime.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/LinkedIntegrationRuntimeTypeTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/LinkedIntegrationRuntimeTypeTests.java deleted file mode 100644 index 8b7ab08ceee1d..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/LinkedIntegrationRuntimeTypeTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.LinkedIntegrationRuntimeType; - -public final class LinkedIntegrationRuntimeTypeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LinkedIntegrationRuntimeType model = - BinaryData - .fromString("{\"authorizationType\":\"LinkedIntegrationRuntimeType\"}") - .toObject(LinkedIntegrationRuntimeType.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LinkedIntegrationRuntimeType model = new LinkedIntegrationRuntimeType(); - model = BinaryData.fromObject(model).toObject(LinkedIntegrationRuntimeType.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ListResourceSkusResultTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ListResourceSkusResultTests.java deleted file mode 100644 index 754c8e690b872..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ListResourceSkusResultTests.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.AzureResourceSkuInner; -import com.azure.resourcemanager.synapse.models.AzureCapacity; -import com.azure.resourcemanager.synapse.models.AzureScaleType; -import com.azure.resourcemanager.synapse.models.AzureSku; -import com.azure.resourcemanager.synapse.models.ListResourceSkusResult; -import com.azure.resourcemanager.synapse.models.SkuName; -import com.azure.resourcemanager.synapse.models.SkuSize; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ListResourceSkusResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ListResourceSkusResult model = - BinaryData - .fromString( - "{\"value\":[{\"resourceType\":\"qagnepzwakl\",\"sku\":{\"name\":\"Compute" - + " optimized\",\"capacity\":1527114971,\"size\":\"Small\"},\"capacity\":{\"scaleType\":\"automatic\",\"minimum\":622507993,\"maximum\":1059203016,\"default\":465336840}},{\"resourceType\":\"xaomzisglrrc\",\"sku\":{\"name\":\"Storage" - + " optimized\",\"capacity\":552300576,\"size\":\"Large\"},\"capacity\":{\"scaleType\":\"manual\",\"minimum\":1031281718,\"maximum\":244052018,\"default\":1388509479}},{\"resourceType\":\"hqo\",\"sku\":{\"name\":\"Storage" - + " optimized\",\"capacity\":1275493501,\"size\":\"Medium\"},\"capacity\":{\"scaleType\":\"none\",\"minimum\":1715281264,\"maximum\":536422928,\"default\":177387520}}]}") - .toObject(ListResourceSkusResult.class); - Assertions.assertEquals("qagnepzwakl", model.value().get(0).resourceType()); - Assertions.assertEquals(SkuName.COMPUTE_OPTIMIZED, model.value().get(0).sku().name()); - Assertions.assertEquals(1527114971, model.value().get(0).sku().capacity()); - Assertions.assertEquals(SkuSize.SMALL, model.value().get(0).sku().size()); - Assertions.assertEquals(AzureScaleType.AUTOMATIC, model.value().get(0).capacity().scaleType()); - Assertions.assertEquals(622507993, model.value().get(0).capacity().minimum()); - Assertions.assertEquals(1059203016, model.value().get(0).capacity().maximum()); - Assertions.assertEquals(465336840, model.value().get(0).capacity().defaultProperty()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ListResourceSkusResult model = - new ListResourceSkusResult() - .withValue( - Arrays - .asList( - new AzureResourceSkuInner() - .withResourceType("qagnepzwakl") - .withSku( - new AzureSku() - .withName(SkuName.COMPUTE_OPTIMIZED) - .withCapacity(1527114971) - .withSize(SkuSize.SMALL)) - .withCapacity( - new AzureCapacity() - .withScaleType(AzureScaleType.AUTOMATIC) - .withMinimum(622507993) - .withMaximum(1059203016) - .withDefaultProperty(465336840)), - new AzureResourceSkuInner() - .withResourceType("xaomzisglrrc") - .withSku( - new AzureSku() - .withName(SkuName.STORAGE_OPTIMIZED) - .withCapacity(552300576) - .withSize(SkuSize.LARGE)) - .withCapacity( - new AzureCapacity() - .withScaleType(AzureScaleType.MANUAL) - .withMinimum(1031281718) - .withMaximum(244052018) - .withDefaultProperty(1388509479)), - new AzureResourceSkuInner() - .withResourceType("hqo") - .withSku( - new AzureSku() - .withName(SkuName.STORAGE_OPTIMIZED) - .withCapacity(1275493501) - .withSize(SkuSize.MEDIUM)) - .withCapacity( - new AzureCapacity() - .withScaleType(AzureScaleType.NONE) - .withMinimum(1715281264) - .withMaximum(536422928) - .withDefaultProperty(177387520)))); - model = BinaryData.fromObject(model).toObject(ListResourceSkusResult.class); - Assertions.assertEquals("qagnepzwakl", model.value().get(0).resourceType()); - Assertions.assertEquals(SkuName.COMPUTE_OPTIMIZED, model.value().get(0).sku().name()); - Assertions.assertEquals(1527114971, model.value().get(0).sku().capacity()); - Assertions.assertEquals(SkuSize.SMALL, model.value().get(0).sku().size()); - Assertions.assertEquals(AzureScaleType.AUTOMATIC, model.value().get(0).capacity().scaleType()); - Assertions.assertEquals(622507993, model.value().get(0).capacity().minimum()); - Assertions.assertEquals(1059203016, model.value().get(0).capacity().maximum()); - Assertions.assertEquals(465336840, model.value().get(0).capacity().defaultProperty()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/MaintenanceWindowOptionsInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/MaintenanceWindowOptionsInnerTests.java deleted file mode 100644 index 2f0686f6a0c0a..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/MaintenanceWindowOptionsInnerTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.MaintenanceWindowOptionsInner; -import com.azure.resourcemanager.synapse.models.DayOfWeek; -import com.azure.resourcemanager.synapse.models.MaintenanceWindowTimeRange; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MaintenanceWindowOptionsInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MaintenanceWindowOptionsInner model = - BinaryData - .fromString( - "{\"properties\":{\"isEnabled\":false,\"maintenanceWindowCycles\":[{\"dayOfWeek\":\"Saturday\",\"startTime\":\"sjnkal\",\"duration\":\"tiiswacffg\"},{\"dayOfWeek\":\"Wednesday\",\"startTime\":\"ewkfvhqcrai\",\"duration\":\"pnppfuf\"},{\"dayOfWeek\":\"Monday\",\"startTime\":\"mh\",\"duration\":\"xyjrxsagafcnih\"},{\"dayOfWeek\":\"Tuesday\",\"startTime\":\"pnedgf\",\"duration\":\"vkcvqvpkeqd\"}],\"minDurationInMinutes\":978047634,\"defaultDurationInMinutes\":1258366887,\"minCycles\":649477703,\"timeGranularityInMinutes\":60814629,\"allowMultipleMaintenanceWindowsPerCycle\":true},\"id\":\"tbobz\",\"name\":\"opcjwvnhd\",\"type\":\"d\"}") - .toObject(MaintenanceWindowOptionsInner.class); - Assertions.assertEquals(false, model.isEnabled()); - Assertions.assertEquals(DayOfWeek.SATURDAY, model.maintenanceWindowCycles().get(0).dayOfWeek()); - Assertions.assertEquals("sjnkal", model.maintenanceWindowCycles().get(0).startTime()); - Assertions.assertEquals("tiiswacffg", model.maintenanceWindowCycles().get(0).duration()); - Assertions.assertEquals(978047634, model.minDurationInMinutes()); - Assertions.assertEquals(1258366887, model.defaultDurationInMinutes()); - Assertions.assertEquals(649477703, model.minCycles()); - Assertions.assertEquals(60814629, model.timeGranularityInMinutes()); - Assertions.assertEquals(true, model.allowMultipleMaintenanceWindowsPerCycle()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MaintenanceWindowOptionsInner model = - new MaintenanceWindowOptionsInner() - .withIsEnabled(false) - .withMaintenanceWindowCycles( - Arrays - .asList( - new MaintenanceWindowTimeRange() - .withDayOfWeek(DayOfWeek.SATURDAY) - .withStartTime("sjnkal") - .withDuration("tiiswacffg"), - new MaintenanceWindowTimeRange() - .withDayOfWeek(DayOfWeek.WEDNESDAY) - .withStartTime("ewkfvhqcrai") - .withDuration("pnppfuf"), - new MaintenanceWindowTimeRange() - .withDayOfWeek(DayOfWeek.MONDAY) - .withStartTime("mh") - .withDuration("xyjrxsagafcnih"), - new MaintenanceWindowTimeRange() - .withDayOfWeek(DayOfWeek.TUESDAY) - .withStartTime("pnedgf") - .withDuration("vkcvqvpkeqd"))) - .withMinDurationInMinutes(978047634) - .withDefaultDurationInMinutes(1258366887) - .withMinCycles(649477703) - .withTimeGranularityInMinutes(60814629) - .withAllowMultipleMaintenanceWindowsPerCycle(true); - model = BinaryData.fromObject(model).toObject(MaintenanceWindowOptionsInner.class); - Assertions.assertEquals(false, model.isEnabled()); - Assertions.assertEquals(DayOfWeek.SATURDAY, model.maintenanceWindowCycles().get(0).dayOfWeek()); - Assertions.assertEquals("sjnkal", model.maintenanceWindowCycles().get(0).startTime()); - Assertions.assertEquals("tiiswacffg", model.maintenanceWindowCycles().get(0).duration()); - Assertions.assertEquals(978047634, model.minDurationInMinutes()); - Assertions.assertEquals(1258366887, model.defaultDurationInMinutes()); - Assertions.assertEquals(649477703, model.minCycles()); - Assertions.assertEquals(60814629, model.timeGranularityInMinutes()); - Assertions.assertEquals(true, model.allowMultipleMaintenanceWindowsPerCycle()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/MaintenanceWindowOptionsPropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/MaintenanceWindowOptionsPropertiesTests.java deleted file mode 100644 index b8c3dacb2fe96..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/MaintenanceWindowOptionsPropertiesTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.MaintenanceWindowOptionsProperties; -import com.azure.resourcemanager.synapse.models.DayOfWeek; -import com.azure.resourcemanager.synapse.models.MaintenanceWindowTimeRange; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MaintenanceWindowOptionsPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MaintenanceWindowOptionsProperties model = - BinaryData - .fromString( - "{\"isEnabled\":false,\"maintenanceWindowCycles\":[{\"dayOfWeek\":\"Saturday\",\"startTime\":\"lpmutwuoegrpkhj\",\"duration\":\"iyq\"},{\"dayOfWeek\":\"Tuesday\",\"startTime\":\"cpdggkzzlvmbmp\",\"duration\":\"modfvuefywsbpfvm\"},{\"dayOfWeek\":\"Saturday\",\"startTime\":\"fouyf\",\"duration\":\"akcp\"},{\"dayOfWeek\":\"Wednesday\",\"startTime\":\"vqtmnub\",\"duration\":\"kpzksmondjmq\"}],\"minDurationInMinutes\":1083170526,\"defaultDurationInMinutes\":1371154692,\"minCycles\":326974416,\"timeGranularityInMinutes\":1838860649,\"allowMultipleMaintenanceWindowsPerCycle\":true}") - .toObject(MaintenanceWindowOptionsProperties.class); - Assertions.assertEquals(false, model.isEnabled()); - Assertions.assertEquals(DayOfWeek.SATURDAY, model.maintenanceWindowCycles().get(0).dayOfWeek()); - Assertions.assertEquals("lpmutwuoegrpkhj", model.maintenanceWindowCycles().get(0).startTime()); - Assertions.assertEquals("iyq", model.maintenanceWindowCycles().get(0).duration()); - Assertions.assertEquals(1083170526, model.minDurationInMinutes()); - Assertions.assertEquals(1371154692, model.defaultDurationInMinutes()); - Assertions.assertEquals(326974416, model.minCycles()); - Assertions.assertEquals(1838860649, model.timeGranularityInMinutes()); - Assertions.assertEquals(true, model.allowMultipleMaintenanceWindowsPerCycle()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MaintenanceWindowOptionsProperties model = - new MaintenanceWindowOptionsProperties() - .withIsEnabled(false) - .withMaintenanceWindowCycles( - Arrays - .asList( - new MaintenanceWindowTimeRange() - .withDayOfWeek(DayOfWeek.SATURDAY) - .withStartTime("lpmutwuoegrpkhj") - .withDuration("iyq"), - new MaintenanceWindowTimeRange() - .withDayOfWeek(DayOfWeek.TUESDAY) - .withStartTime("cpdggkzzlvmbmp") - .withDuration("modfvuefywsbpfvm"), - new MaintenanceWindowTimeRange() - .withDayOfWeek(DayOfWeek.SATURDAY) - .withStartTime("fouyf") - .withDuration("akcp"), - new MaintenanceWindowTimeRange() - .withDayOfWeek(DayOfWeek.WEDNESDAY) - .withStartTime("vqtmnub") - .withDuration("kpzksmondjmq"))) - .withMinDurationInMinutes(1083170526) - .withDefaultDurationInMinutes(1371154692) - .withMinCycles(326974416) - .withTimeGranularityInMinutes(1838860649) - .withAllowMultipleMaintenanceWindowsPerCycle(true); - model = BinaryData.fromObject(model).toObject(MaintenanceWindowOptionsProperties.class); - Assertions.assertEquals(false, model.isEnabled()); - Assertions.assertEquals(DayOfWeek.SATURDAY, model.maintenanceWindowCycles().get(0).dayOfWeek()); - Assertions.assertEquals("lpmutwuoegrpkhj", model.maintenanceWindowCycles().get(0).startTime()); - Assertions.assertEquals("iyq", model.maintenanceWindowCycles().get(0).duration()); - Assertions.assertEquals(1083170526, model.minDurationInMinutes()); - Assertions.assertEquals(1371154692, model.defaultDurationInMinutes()); - Assertions.assertEquals(326974416, model.minCycles()); - Assertions.assertEquals(1838860649, model.timeGranularityInMinutes()); - Assertions.assertEquals(true, model.allowMultipleMaintenanceWindowsPerCycle()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/MaintenanceWindowTimeRangeTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/MaintenanceWindowTimeRangeTests.java deleted file mode 100644 index 481d19e2efedf..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/MaintenanceWindowTimeRangeTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.DayOfWeek; -import com.azure.resourcemanager.synapse.models.MaintenanceWindowTimeRange; -import org.junit.jupiter.api.Assertions; - -public final class MaintenanceWindowTimeRangeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MaintenanceWindowTimeRange model = - BinaryData - .fromString("{\"dayOfWeek\":\"Thursday\",\"startTime\":\"o\",\"duration\":\"sg\"}") - .toObject(MaintenanceWindowTimeRange.class); - Assertions.assertEquals(DayOfWeek.THURSDAY, model.dayOfWeek()); - Assertions.assertEquals("o", model.startTime()); - Assertions.assertEquals("sg", model.duration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MaintenanceWindowTimeRange model = - new MaintenanceWindowTimeRange().withDayOfWeek(DayOfWeek.THURSDAY).withStartTime("o").withDuration("sg"); - model = BinaryData.fromObject(model).toObject(MaintenanceWindowTimeRange.class); - Assertions.assertEquals(DayOfWeek.THURSDAY, model.dayOfWeek()); - Assertions.assertEquals("o", model.startTime()); - Assertions.assertEquals("sg", model.duration()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/MaintenanceWindowsInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/MaintenanceWindowsInnerTests.java deleted file mode 100644 index d46d472d9d0f2..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/MaintenanceWindowsInnerTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.MaintenanceWindowsInner; -import com.azure.resourcemanager.synapse.models.DayOfWeek; -import com.azure.resourcemanager.synapse.models.MaintenanceWindowTimeRange; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MaintenanceWindowsInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MaintenanceWindowsInner model = - BinaryData - .fromString( - "{\"properties\":{\"timeRanges\":[{\"dayOfWeek\":\"Sunday\",\"startTime\":\"eodkwobda\",\"duration\":\"tibqdxbxwakb\"},{\"dayOfWeek\":\"Wednesday\",\"startTime\":\"ndlkzgxhurip\",\"duration\":\"podxunkb\"}]},\"id\":\"bxmubyynt\",\"name\":\"lrb\",\"type\":\"tkoievseotgq\"}") - .toObject(MaintenanceWindowsInner.class); - Assertions.assertEquals(DayOfWeek.SUNDAY, model.timeRanges().get(0).dayOfWeek()); - Assertions.assertEquals("eodkwobda", model.timeRanges().get(0).startTime()); - Assertions.assertEquals("tibqdxbxwakb", model.timeRanges().get(0).duration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MaintenanceWindowsInner model = - new MaintenanceWindowsInner() - .withTimeRanges( - Arrays - .asList( - new MaintenanceWindowTimeRange() - .withDayOfWeek(DayOfWeek.SUNDAY) - .withStartTime("eodkwobda") - .withDuration("tibqdxbxwakb"), - new MaintenanceWindowTimeRange() - .withDayOfWeek(DayOfWeek.WEDNESDAY) - .withStartTime("ndlkzgxhurip") - .withDuration("podxunkb"))); - model = BinaryData.fromObject(model).toObject(MaintenanceWindowsInner.class); - Assertions.assertEquals(DayOfWeek.SUNDAY, model.timeRanges().get(0).dayOfWeek()); - Assertions.assertEquals("eodkwobda", model.timeRanges().get(0).startTime()); - Assertions.assertEquals("tibqdxbxwakb", model.timeRanges().get(0).duration()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/MaintenanceWindowsPropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/MaintenanceWindowsPropertiesTests.java deleted file mode 100644 index 256d809b96ff5..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/MaintenanceWindowsPropertiesTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.MaintenanceWindowsProperties; -import com.azure.resourcemanager.synapse.models.DayOfWeek; -import com.azure.resourcemanager.synapse.models.MaintenanceWindowTimeRange; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MaintenanceWindowsPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MaintenanceWindowsProperties model = - BinaryData - .fromString( - "{\"timeRanges\":[{\"dayOfWeek\":\"Tuesday\",\"startTime\":\"wlauwzizxbmpg\",\"duration\":\"efuzmuvpbttd\"},{\"dayOfWeek\":\"Sunday\",\"startTime\":\"p\",\"duration\":\"ebmnzbtbhjpglk\"},{\"dayOfWeek\":\"Monday\",\"startTime\":\"dneu\",\"duration\":\"fphsdyhtozfikdow\"},{\"dayOfWeek\":\"Sunday\",\"startTime\":\"v\",\"duration\":\"xclvit\"}]}") - .toObject(MaintenanceWindowsProperties.class); - Assertions.assertEquals(DayOfWeek.TUESDAY, model.timeRanges().get(0).dayOfWeek()); - Assertions.assertEquals("wlauwzizxbmpg", model.timeRanges().get(0).startTime()); - Assertions.assertEquals("efuzmuvpbttd", model.timeRanges().get(0).duration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MaintenanceWindowsProperties model = - new MaintenanceWindowsProperties() - .withTimeRanges( - Arrays - .asList( - new MaintenanceWindowTimeRange() - .withDayOfWeek(DayOfWeek.TUESDAY) - .withStartTime("wlauwzizxbmpg") - .withDuration("efuzmuvpbttd"), - new MaintenanceWindowTimeRange() - .withDayOfWeek(DayOfWeek.SUNDAY) - .withStartTime("p") - .withDuration("ebmnzbtbhjpglk"), - new MaintenanceWindowTimeRange() - .withDayOfWeek(DayOfWeek.MONDAY) - .withStartTime("dneu") - .withDuration("fphsdyhtozfikdow"), - new MaintenanceWindowTimeRange() - .withDayOfWeek(DayOfWeek.SUNDAY) - .withStartTime("v") - .withDuration("xclvit"))); - model = BinaryData.fromObject(model).toObject(MaintenanceWindowsProperties.class); - Assertions.assertEquals(DayOfWeek.TUESDAY, model.timeRanges().get(0).dayOfWeek()); - Assertions.assertEquals("wlauwzizxbmpg", model.timeRanges().get(0).startTime()); - Assertions.assertEquals("efuzmuvpbttd", model.timeRanges().get(0).duration()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ManagedIdentitySqlControlSettingsModelInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ManagedIdentitySqlControlSettingsModelInnerTests.java deleted file mode 100644 index 0c57aa6ce818f..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ManagedIdentitySqlControlSettingsModelInnerTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.ManagedIdentitySqlControlSettingsModelInner; -import com.azure.resourcemanager.synapse.models.DesiredState; -import com.azure.resourcemanager.synapse.models.ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity; -import org.junit.jupiter.api.Assertions; - -public final class ManagedIdentitySqlControlSettingsModelInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedIdentitySqlControlSettingsModelInner model = - BinaryData - .fromString( - "{\"properties\":{\"grantSqlControlToManagedIdentity\":{\"desiredState\":\"Enabled\",\"actualState\":\"Disabling\"}},\"id\":\"nsiru\",\"name\":\"hzmme\",\"type\":\"ckdlpag\"}") - .toObject(ManagedIdentitySqlControlSettingsModelInner.class); - Assertions.assertEquals(DesiredState.ENABLED, model.grantSqlControlToManagedIdentity().desiredState()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedIdentitySqlControlSettingsModelInner model = - new ManagedIdentitySqlControlSettingsModelInner() - .withGrantSqlControlToManagedIdentity( - new ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity() - .withDesiredState(DesiredState.ENABLED)); - model = BinaryData.fromObject(model).toObject(ManagedIdentitySqlControlSettingsModelInner.class); - Assertions.assertEquals(DesiredState.ENABLED, model.grantSqlControlToManagedIdentity().desiredState()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentityTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentityTests.java deleted file mode 100644 index 3e18792ea99a5..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentityTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.DesiredState; -import com.azure.resourcemanager.synapse.models.ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity; -import org.junit.jupiter.api.Assertions; - -public final class ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity model = - BinaryData - .fromString("{\"desiredState\":\"Enabled\",\"actualState\":\"Unknown\"}") - .toObject(ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity.class); - Assertions.assertEquals(DesiredState.ENABLED, model.desiredState()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity model = - new ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity() - .withDesiredState(DesiredState.ENABLED); - model = - BinaryData - .fromObject(model) - .toObject(ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity.class); - Assertions.assertEquals(DesiredState.ENABLED, model.desiredState()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ManagedIdentitySqlControlSettingsModelPropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ManagedIdentitySqlControlSettingsModelPropertiesTests.java deleted file mode 100644 index 8d3c34860942c..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ManagedIdentitySqlControlSettingsModelPropertiesTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.ManagedIdentitySqlControlSettingsModelProperties; -import com.azure.resourcemanager.synapse.models.DesiredState; -import com.azure.resourcemanager.synapse.models.ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity; -import org.junit.jupiter.api.Assertions; - -public final class ManagedIdentitySqlControlSettingsModelPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedIdentitySqlControlSettingsModelProperties model = - BinaryData - .fromString( - "{\"grantSqlControlToManagedIdentity\":{\"desiredState\":\"Enabled\",\"actualState\":\"Disabled\"}}") - .toObject(ManagedIdentitySqlControlSettingsModelProperties.class); - Assertions.assertEquals(DesiredState.ENABLED, model.grantSqlControlToManagedIdentity().desiredState()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedIdentitySqlControlSettingsModelProperties model = - new ManagedIdentitySqlControlSettingsModelProperties() - .withGrantSqlControlToManagedIdentity( - new ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity() - .withDesiredState(DesiredState.ENABLED)); - model = BinaryData.fromObject(model).toObject(ManagedIdentitySqlControlSettingsModelProperties.class); - Assertions.assertEquals(DesiredState.ENABLED, model.grantSqlControlToManagedIdentity().desiredState()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ManagedIdentityTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ManagedIdentityTests.java deleted file mode 100644 index 28518f423c182..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ManagedIdentityTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.ManagedIdentity; -import com.azure.resourcemanager.synapse.models.ResourceIdentityType; -import com.azure.resourcemanager.synapse.models.UserAssignedManagedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ManagedIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedIdentity model = - BinaryData - .fromString( - "{\"principalId\":\"ddyvvjskgfmo\",\"tenantId\":\"83f756fc-ba99-4f6f-abf8-45dc84541b54\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"tjeaahhvjhh\":{\"clientId\":\"bf52dee7-0664-441f-809b-5e69007ef11b\",\"principalId\":\"3aa66067-17f3-44fb-99cf-205da1c152f2\"},\"zybbj\":{\"clientId\":\"0c631fe0-e671-415f-a9fc-bf6ba14da35e\",\"principalId\":\"70f0a1be-5d32-4ca6-b8d2-df225199043f\"},\"jks\":{\"clientId\":\"4ce29efb-a2e4-48b2-acf0-8bafc2106bb5\",\"principalId\":\"dfb475a2-3c00-4d35-ae90-9cebc91c3124\"},\"yxvxevblbjed\":{\"clientId\":\"0f9fc1fd-de08-45c4-9892-1a46ddd831c0\",\"principalId\":\"e66c4165-b322-403a-89fa-acb8b979cb30\"}}}") - .toObject(ManagedIdentity.class); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedIdentity model = - new ManagedIdentity() - .withType(ResourceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "tjeaahhvjhh", - new UserAssignedManagedIdentity(), - "zybbj", - new UserAssignedManagedIdentity(), - "jks", - new UserAssignedManagedIdentity(), - "yxvxevblbjed", - new UserAssignedManagedIdentity())); - model = BinaryData.fromObject(model).toObject(ManagedIdentity.class); - Assertions.assertEquals(ResourceIdentityType.SYSTEM_ASSIGNED, model.type()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ManagedIntegrationRuntimeManagedVirtualNetworkReferenceTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ManagedIntegrationRuntimeManagedVirtualNetworkReferenceTests.java deleted file mode 100644 index 22fe4a3130fcb..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ManagedIntegrationRuntimeManagedVirtualNetworkReferenceTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.ManagedIntegrationRuntimeManagedVirtualNetworkReference; -import org.junit.jupiter.api.Assertions; - -public final class ManagedIntegrationRuntimeManagedVirtualNetworkReferenceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedIntegrationRuntimeManagedVirtualNetworkReference model = - BinaryData - .fromString("{\"referenceName\":\"regzgyufutrwpwer\",\"type\":\"kzkdhmeott\",\"id\":\"jyosxwwh\"}") - .toObject(ManagedIntegrationRuntimeManagedVirtualNetworkReference.class); - Assertions.assertEquals("regzgyufutrwpwer", model.referenceName()); - Assertions.assertEquals("kzkdhmeott", model.type()); - Assertions.assertEquals("jyosxwwh", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedIntegrationRuntimeManagedVirtualNetworkReference model = - new ManagedIntegrationRuntimeManagedVirtualNetworkReference() - .withReferenceName("regzgyufutrwpwer") - .withType("kzkdhmeott") - .withId("jyosxwwh"); - model = BinaryData.fromObject(model).toObject(ManagedIntegrationRuntimeManagedVirtualNetworkReference.class); - Assertions.assertEquals("regzgyufutrwpwer", model.referenceName()); - Assertions.assertEquals("kzkdhmeott", model.type()); - Assertions.assertEquals("jyosxwwh", model.id()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ManagedIntegrationRuntimeTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ManagedIntegrationRuntimeTests.java deleted file mode 100644 index c2d4f2bba6a1f..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ManagedIntegrationRuntimeTests.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeComputeProperties; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeEdition; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeLicenseType; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeSsisProperties; -import com.azure.resourcemanager.synapse.models.ManagedIntegrationRuntime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ManagedIntegrationRuntimeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedIntegrationRuntime model = - BinaryData - .fromString( - "{\"type\":\"Managed\",\"state\":\"Limited\",\"typeProperties\":{\"computeProperties\":{\"location\":\"lkhhu\",\"nodeSize\":\"cpoq\",\"numberOfNodes\":2065973208,\"maxParallelExecutionsPerNode\":1853837051,\"\":{\"nlejjjkxybwf\":\"datao\"}},\"ssisProperties\":{\"licenseType\":\"LicenseIncluded\",\"edition\":\"Standard\",\"expressCustomSetupProperties\":[],\"\":{\"tjknsxfwushcdp\":\"datayk\",\"kuwxeoiojfizfavk\":\"dataupnqrmgjfb\",\"fwxrzxmdew\":\"datazwfbcyaykmmfzs\"}}},\"managedVirtualNetwork\":{\"referenceName\":\"xkrplbjaz\",\"type\":\"wwviyo\",\"id\":\"suhbrnn\"},\"description\":\"xs\",\"\":{\"wetp\":\"datahqkb\",\"se\":\"datazycyqiqyhg\",\"sfledyn\":\"datazlex\",\"fbzkk\":\"datajpziu\"}}") - .toObject(ManagedIntegrationRuntime.class); - Assertions.assertEquals("xs", model.description()); - Assertions.assertEquals("lkhhu", model.computeProperties().location()); - Assertions.assertEquals("cpoq", model.computeProperties().nodeSize()); - Assertions.assertEquals(2065973208, model.computeProperties().numberOfNodes()); - Assertions.assertEquals(1853837051, model.computeProperties().maxParallelExecutionsPerNode()); - Assertions.assertEquals(IntegrationRuntimeLicenseType.LICENSE_INCLUDED, model.ssisProperties().licenseType()); - Assertions.assertEquals(IntegrationRuntimeEdition.STANDARD, model.ssisProperties().edition()); - Assertions.assertEquals("xkrplbjaz", model.referenceName()); - Assertions.assertEquals("wwviyo", model.typeManagedVirtualNetworkType()); - Assertions.assertEquals("suhbrnn", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedIntegrationRuntime model = - new ManagedIntegrationRuntime() - .withDescription("xs") - .withComputeProperties( - new IntegrationRuntimeComputeProperties() - .withLocation("lkhhu") - .withNodeSize("cpoq") - .withNumberOfNodes(2065973208) - .withMaxParallelExecutionsPerNode(1853837051) - .withAdditionalProperties(mapOf())) - .withSsisProperties( - new IntegrationRuntimeSsisProperties() - .withLicenseType(IntegrationRuntimeLicenseType.LICENSE_INCLUDED) - .withEdition(IntegrationRuntimeEdition.STANDARD) - .withExpressCustomSetupProperties(Arrays.asList()) - .withAdditionalProperties(mapOf())) - .withReferenceName("xkrplbjaz") - .withTypeManagedVirtualNetworkType("wwviyo") - .withId("suhbrnn"); - model = BinaryData.fromObject(model).toObject(ManagedIntegrationRuntime.class); - Assertions.assertEquals("xs", model.description()); - Assertions.assertEquals("lkhhu", model.computeProperties().location()); - Assertions.assertEquals("cpoq", model.computeProperties().nodeSize()); - Assertions.assertEquals(2065973208, model.computeProperties().numberOfNodes()); - Assertions.assertEquals(1853837051, model.computeProperties().maxParallelExecutionsPerNode()); - Assertions.assertEquals(IntegrationRuntimeLicenseType.LICENSE_INCLUDED, model.ssisProperties().licenseType()); - Assertions.assertEquals(IntegrationRuntimeEdition.STANDARD, model.ssisProperties().edition()); - Assertions.assertEquals("xkrplbjaz", model.referenceName()); - Assertions.assertEquals("wwviyo", model.typeManagedVirtualNetworkType()); - Assertions.assertEquals("suhbrnn", model.id()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ManagedIntegrationRuntimeTypePropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ManagedIntegrationRuntimeTypePropertiesTests.java deleted file mode 100644 index cfdd0f326683b..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ManagedIntegrationRuntimeTypePropertiesTests.java +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.ManagedIntegrationRuntimeTypeProperties; -import com.azure.resourcemanager.synapse.models.CustomSetupBase; -import com.azure.resourcemanager.synapse.models.DataFlowComputeType; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeComputeProperties; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeCustomSetupScriptProperties; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeDataFlowProperties; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeDataProxyProperties; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeEdition; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeLicenseType; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeSsisCatalogInfo; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeSsisCatalogPricingTier; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeSsisProperties; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeVNetProperties; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ManagedIntegrationRuntimeTypePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedIntegrationRuntimeTypeProperties model = - BinaryData - .fromString( - "{\"computeProperties\":{\"location\":\"hqsycljselp\",\"nodeSize\":\"bafvafhlbylcc\",\"numberOfNodes\":1015294496,\"maxParallelExecutionsPerNode\":1495868863,\"dataFlowProperties\":{\"computeType\":\"ComputeOptimized\",\"coreCount\":1737850278,\"timeToLive\":1616798113,\"cleanup\":false,\"\":{\"airrhvhfnracw\":\"dataltdb\"}},\"vNetProperties\":{\"vNetId\":\"igtuu\",\"subnet\":\"ouhdawsigrb\",\"publicIPs\":[\"sjybvitv\",\"kjyaznumtg\",\"m\"],\"subnetId\":\"dchozfnkfexl\",\"\":{\"naqln\":\"dataoakizvoai\",\"phvxz\":\"datawiguyxlyk\"}},\"\":{\"vkcqhr\":\"datahmpejtlkexaonw\",\"ubyqj\":\"datahxknlccrmmkyupi\",\"em\":\"datakakfqfr\"}},\"ssisProperties\":{\"catalogInfo\":{\"catalogServerEndpoint\":\"udxjascowv\",\"catalogAdminUserName\":\"jkpdxphlkksnm\",\"catalogPricingTier\":\"Premium\",\"\":{\"zuqnwsithuqo\":\"datajd\"}},\"licenseType\":\"BasePrice\",\"customSetupScriptProperties\":{\"blobContainerUri\":\"uqwqulsutrjbhxyk\"},\"dataProxyProperties\":{\"path\":\"vqqugdrftbcv\"},\"edition\":\"Enterprise\",\"expressCustomSetupProperties\":[{\"type\":\"CustomSetupBase\"},{\"type\":\"CustomSetupBase\"},{\"type\":\"CustomSetupBase\"},{\"type\":\"CustomSetupBase\"}],\"\":{\"reagkhyxvrqt\":\"dataowtljvfw\",\"s\":\"databczsulmdgglmepjp\",\"fpgylkve\":\"dataykgsangpszng\",\"edmzrgjfoknub\":\"datajujcngoad\"}}}") - .toObject(ManagedIntegrationRuntimeTypeProperties.class); - Assertions.assertEquals("hqsycljselp", model.computeProperties().location()); - Assertions.assertEquals("bafvafhlbylcc", model.computeProperties().nodeSize()); - Assertions.assertEquals(1015294496, model.computeProperties().numberOfNodes()); - Assertions.assertEquals(1495868863, model.computeProperties().maxParallelExecutionsPerNode()); - Assertions - .assertEquals( - DataFlowComputeType.COMPUTE_OPTIMIZED, model.computeProperties().dataFlowProperties().computeType()); - Assertions.assertEquals(1737850278, model.computeProperties().dataFlowProperties().coreCount()); - Assertions.assertEquals(1616798113, model.computeProperties().dataFlowProperties().timeToLive()); - Assertions.assertEquals(false, model.computeProperties().dataFlowProperties().cleanup()); - Assertions.assertEquals("igtuu", model.computeProperties().vNetProperties().vNetId()); - Assertions.assertEquals("ouhdawsigrb", model.computeProperties().vNetProperties().subnet()); - Assertions.assertEquals("sjybvitv", model.computeProperties().vNetProperties().publicIPs().get(0)); - Assertions.assertEquals("dchozfnkfexl", model.computeProperties().vNetProperties().subnetId()); - Assertions.assertEquals("udxjascowv", model.ssisProperties().catalogInfo().catalogServerEndpoint()); - Assertions.assertEquals("jkpdxphlkksnm", model.ssisProperties().catalogInfo().catalogAdminUsername()); - Assertions - .assertEquals( - IntegrationRuntimeSsisCatalogPricingTier.PREMIUM, - model.ssisProperties().catalogInfo().catalogPricingTier()); - Assertions.assertEquals(IntegrationRuntimeLicenseType.BASE_PRICE, model.ssisProperties().licenseType()); - Assertions - .assertEquals("uqwqulsutrjbhxyk", model.ssisProperties().customSetupScriptProperties().blobContainerUri()); - Assertions.assertEquals("vqqugdrftbcv", model.ssisProperties().dataProxyProperties().path()); - Assertions.assertEquals(IntegrationRuntimeEdition.ENTERPRISE, model.ssisProperties().edition()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedIntegrationRuntimeTypeProperties model = - new ManagedIntegrationRuntimeTypeProperties() - .withComputeProperties( - new IntegrationRuntimeComputeProperties() - .withLocation("hqsycljselp") - .withNodeSize("bafvafhlbylcc") - .withNumberOfNodes(1015294496) - .withMaxParallelExecutionsPerNode(1495868863) - .withDataFlowProperties( - new IntegrationRuntimeDataFlowProperties() - .withComputeType(DataFlowComputeType.COMPUTE_OPTIMIZED) - .withCoreCount(1737850278) - .withTimeToLive(1616798113) - .withCleanup(false) - .withAdditionalProperties(mapOf())) - .withVNetProperties( - new IntegrationRuntimeVNetProperties() - .withVNetId("igtuu") - .withSubnet("ouhdawsigrb") - .withPublicIPs(Arrays.asList("sjybvitv", "kjyaznumtg", "m")) - .withSubnetId("dchozfnkfexl") - .withAdditionalProperties(mapOf())) - .withAdditionalProperties(mapOf())) - .withSsisProperties( - new IntegrationRuntimeSsisProperties() - .withCatalogInfo( - new IntegrationRuntimeSsisCatalogInfo() - .withCatalogServerEndpoint("udxjascowv") - .withCatalogAdminUsername("jkpdxphlkksnm") - .withCatalogPricingTier(IntegrationRuntimeSsisCatalogPricingTier.PREMIUM) - .withAdditionalProperties(mapOf())) - .withLicenseType(IntegrationRuntimeLicenseType.BASE_PRICE) - .withCustomSetupScriptProperties( - new IntegrationRuntimeCustomSetupScriptProperties() - .withBlobContainerUri("uqwqulsutrjbhxyk")) - .withDataProxyProperties(new IntegrationRuntimeDataProxyProperties().withPath("vqqugdrftbcv")) - .withEdition(IntegrationRuntimeEdition.ENTERPRISE) - .withExpressCustomSetupProperties( - Arrays - .asList( - new CustomSetupBase(), - new CustomSetupBase(), - new CustomSetupBase(), - new CustomSetupBase())) - .withAdditionalProperties(mapOf())); - model = BinaryData.fromObject(model).toObject(ManagedIntegrationRuntimeTypeProperties.class); - Assertions.assertEquals("hqsycljselp", model.computeProperties().location()); - Assertions.assertEquals("bafvafhlbylcc", model.computeProperties().nodeSize()); - Assertions.assertEquals(1015294496, model.computeProperties().numberOfNodes()); - Assertions.assertEquals(1495868863, model.computeProperties().maxParallelExecutionsPerNode()); - Assertions - .assertEquals( - DataFlowComputeType.COMPUTE_OPTIMIZED, model.computeProperties().dataFlowProperties().computeType()); - Assertions.assertEquals(1737850278, model.computeProperties().dataFlowProperties().coreCount()); - Assertions.assertEquals(1616798113, model.computeProperties().dataFlowProperties().timeToLive()); - Assertions.assertEquals(false, model.computeProperties().dataFlowProperties().cleanup()); - Assertions.assertEquals("igtuu", model.computeProperties().vNetProperties().vNetId()); - Assertions.assertEquals("ouhdawsigrb", model.computeProperties().vNetProperties().subnet()); - Assertions.assertEquals("sjybvitv", model.computeProperties().vNetProperties().publicIPs().get(0)); - Assertions.assertEquals("dchozfnkfexl", model.computeProperties().vNetProperties().subnetId()); - Assertions.assertEquals("udxjascowv", model.ssisProperties().catalogInfo().catalogServerEndpoint()); - Assertions.assertEquals("jkpdxphlkksnm", model.ssisProperties().catalogInfo().catalogAdminUsername()); - Assertions - .assertEquals( - IntegrationRuntimeSsisCatalogPricingTier.PREMIUM, - model.ssisProperties().catalogInfo().catalogPricingTier()); - Assertions.assertEquals(IntegrationRuntimeLicenseType.BASE_PRICE, model.ssisProperties().licenseType()); - Assertions - .assertEquals("uqwqulsutrjbhxyk", model.ssisProperties().customSetupScriptProperties().blobContainerUri()); - Assertions.assertEquals("vqqugdrftbcv", model.ssisProperties().dataProxyProperties().path()); - Assertions.assertEquals(IntegrationRuntimeEdition.ENTERPRISE, model.ssisProperties().edition()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ManagedVirtualNetworkSettingsTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ManagedVirtualNetworkSettingsTests.java deleted file mode 100644 index 97e356d3118e0..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ManagedVirtualNetworkSettingsTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.ManagedVirtualNetworkSettings; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ManagedVirtualNetworkSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedVirtualNetworkSettings model = - BinaryData - .fromString( - "{\"preventDataExfiltration\":false,\"linkedAccessCheckOnTargetResource\":true,\"allowedAadTenantIdsForLinking\":[\"pmyyefrpmpdnqq\",\"ka\",\"ao\",\"vmm\"]}") - .toObject(ManagedVirtualNetworkSettings.class); - Assertions.assertEquals(false, model.preventDataExfiltration()); - Assertions.assertEquals(true, model.linkedAccessCheckOnTargetResource()); - Assertions.assertEquals("pmyyefrpmpdnqq", model.allowedAadTenantIdsForLinking().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedVirtualNetworkSettings model = - new ManagedVirtualNetworkSettings() - .withPreventDataExfiltration(false) - .withLinkedAccessCheckOnTargetResource(true) - .withAllowedAadTenantIdsForLinking(Arrays.asList("pmyyefrpmpdnqq", "ka", "ao", "vmm")); - model = BinaryData.fromObject(model).toObject(ManagedVirtualNetworkSettings.class); - Assertions.assertEquals(false, model.preventDataExfiltration()); - Assertions.assertEquals(true, model.linkedAccessCheckOnTargetResource()); - Assertions.assertEquals("pmyyefrpmpdnqq", model.allowedAadTenantIdsForLinking().get(0)); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/MetadataSyncConfigInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/MetadataSyncConfigInnerTests.java deleted file mode 100644 index 1bf3551e1718b..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/MetadataSyncConfigInnerTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.MetadataSyncConfigInner; -import org.junit.jupiter.api.Assertions; - -public final class MetadataSyncConfigInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MetadataSyncConfigInner model = - BinaryData - .fromString( - "{\"properties\":{\"enabled\":true,\"syncIntervalInMinutes\":96984034},\"id\":\"sw\",\"name\":\"rtjriplrbpbew\",\"type\":\"ghfg\"}") - .toObject(MetadataSyncConfigInner.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals(96984034, model.syncIntervalInMinutes()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MetadataSyncConfigInner model = - new MetadataSyncConfigInner().withEnabled(true).withSyncIntervalInMinutes(96984034); - model = BinaryData.fromObject(model).toObject(MetadataSyncConfigInner.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals(96984034, model.syncIntervalInMinutes()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/MetadataSyncConfigPropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/MetadataSyncConfigPropertiesTests.java deleted file mode 100644 index 87564fbad4e67..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/MetadataSyncConfigPropertiesTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.MetadataSyncConfigProperties; -import org.junit.jupiter.api.Assertions; - -public final class MetadataSyncConfigPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MetadataSyncConfigProperties model = - BinaryData - .fromString("{\"enabled\":false,\"syncIntervalInMinutes\":658652165}") - .toObject(MetadataSyncConfigProperties.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals(658652165, model.syncIntervalInMinutes()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MetadataSyncConfigProperties model = - new MetadataSyncConfigProperties().withEnabled(false).withSyncIntervalInMinutes(658652165); - model = BinaryData.fromObject(model).toObject(MetadataSyncConfigProperties.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals(658652165, model.syncIntervalInMinutes()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/OperationDisplayTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/OperationDisplayTests.java deleted file mode 100644 index 86780e9ca3322..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/OperationDisplayTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.OperationDisplay; -import org.junit.jupiter.api.Assertions; - -public final class OperationDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDisplay model = - BinaryData - .fromString( - "{\"provider\":\"vuicp\",\"operation\":\"trrmhwrb\",\"resource\":\"pyf\",\"description\":\"bhvjglr\"}") - .toObject(OperationDisplay.class); - Assertions.assertEquals("vuicp", model.provider()); - Assertions.assertEquals("trrmhwrb", model.operation()); - Assertions.assertEquals("pyf", model.resource()); - Assertions.assertEquals("bhvjglr", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = - new OperationDisplay() - .withProvider("vuicp") - .withOperation("trrmhwrb") - .withResource("pyf") - .withDescription("bhvjglr"); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - Assertions.assertEquals("vuicp", model.provider()); - Assertions.assertEquals("trrmhwrb", model.operation()); - Assertions.assertEquals("pyf", model.resource()); - Assertions.assertEquals("bhvjglr", model.description()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/OperationInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/OperationInnerTests.java deleted file mode 100644 index a6470c611dc59..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/OperationInnerTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.OperationInner; -import com.azure.resourcemanager.synapse.models.OperationDisplay; -import org.junit.jupiter.api.Assertions; - -public final class OperationInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationInner model = - BinaryData - .fromString( - "{\"name\":\"cjimryvwgcwwpbmz\",\"display\":{\"provider\":\"sydsxwefohe\",\"operation\":\"vopwndyqleallk\",\"resource\":\"tkhlowkxxpvbr\",\"description\":\"jmzsyzfh\"},\"origin\":\"lhikcyychunsj\",\"properties\":\"datajrtwsz\"}") - .toObject(OperationInner.class); - Assertions.assertEquals("cjimryvwgcwwpbmz", model.name()); - Assertions.assertEquals("sydsxwefohe", model.display().provider()); - Assertions.assertEquals("vopwndyqleallk", model.display().operation()); - Assertions.assertEquals("tkhlowkxxpvbr", model.display().resource()); - Assertions.assertEquals("jmzsyzfh", model.display().description()); - Assertions.assertEquals("lhikcyychunsj", model.origin()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationInner model = - new OperationInner() - .withName("cjimryvwgcwwpbmz") - .withDisplay( - new OperationDisplay() - .withProvider("sydsxwefohe") - .withOperation("vopwndyqleallk") - .withResource("tkhlowkxxpvbr") - .withDescription("jmzsyzfh")) - .withOrigin("lhikcyychunsj") - .withProperties("datajrtwsz"); - model = BinaryData.fromObject(model).toObject(OperationInner.class); - Assertions.assertEquals("cjimryvwgcwwpbmz", model.name()); - Assertions.assertEquals("sydsxwefohe", model.display().provider()); - Assertions.assertEquals("vopwndyqleallk", model.display().operation()); - Assertions.assertEquals("tkhlowkxxpvbr", model.display().resource()); - Assertions.assertEquals("jmzsyzfh", model.display().description()); - Assertions.assertEquals("lhikcyychunsj", model.origin()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/OperationListResultTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/OperationListResultTests.java deleted file mode 100644 index f64536b990c75..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/OperationListResultTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.OperationInner; -import com.azure.resourcemanager.synapse.models.OperationDisplay; -import com.azure.resourcemanager.synapse.models.OperationListResult; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationListResult model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"qofyuicdhzbdy\",\"display\":{\"provider\":\"gbdvibidmhmwff\",\"operation\":\"fmuvapckccr\",\"resource\":\"weyoxoy\",\"description\":\"k\"},\"origin\":\"aimmoiroqb\",\"properties\":\"datahbragapyyr\"},{\"name\":\"svbpavbopfppdbwn\",\"display\":{\"provider\":\"ahxku\",\"operation\":\"sjcaacfdmmcpugm\",\"resource\":\"qepvufhbzeh\",\"description\":\"hoqhnl\"},\"origin\":\"nbldxeaclgschori\",\"properties\":\"datarsrrmoucsofldp\"},{\"name\":\"iyfc\",\"display\":{\"provider\":\"eolhbhlvbmx\",\"operation\":\"ibsxtkcud\",\"resource\":\"sfar\",\"description\":\"iowl\"},\"origin\":\"xnq\",\"properties\":\"datawgfstmhqykizm\"}],\"nextLink\":\"saoafcluqvox\"}") - .toObject(OperationListResult.class); - Assertions.assertEquals("qofyuicdhzbdy", model.value().get(0).name()); - Assertions.assertEquals("gbdvibidmhmwff", model.value().get(0).display().provider()); - Assertions.assertEquals("fmuvapckccr", model.value().get(0).display().operation()); - Assertions.assertEquals("weyoxoy", model.value().get(0).display().resource()); - Assertions.assertEquals("k", model.value().get(0).display().description()); - Assertions.assertEquals("aimmoiroqb", model.value().get(0).origin()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationListResult model = - new OperationListResult() - .withValue( - Arrays - .asList( - new OperationInner() - .withName("qofyuicdhzbdy") - .withDisplay( - new OperationDisplay() - .withProvider("gbdvibidmhmwff") - .withOperation("fmuvapckccr") - .withResource("weyoxoy") - .withDescription("k")) - .withOrigin("aimmoiroqb") - .withProperties("datahbragapyyr"), - new OperationInner() - .withName("svbpavbopfppdbwn") - .withDisplay( - new OperationDisplay() - .withProvider("ahxku") - .withOperation("sjcaacfdmmcpugm") - .withResource("qepvufhbzeh") - .withDescription("hoqhnl")) - .withOrigin("nbldxeaclgschori") - .withProperties("datarsrrmoucsofldp"), - new OperationInner() - .withName("iyfc") - .withDisplay( - new OperationDisplay() - .withProvider("eolhbhlvbmx") - .withOperation("ibsxtkcud") - .withResource("sfar") - .withDescription("iowl")) - .withOrigin("xnq") - .withProperties("datawgfstmhqykizm"))); - model = BinaryData.fromObject(model).toObject(OperationListResult.class); - Assertions.assertEquals("qofyuicdhzbdy", model.value().get(0).name()); - Assertions.assertEquals("gbdvibidmhmwff", model.value().get(0).display().provider()); - Assertions.assertEquals("fmuvapckccr", model.value().get(0).display().operation()); - Assertions.assertEquals("weyoxoy", model.value().get(0).display().resource()); - Assertions.assertEquals("k", model.value().get(0).display().description()); - Assertions.assertEquals("aimmoiroqb", model.value().get(0).origin()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/OperationMetaLogSpecificationTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/OperationMetaLogSpecificationTests.java deleted file mode 100644 index 6f80738c025a1..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/OperationMetaLogSpecificationTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.OperationMetaLogSpecification; -import org.junit.jupiter.api.Assertions; - -public final class OperationMetaLogSpecificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationMetaLogSpecification model = - BinaryData - .fromString("{\"displayName\":\"toqcjmklja\",\"blobDuration\":\"qidtqajzyu\",\"name\":\"kudjkrlkhb\"}") - .toObject(OperationMetaLogSpecification.class); - Assertions.assertEquals("toqcjmklja", model.displayName()); - Assertions.assertEquals("qidtqajzyu", model.blobDuration()); - Assertions.assertEquals("kudjkrlkhb", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationMetaLogSpecification model = - new OperationMetaLogSpecification() - .withDisplayName("toqcjmklja") - .withBlobDuration("qidtqajzyu") - .withName("kudjkrlkhb"); - model = BinaryData.fromObject(model).toObject(OperationMetaLogSpecification.class); - Assertions.assertEquals("toqcjmklja", model.displayName()); - Assertions.assertEquals("qidtqajzyu", model.blobDuration()); - Assertions.assertEquals("kudjkrlkhb", model.name()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/OperationMetaMetricDimensionSpecificationTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/OperationMetaMetricDimensionSpecificationTests.java deleted file mode 100644 index 32b1f0378cc23..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/OperationMetaMetricDimensionSpecificationTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.OperationMetaMetricDimensionSpecification; -import org.junit.jupiter.api.Assertions; - -public final class OperationMetaMetricDimensionSpecificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationMetaMetricDimensionSpecification model = - BinaryData - .fromString("{\"displayName\":\"cpc\",\"name\":\"hurzafblj\",\"toBeExportedForShoebox\":true}") - .toObject(OperationMetaMetricDimensionSpecification.class); - Assertions.assertEquals("cpc", model.displayName()); - Assertions.assertEquals("hurzafblj", model.name()); - Assertions.assertEquals(true, model.toBeExportedForShoebox()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationMetaMetricDimensionSpecification model = - new OperationMetaMetricDimensionSpecification() - .withDisplayName("cpc") - .withName("hurzafblj") - .withToBeExportedForShoebox(true); - model = BinaryData.fromObject(model).toObject(OperationMetaMetricDimensionSpecification.class); - Assertions.assertEquals("cpc", model.displayName()); - Assertions.assertEquals("hurzafblj", model.name()); - Assertions.assertEquals(true, model.toBeExportedForShoebox()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/OperationMetaMetricSpecificationTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/OperationMetaMetricSpecificationTests.java deleted file mode 100644 index 062c0f9b76fbb..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/OperationMetaMetricSpecificationTests.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.OperationMetaMetricDimensionSpecification; -import com.azure.resourcemanager.synapse.models.OperationMetaMetricSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationMetaMetricSpecificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationMetaMetricSpecification model = - BinaryData - .fromString( - "{\"sourceMdmNamespace\":\"rfidfvzwdz\",\"displayName\":\"tymw\",\"name\":\"dkfthwxmnt\",\"aggregationType\":\"waopvkmijcmmxd\",\"displayDescription\":\"fufsrpymzi\",\"sourceMdmAccount\":\"sezcxtb\",\"enableRegionalMdmAccount\":false,\"unit\":\"yc\",\"dimensions\":[{\"displayName\":\"wmdwzjeiachboo\",\"name\":\"lnrosfqp\",\"toBeExportedForShoebox\":true},{\"displayName\":\"zzvypyqrimzinp\",\"name\":\"wjdk\",\"toBeExportedForShoebox\":true},{\"displayName\":\"od\",\"name\":\"hc\",\"toBeExportedForShoebox\":false},{\"displayName\":\"hjtckwhd\",\"name\":\"ifiyipjxsqwpgrj\",\"toBeExportedForShoebox\":true}],\"supportsInstanceLevelAggregation\":true,\"metricFilterPattern\":\"jxvsnbyxqabn\"}") - .toObject(OperationMetaMetricSpecification.class); - Assertions.assertEquals("rfidfvzwdz", model.sourceMdmNamespace()); - Assertions.assertEquals("tymw", model.displayName()); - Assertions.assertEquals("dkfthwxmnt", model.name()); - Assertions.assertEquals("waopvkmijcmmxd", model.aggregationType()); - Assertions.assertEquals("fufsrpymzi", model.displayDescription()); - Assertions.assertEquals("sezcxtb", model.sourceMdmAccount()); - Assertions.assertEquals(false, model.enableRegionalMdmAccount()); - Assertions.assertEquals("yc", model.unit()); - Assertions.assertEquals("wmdwzjeiachboo", model.dimensions().get(0).displayName()); - Assertions.assertEquals("lnrosfqp", model.dimensions().get(0).name()); - Assertions.assertEquals(true, model.dimensions().get(0).toBeExportedForShoebox()); - Assertions.assertEquals(true, model.supportsInstanceLevelAggregation()); - Assertions.assertEquals("jxvsnbyxqabn", model.metricFilterPattern()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationMetaMetricSpecification model = - new OperationMetaMetricSpecification() - .withSourceMdmNamespace("rfidfvzwdz") - .withDisplayName("tymw") - .withName("dkfthwxmnt") - .withAggregationType("waopvkmijcmmxd") - .withDisplayDescription("fufsrpymzi") - .withSourceMdmAccount("sezcxtb") - .withEnableRegionalMdmAccount(false) - .withUnit("yc") - .withDimensions( - Arrays - .asList( - new OperationMetaMetricDimensionSpecification() - .withDisplayName("wmdwzjeiachboo") - .withName("lnrosfqp") - .withToBeExportedForShoebox(true), - new OperationMetaMetricDimensionSpecification() - .withDisplayName("zzvypyqrimzinp") - .withName("wjdk") - .withToBeExportedForShoebox(true), - new OperationMetaMetricDimensionSpecification() - .withDisplayName("od") - .withName("hc") - .withToBeExportedForShoebox(false), - new OperationMetaMetricDimensionSpecification() - .withDisplayName("hjtckwhd") - .withName("ifiyipjxsqwpgrj") - .withToBeExportedForShoebox(true))) - .withSupportsInstanceLevelAggregation(true) - .withMetricFilterPattern("jxvsnbyxqabn"); - model = BinaryData.fromObject(model).toObject(OperationMetaMetricSpecification.class); - Assertions.assertEquals("rfidfvzwdz", model.sourceMdmNamespace()); - Assertions.assertEquals("tymw", model.displayName()); - Assertions.assertEquals("dkfthwxmnt", model.name()); - Assertions.assertEquals("waopvkmijcmmxd", model.aggregationType()); - Assertions.assertEquals("fufsrpymzi", model.displayDescription()); - Assertions.assertEquals("sezcxtb", model.sourceMdmAccount()); - Assertions.assertEquals(false, model.enableRegionalMdmAccount()); - Assertions.assertEquals("yc", model.unit()); - Assertions.assertEquals("wmdwzjeiachboo", model.dimensions().get(0).displayName()); - Assertions.assertEquals("lnrosfqp", model.dimensions().get(0).name()); - Assertions.assertEquals(true, model.dimensions().get(0).toBeExportedForShoebox()); - Assertions.assertEquals(true, model.supportsInstanceLevelAggregation()); - Assertions.assertEquals("jxvsnbyxqabn", model.metricFilterPattern()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/OperationMetaPropertyInfoTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/OperationMetaPropertyInfoTests.java deleted file mode 100644 index 769c4209cca3e..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/OperationMetaPropertyInfoTests.java +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.OperationMetaPropertyInfo; -import com.azure.resourcemanager.synapse.models.OperationMetaLogSpecification; -import com.azure.resourcemanager.synapse.models.OperationMetaMetricSpecification; -import com.azure.resourcemanager.synapse.models.OperationMetaServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationMetaPropertyInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationMetaPropertyInfo model = - BinaryData - .fromString( - "{\"serviceSpecification\":{\"metricSpecifications\":[{\"sourceMdmNamespace\":\"msbzjhcrz\",\"displayName\":\"dphlxaolt\",\"name\":\"trg\",\"aggregationType\":\"bpf\",\"displayDescription\":\"s\",\"sourceMdmAccount\":\"zgvfcjrwz\",\"enableRegionalMdmAccount\":true,\"unit\":\"tfell\",\"dimensions\":[],\"supportsInstanceLevelAggregation\":true,\"metricFilterPattern\":\"tonpe\"},{\"sourceMdmNamespace\":\"pjkjlxofpdv\",\"displayName\":\"fxxypininmayhuy\",\"name\":\"kpode\",\"aggregationType\":\"oginuvamiheognar\",\"displayDescription\":\"xth\",\"sourceMdmAccount\":\"tusivyevcciqihn\",\"enableRegionalMdmAccount\":false,\"unit\":\"bwjzr\",\"dimensions\":[],\"supportsInstanceLevelAggregation\":false,\"metricFilterPattern\":\"gispemvtzfkufubl\"}],\"logSpecifications\":[{\"displayName\":\"qeof\",\"blobDuration\":\"e\",\"name\":\"hqjbasvmsmj\"},{\"displayName\":\"lngsntnbybkzgcwr\",\"blobDuration\":\"lxxwrljdouskc\",\"name\":\"kocrcjdkwtnhx\"}]}}") - .toObject(OperationMetaPropertyInfo.class); - Assertions - .assertEquals("msbzjhcrz", model.serviceSpecification().metricSpecifications().get(0).sourceMdmNamespace()); - Assertions.assertEquals("dphlxaolt", model.serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions.assertEquals("trg", model.serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("bpf", model.serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("s", model.serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions - .assertEquals("zgvfcjrwz", model.serviceSpecification().metricSpecifications().get(0).sourceMdmAccount()); - Assertions - .assertEquals(true, model.serviceSpecification().metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("tfell", model.serviceSpecification().metricSpecifications().get(0).unit()); - Assertions - .assertEquals( - true, model.serviceSpecification().metricSpecifications().get(0).supportsInstanceLevelAggregation()); - Assertions - .assertEquals("tonpe", model.serviceSpecification().metricSpecifications().get(0).metricFilterPattern()); - Assertions.assertEquals("qeof", model.serviceSpecification().logSpecifications().get(0).displayName()); - Assertions.assertEquals("e", model.serviceSpecification().logSpecifications().get(0).blobDuration()); - Assertions.assertEquals("hqjbasvmsmj", model.serviceSpecification().logSpecifications().get(0).name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationMetaPropertyInfo model = - new OperationMetaPropertyInfo() - .withServiceSpecification( - new OperationMetaServiceSpecification() - .withMetricSpecifications( - Arrays - .asList( - new OperationMetaMetricSpecification() - .withSourceMdmNamespace("msbzjhcrz") - .withDisplayName("dphlxaolt") - .withName("trg") - .withAggregationType("bpf") - .withDisplayDescription("s") - .withSourceMdmAccount("zgvfcjrwz") - .withEnableRegionalMdmAccount(true) - .withUnit("tfell") - .withDimensions(Arrays.asList()) - .withSupportsInstanceLevelAggregation(true) - .withMetricFilterPattern("tonpe"), - new OperationMetaMetricSpecification() - .withSourceMdmNamespace("pjkjlxofpdv") - .withDisplayName("fxxypininmayhuy") - .withName("kpode") - .withAggregationType("oginuvamiheognar") - .withDisplayDescription("xth") - .withSourceMdmAccount("tusivyevcciqihn") - .withEnableRegionalMdmAccount(false) - .withUnit("bwjzr") - .withDimensions(Arrays.asList()) - .withSupportsInstanceLevelAggregation(false) - .withMetricFilterPattern("gispemvtzfkufubl"))) - .withLogSpecifications( - Arrays - .asList( - new OperationMetaLogSpecification() - .withDisplayName("qeof") - .withBlobDuration("e") - .withName("hqjbasvmsmj"), - new OperationMetaLogSpecification() - .withDisplayName("lngsntnbybkzgcwr") - .withBlobDuration("lxxwrljdouskc") - .withName("kocrcjdkwtnhx")))); - model = BinaryData.fromObject(model).toObject(OperationMetaPropertyInfo.class); - Assertions - .assertEquals("msbzjhcrz", model.serviceSpecification().metricSpecifications().get(0).sourceMdmNamespace()); - Assertions.assertEquals("dphlxaolt", model.serviceSpecification().metricSpecifications().get(0).displayName()); - Assertions.assertEquals("trg", model.serviceSpecification().metricSpecifications().get(0).name()); - Assertions.assertEquals("bpf", model.serviceSpecification().metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("s", model.serviceSpecification().metricSpecifications().get(0).displayDescription()); - Assertions - .assertEquals("zgvfcjrwz", model.serviceSpecification().metricSpecifications().get(0).sourceMdmAccount()); - Assertions - .assertEquals(true, model.serviceSpecification().metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("tfell", model.serviceSpecification().metricSpecifications().get(0).unit()); - Assertions - .assertEquals( - true, model.serviceSpecification().metricSpecifications().get(0).supportsInstanceLevelAggregation()); - Assertions - .assertEquals("tonpe", model.serviceSpecification().metricSpecifications().get(0).metricFilterPattern()); - Assertions.assertEquals("qeof", model.serviceSpecification().logSpecifications().get(0).displayName()); - Assertions.assertEquals("e", model.serviceSpecification().logSpecifications().get(0).blobDuration()); - Assertions.assertEquals("hqjbasvmsmj", model.serviceSpecification().logSpecifications().get(0).name()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/OperationMetaServiceSpecificationTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/OperationMetaServiceSpecificationTests.java deleted file mode 100644 index 43ae773bd098b..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/OperationMetaServiceSpecificationTests.java +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.OperationMetaLogSpecification; -import com.azure.resourcemanager.synapse.models.OperationMetaMetricSpecification; -import com.azure.resourcemanager.synapse.models.OperationMetaServiceSpecification; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationMetaServiceSpecificationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationMetaServiceSpecification model = - BinaryData - .fromString( - "{\"metricSpecifications\":[{\"sourceMdmNamespace\":\"iksqr\",\"displayName\":\"ssainqpjwnzll\",\"name\":\"mppeebvmgxs\",\"aggregationType\":\"kyqduujit\",\"displayDescription\":\"czdzev\",\"sourceMdmAccount\":\"hkr\",\"enableRegionalMdmAccount\":false,\"unit\":\"ppdsbdkvwrwj\",\"dimensions\":[],\"supportsInstanceLevelAggregation\":true,\"metricFilterPattern\":\"utjeltmrldhugj\"},{\"sourceMdmNamespace\":\"datqxhocdgeabl\",\"displayName\":\"huticndvkao\",\"name\":\"yiftyhxhuro\",\"aggregationType\":\"tyxolniwpwc\",\"displayDescription\":\"jfkgiawxk\",\"sourceMdmAccount\":\"ypl\",\"enableRegionalMdmAccount\":false,\"unit\":\"asy\",\"dimensions\":[],\"supportsInstanceLevelAggregation\":false,\"metricFilterPattern\":\"sgcbac\"},{\"sourceMdmNamespace\":\"ejk\",\"displayName\":\"ynqgoulzndlikwyq\",\"name\":\"fgibmadgakeq\",\"aggregationType\":\"xybz\",\"displayDescription\":\"e\",\"sourceMdmAccount\":\"ytb\",\"enableRegionalMdmAccount\":false,\"unit\":\"ouf\",\"dimensions\":[],\"supportsInstanceLevelAggregation\":false,\"metricFilterPattern\":\"smodmgloug\"},{\"sourceMdmNamespace\":\"kwtmutduqktapspw\",\"displayName\":\"uertumk\",\"name\":\"svqwhbmdgbbjfd\",\"aggregationType\":\"mbmbexppbh\",\"displayDescription\":\"qrolfpf\",\"sourceMdmAccount\":\"algbquxigjyjg\",\"enableRegionalMdmAccount\":true,\"unit\":\"yfhrtxilnerkujy\",\"dimensions\":[],\"supportsInstanceLevelAggregation\":false,\"metricFilterPattern\":\"vfqawrlyxwjkcpr\"}],\"logSpecifications\":[{\"displayName\":\"xgjvtbv\",\"blobDuration\":\"sszdnru\",\"name\":\"guhmuouqfpr\"},{\"displayName\":\"wbnguitnwui\",\"blobDuration\":\"a\",\"name\":\"ufizuckyf\"}]}") - .toObject(OperationMetaServiceSpecification.class); - Assertions.assertEquals("iksqr", model.metricSpecifications().get(0).sourceMdmNamespace()); - Assertions.assertEquals("ssainqpjwnzll", model.metricSpecifications().get(0).displayName()); - Assertions.assertEquals("mppeebvmgxs", model.metricSpecifications().get(0).name()); - Assertions.assertEquals("kyqduujit", model.metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("czdzev", model.metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("hkr", model.metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals(false, model.metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("ppdsbdkvwrwj", model.metricSpecifications().get(0).unit()); - Assertions.assertEquals(true, model.metricSpecifications().get(0).supportsInstanceLevelAggregation()); - Assertions.assertEquals("utjeltmrldhugj", model.metricSpecifications().get(0).metricFilterPattern()); - Assertions.assertEquals("xgjvtbv", model.logSpecifications().get(0).displayName()); - Assertions.assertEquals("sszdnru", model.logSpecifications().get(0).blobDuration()); - Assertions.assertEquals("guhmuouqfpr", model.logSpecifications().get(0).name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationMetaServiceSpecification model = - new OperationMetaServiceSpecification() - .withMetricSpecifications( - Arrays - .asList( - new OperationMetaMetricSpecification() - .withSourceMdmNamespace("iksqr") - .withDisplayName("ssainqpjwnzll") - .withName("mppeebvmgxs") - .withAggregationType("kyqduujit") - .withDisplayDescription("czdzev") - .withSourceMdmAccount("hkr") - .withEnableRegionalMdmAccount(false) - .withUnit("ppdsbdkvwrwj") - .withDimensions(Arrays.asList()) - .withSupportsInstanceLevelAggregation(true) - .withMetricFilterPattern("utjeltmrldhugj"), - new OperationMetaMetricSpecification() - .withSourceMdmNamespace("datqxhocdgeabl") - .withDisplayName("huticndvkao") - .withName("yiftyhxhuro") - .withAggregationType("tyxolniwpwc") - .withDisplayDescription("jfkgiawxk") - .withSourceMdmAccount("ypl") - .withEnableRegionalMdmAccount(false) - .withUnit("asy") - .withDimensions(Arrays.asList()) - .withSupportsInstanceLevelAggregation(false) - .withMetricFilterPattern("sgcbac"), - new OperationMetaMetricSpecification() - .withSourceMdmNamespace("ejk") - .withDisplayName("ynqgoulzndlikwyq") - .withName("fgibmadgakeq") - .withAggregationType("xybz") - .withDisplayDescription("e") - .withSourceMdmAccount("ytb") - .withEnableRegionalMdmAccount(false) - .withUnit("ouf") - .withDimensions(Arrays.asList()) - .withSupportsInstanceLevelAggregation(false) - .withMetricFilterPattern("smodmgloug"), - new OperationMetaMetricSpecification() - .withSourceMdmNamespace("kwtmutduqktapspw") - .withDisplayName("uertumk") - .withName("svqwhbmdgbbjfd") - .withAggregationType("mbmbexppbh") - .withDisplayDescription("qrolfpf") - .withSourceMdmAccount("algbquxigjyjg") - .withEnableRegionalMdmAccount(true) - .withUnit("yfhrtxilnerkujy") - .withDimensions(Arrays.asList()) - .withSupportsInstanceLevelAggregation(false) - .withMetricFilterPattern("vfqawrlyxwjkcpr"))) - .withLogSpecifications( - Arrays - .asList( - new OperationMetaLogSpecification() - .withDisplayName("xgjvtbv") - .withBlobDuration("sszdnru") - .withName("guhmuouqfpr"), - new OperationMetaLogSpecification() - .withDisplayName("wbnguitnwui") - .withBlobDuration("a") - .withName("ufizuckyf"))); - model = BinaryData.fromObject(model).toObject(OperationMetaServiceSpecification.class); - Assertions.assertEquals("iksqr", model.metricSpecifications().get(0).sourceMdmNamespace()); - Assertions.assertEquals("ssainqpjwnzll", model.metricSpecifications().get(0).displayName()); - Assertions.assertEquals("mppeebvmgxs", model.metricSpecifications().get(0).name()); - Assertions.assertEquals("kyqduujit", model.metricSpecifications().get(0).aggregationType()); - Assertions.assertEquals("czdzev", model.metricSpecifications().get(0).displayDescription()); - Assertions.assertEquals("hkr", model.metricSpecifications().get(0).sourceMdmAccount()); - Assertions.assertEquals(false, model.metricSpecifications().get(0).enableRegionalMdmAccount()); - Assertions.assertEquals("ppdsbdkvwrwj", model.metricSpecifications().get(0).unit()); - Assertions.assertEquals(true, model.metricSpecifications().get(0).supportsInstanceLevelAggregation()); - Assertions.assertEquals("utjeltmrldhugj", model.metricSpecifications().get(0).metricFilterPattern()); - Assertions.assertEquals("xgjvtbv", model.logSpecifications().get(0).displayName()); - Assertions.assertEquals("sszdnru", model.logSpecifications().get(0).blobDuration()); - Assertions.assertEquals("guhmuouqfpr", model.logSpecifications().get(0).name()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/OperationResourceInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/OperationResourceInnerTests.java deleted file mode 100644 index d4c8d3753bff1..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/OperationResourceInnerTests.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.OperationResourceInner; -import com.azure.resourcemanager.synapse.models.OperationStatus; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class OperationResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationResourceInner model = - BinaryData - .fromString( - "{\"id\":\"fepgzgq\",\"name\":\"zloc\",\"status\":\"InProgress\",\"properties\":\"dataaierhhb\",\"startTime\":\"2021-09-10T20:40:36Z\",\"endTime\":\"2021-07-20T05:11Z\",\"percentComplete\":4.375696}") - .toObject(OperationResourceInner.class); - Assertions.assertEquals("fepgzgq", model.id()); - Assertions.assertEquals("zloc", model.name()); - Assertions.assertEquals(OperationStatus.IN_PROGRESS, model.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-10T20:40:36Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-20T05:11Z"), model.endTime()); - Assertions.assertEquals(4.375696F, model.percentComplete()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationResourceInner model = - new OperationResourceInner() - .withId("fepgzgq") - .withName("zloc") - .withStatus(OperationStatus.IN_PROGRESS) - .withProperties("dataaierhhb") - .withStartTime(OffsetDateTime.parse("2021-09-10T20:40:36Z")) - .withEndTime(OffsetDateTime.parse("2021-07-20T05:11Z")) - .withPercentComplete(4.375696F); - model = BinaryData.fromObject(model).toObject(OperationResourceInner.class); - Assertions.assertEquals("fepgzgq", model.id()); - Assertions.assertEquals("zloc", model.name()); - Assertions.assertEquals(OperationStatus.IN_PROGRESS, model.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-10T20:40:36Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-20T05:11Z"), model.endTime()); - Assertions.assertEquals(4.375696F, model.percentComplete()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/OperationsCheckNameAvailabilityWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/OperationsCheckNameAvailabilityWithResponseMockTests.java deleted file mode 100644 index 5d44faa446ad8..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/OperationsCheckNameAvailabilityWithResponseMockTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.CheckNameAvailabilityRequest; -import com.azure.resourcemanager.synapse.models.CheckNameAvailabilityResponse; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class OperationsCheckNameAvailabilityWithResponseMockTests { - @Test - public void testCheckNameAvailabilityWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"message\":\"zuodacpun\",\"available\":true,\"reason\":\"pdjxqeskoynu\",\"name\":\"lpckaewsedves\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CheckNameAvailabilityResponse response = - manager - .operations() - .checkNameAvailabilityWithResponse( - new CheckNameAvailabilityRequest().withName("jclykcg").withType("rpjl"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("zuodacpun", response.message()); - Assertions.assertEquals(true, response.available()); - Assertions.assertEquals("pdjxqeskoynu", response.reason()); - Assertions.assertEquals("lpckaewsedves", response.name()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/OperationsGetAzureAsyncHeaderResultWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/OperationsGetAzureAsyncHeaderResultWithResponseMockTests.java deleted file mode 100644 index 8d4bbaaa016b9..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/OperationsGetAzureAsyncHeaderResultWithResponseMockTests.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.OperationResource; -import com.azure.resourcemanager.synapse.models.OperationStatus; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class OperationsGetAzureAsyncHeaderResultWithResponseMockTests { - @Test - public void testGetAzureAsyncHeaderResultWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"id\":\"cbbprtugav\",\"name\":\"bcyksivmfogd\",\"status\":\"Failed\",\"properties\":\"datacmkrftsjcwjj\",\"startTime\":\"2021-06-09T20:33:36Z\",\"endTime\":\"2021-03-04T07:58:33Z\",\"percentComplete\":89.56149}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - OperationResource response = - manager - .operations() - .getAzureAsyncHeaderResultWithResponse( - "pgeumilh", "uitrdexyiono", "ninbdbzsxcwqqrs", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("cbbprtugav", response.id()); - Assertions.assertEquals("bcyksivmfogd", response.name()); - Assertions.assertEquals(OperationStatus.FAILED, response.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-09T20:33:36Z"), response.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-04T07:58:33Z"), response.endTime()); - Assertions.assertEquals(89.56149F, response.percentComplete()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/OperationsGetLocationHeaderResultWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/OperationsGetLocationHeaderResultWithResponseMockTests.java deleted file mode 100644 index 8e41eb94085b5..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/OperationsGetLocationHeaderResultWithResponseMockTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class OperationsGetLocationHeaderResultWithResponseMockTests { - @Test - public void testGetLocationHeaderResultWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .operations() - .getLocationHeaderResultWithResponse( - "iukvzwydwt", "haokgkskjiv", "sshajqfukpee", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/OperationsListWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/OperationsListWithResponseMockTests.java deleted file mode 100644 index fa8f1d2948d40..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/OperationsListWithResponseMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.AvailableRpOperation; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.List; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class OperationsListWithResponseMockTests { - @Test - public void testListWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "[{\"display\":{\"description\":\"gqphrgfnzhctmjts\",\"resource\":\"pbcbcpzar\",\"provider\":\"eqacd\",\"operation\":\"tz\"},\"isDataAction\":\"ypefcpczshnuqnda\",\"name\":\"upfkhuytuszxhmtv\",\"properties\":{},\"origin\":\"w\"}]"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - List response = - manager.operations().listWithResponse(com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("gqphrgfnzhctmjts", response.get(0).display().description()); - Assertions.assertEquals("pbcbcpzar", response.get(0).display().resource()); - Assertions.assertEquals("eqacd", response.get(0).display().provider()); - Assertions.assertEquals("tz", response.get(0).display().operation()); - Assertions.assertEquals("ypefcpczshnuqnda", response.get(0).isDataAction()); - Assertions.assertEquals("upfkhuytuszxhmtv", response.get(0).name()); - Assertions.assertEquals("w", response.get(0).origin()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/OptimizedAutoscaleTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/OptimizedAutoscaleTests.java deleted file mode 100644 index c7ee024e53ba4..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/OptimizedAutoscaleTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.OptimizedAutoscale; -import org.junit.jupiter.api.Assertions; - -public final class OptimizedAutoscaleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OptimizedAutoscale model = - BinaryData - .fromString("{\"version\":1324330930,\"isEnabled\":true,\"minimum\":1273890373,\"maximum\":1963006150}") - .toObject(OptimizedAutoscale.class); - Assertions.assertEquals(1324330930, model.version()); - Assertions.assertEquals(true, model.isEnabled()); - Assertions.assertEquals(1273890373, model.minimum()); - Assertions.assertEquals(1963006150, model.maximum()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OptimizedAutoscale model = - new OptimizedAutoscale() - .withVersion(1324330930) - .withIsEnabled(true) - .withMinimum(1273890373) - .withMaximum(1963006150); - model = BinaryData.fromObject(model).toObject(OptimizedAutoscale.class); - Assertions.assertEquals(1324330930, model.version()); - Assertions.assertEquals(true, model.isEnabled()); - Assertions.assertEquals(1273890373, model.minimum()); - Assertions.assertEquals(1963006150, model.maximum()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionForPrivateLinkHubBasicAutoGeneratedTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionForPrivateLinkHubBasicAutoGeneratedTests.java deleted file mode 100644 index da07253533256..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionForPrivateLinkHubBasicAutoGeneratedTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.PrivateEndpointConnectionProperties; -import com.azure.resourcemanager.synapse.models.PrivateEndpoint; -import com.azure.resourcemanager.synapse.models.PrivateEndpointConnectionForPrivateLinkHubBasicAutoGenerated; -import com.azure.resourcemanager.synapse.models.PrivateLinkServiceConnectionState; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionForPrivateLinkHubBasicAutoGeneratedTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionForPrivateLinkHubBasicAutoGenerated model = - BinaryData - .fromString( - "{\"id\":\"wankixzbi\",\"properties\":{\"privateEndpoint\":{\"id\":\"uttmrywnuzoqft\"},\"privateLinkServiceConnectionState\":{\"status\":\"zrnkcqvyxlwh\",\"description\":\"sicohoqqnwvlry\",\"actionsRequired\":\"w\"},\"provisioningState\":\"eun\"}}") - .toObject(PrivateEndpointConnectionForPrivateLinkHubBasicAutoGenerated.class); - Assertions.assertEquals("wankixzbi", model.id()); - Assertions.assertEquals("zrnkcqvyxlwh", model.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("sicohoqqnwvlry", model.properties().privateLinkServiceConnectionState().description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionForPrivateLinkHubBasicAutoGenerated model = - new PrivateEndpointConnectionForPrivateLinkHubBasicAutoGenerated() - .withId("wankixzbi") - .withProperties( - new PrivateEndpointConnectionProperties() - .withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState() - .withStatus("zrnkcqvyxlwh") - .withDescription("sicohoqqnwvlry"))); - model = - BinaryData.fromObject(model).toObject(PrivateEndpointConnectionForPrivateLinkHubBasicAutoGenerated.class); - Assertions.assertEquals("wankixzbi", model.id()); - Assertions.assertEquals("zrnkcqvyxlwh", model.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("sicohoqqnwvlry", model.properties().privateLinkServiceConnectionState().description()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionForPrivateLinkHubBasicTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionForPrivateLinkHubBasicTests.java deleted file mode 100644 index f4b647b8bcbe2..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionForPrivateLinkHubBasicTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.PrivateEndpoint; -import com.azure.resourcemanager.synapse.models.PrivateEndpointConnectionForPrivateLinkHubBasic; -import com.azure.resourcemanager.synapse.models.PrivateLinkServiceConnectionState; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionForPrivateLinkHubBasicTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionForPrivateLinkHubBasic model = - BinaryData - .fromString( - "{\"id\":\"uwiqzb\",\"properties\":{\"privateEndpoint\":{\"id\":\"ovm\"},\"privateLinkServiceConnectionState\":{\"status\":\"acspkwl\",\"description\":\"dobpxjmflbvvn\",\"actionsRequired\":\"rkcciwwzjuqk\"},\"provisioningState\":\"sa\"}}") - .toObject(PrivateEndpointConnectionForPrivateLinkHubBasic.class); - Assertions.assertEquals("acspkwl", model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("dobpxjmflbvvn", model.privateLinkServiceConnectionState().description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionForPrivateLinkHubBasic model = - new PrivateEndpointConnectionForPrivateLinkHubBasic() - .withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus("acspkwl").withDescription("dobpxjmflbvvn")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionForPrivateLinkHubBasic.class); - Assertions.assertEquals("acspkwl", model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("dobpxjmflbvvn", model.privateLinkServiceConnectionState().description()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionForPrivateLinkHubInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionForPrivateLinkHubInnerTests.java deleted file mode 100644 index 8cdf0e7a2d613..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionForPrivateLinkHubInnerTests.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.PrivateEndpointConnectionForPrivateLinkHubInner; -import com.azure.resourcemanager.synapse.fluent.models.PrivateEndpointConnectionProperties; -import com.azure.resourcemanager.synapse.models.PrivateEndpoint; -import com.azure.resourcemanager.synapse.models.PrivateLinkServiceConnectionState; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionForPrivateLinkHubInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionForPrivateLinkHubInner model = - BinaryData - .fromString( - "{\"name\":\"ipazyxoegukgjnpi\",\"type\":\"gygev\",\"id\":\"ntypmrbpizcdrqj\",\"properties\":{\"privateEndpoint\":{\"id\":\"dnfyhxdeoejzicwi\"},\"privateLinkServiceConnectionState\":{\"status\":\"ttgzfbis\",\"description\":\"bkh\",\"actionsRequired\":\"deyeamdphagalpbu\"},\"provisioningState\":\"gipwhonowkg\"}}") - .toObject(PrivateEndpointConnectionForPrivateLinkHubInner.class); - Assertions.assertEquals("ntypmrbpizcdrqj", model.id()); - Assertions.assertEquals("ttgzfbis", model.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("bkh", model.properties().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("ipazyxoegukgjnpi", model.name()); - Assertions.assertEquals("gygev", model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionForPrivateLinkHubInner model = - new PrivateEndpointConnectionForPrivateLinkHubInner() - .withId("ntypmrbpizcdrqj") - .withProperties( - new PrivateEndpointConnectionProperties() - .withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus("ttgzfbis").withDescription("bkh"))) - .withName("ipazyxoegukgjnpi") - .withType("gygev"); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionForPrivateLinkHubInner.class); - Assertions.assertEquals("ntypmrbpizcdrqj", model.id()); - Assertions.assertEquals("ttgzfbis", model.properties().privateLinkServiceConnectionState().status()); - Assertions.assertEquals("bkh", model.properties().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("ipazyxoegukgjnpi", model.name()); - Assertions.assertEquals("gygev", model.type()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponseTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponseTests.java deleted file mode 100644 index 8f27f695a0fe3..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponseTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.PrivateEndpointConnectionForPrivateLinkHubInner; -import com.azure.resourcemanager.synapse.fluent.models.PrivateEndpointConnectionProperties; -import com.azure.resourcemanager.synapse.models.PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"yvshxmz\",\"type\":\"bzoggigrx\",\"id\":\"ur\",\"properties\":{\"provisioningState\":\"nspydptkoenkoukn\"}}],\"nextLink\":\"dwtiukbldngkp\"}") - .toObject(PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse.class); - Assertions.assertEquals("ur", model.value().get(0).id()); - Assertions.assertEquals("yvshxmz", model.value().get(0).name()); - Assertions.assertEquals("bzoggigrx", model.value().get(0).type()); - Assertions.assertEquals("dwtiukbldngkp", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse model = - new PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse() - .withValue( - Arrays - .asList( - new PrivateEndpointConnectionForPrivateLinkHubInner() - .withId("ur") - .withProperties(new PrivateEndpointConnectionProperties()) - .withName("yvshxmz") - .withType("bzoggigrx"))) - .withNextLink("dwtiukbldngkp"); - model = - BinaryData - .fromObject(model) - .toObject(PrivateEndpointConnectionForPrivateLinkHubResourceCollectionResponse.class); - Assertions.assertEquals("ur", model.value().get(0).id()); - Assertions.assertEquals("yvshxmz", model.value().get(0).name()); - Assertions.assertEquals("bzoggigrx", model.value().get(0).type()); - Assertions.assertEquals("dwtiukbldngkp", model.nextLink()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionInnerTests.java deleted file mode 100644 index a7253c2356b76..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionInnerTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.PrivateEndpointConnectionInner; -import com.azure.resourcemanager.synapse.models.PrivateEndpoint; -import com.azure.resourcemanager.synapse.models.PrivateLinkServiceConnectionState; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionInner model = - BinaryData - .fromString( - "{\"properties\":{\"privateEndpoint\":{\"id\":\"aodxo\"},\"privateLinkServiceConnectionState\":{\"status\":\"dxkqpx\",\"description\":\"ajionpimexgstxg\",\"actionsRequired\":\"odgmaajrmvdjwz\"},\"provisioningState\":\"ovmclwhijcoejct\"},\"id\":\"zaqsqsycbkbfk\",\"name\":\"ukdkexxppofmxa\",\"type\":\"c\"}") - .toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals("dxkqpx", model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("ajionpimexgstxg", model.privateLinkServiceConnectionState().description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionInner model = - new PrivateEndpointConnectionInner() - .withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus("dxkqpx").withDescription("ajionpimexgstxg")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionInner.class); - Assertions.assertEquals("dxkqpx", model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("ajionpimexgstxg", model.privateLinkServiceConnectionState().description()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionListTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionListTests.java deleted file mode 100644 index 0685630af4b04..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionListTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.PrivateEndpointConnectionList; - -public final class PrivateEndpointConnectionListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionList model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"khixuigdtopbo\"},\"id\":\"joghmewuama\",\"name\":\"hrzayvvtpgvdf\",\"type\":\"iotkftutqxl\"},{\"properties\":{\"provisioningState\":\"fgugnxkrxdqmid\"},\"id\":\"thz\",\"name\":\"vqdra\",\"type\":\"hjybigehoqfbo\"}],\"nextLink\":\"kanyktzlcuiywg\"}") - .toObject(PrivateEndpointConnectionList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionList model = new PrivateEndpointConnectionList(); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionList.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionPropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionPropertiesTests.java deleted file mode 100644 index 62ddbc20c3180..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionPropertiesTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.PrivateEndpointConnectionProperties; -import com.azure.resourcemanager.synapse.models.PrivateEndpoint; -import com.azure.resourcemanager.synapse.models.PrivateLinkServiceConnectionState; -import org.junit.jupiter.api.Assertions; - -public final class PrivateEndpointConnectionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpointConnectionProperties model = - BinaryData - .fromString( - "{\"privateEndpoint\":{\"id\":\"gddtocj\"},\"privateLinkServiceConnectionState\":{\"status\":\"vpmouexhdzxib\",\"description\":\"ojnxqbzvdd\",\"actionsRequired\":\"wndeicbtwnp\"},\"provisioningState\":\"oqvuhr\"}") - .toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals("vpmouexhdzxib", model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("ojnxqbzvdd", model.privateLinkServiceConnectionState().description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpointConnectionProperties model = - new PrivateEndpointConnectionProperties() - .withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus("vpmouexhdzxib").withDescription("ojnxqbzvdd")); - model = BinaryData.fromObject(model).toObject(PrivateEndpointConnectionProperties.class); - Assertions.assertEquals("vpmouexhdzxib", model.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("ojnxqbzvdd", model.privateLinkServiceConnectionState().description()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsCreateMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsCreateMockTests.java deleted file mode 100644 index f3a1549a624c5..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsCreateMockTests.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.PrivateEndpoint; -import com.azure.resourcemanager.synapse.models.PrivateEndpointConnection; -import com.azure.resourcemanager.synapse.models.PrivateLinkServiceConnectionState; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsCreateMockTests { - @Test - public void testCreate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"privateEndpoint\":{\"id\":\"vjrktpgaeukyawoh\"},\"privateLinkServiceConnectionState\":{\"status\":\"hqnucs\",\"description\":\"hsidsjtdlpbnin\",\"actionsRequired\":\"azlsvbzfcpuo\"},\"provisioningState\":\"Succeeded\"},\"id\":\"ekrdr\",\"name\":\"nxolriyehqb\",\"type\":\"iv\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateEndpointConnection response = - manager - .privateEndpointConnections() - .define("jhffbxrqrkij") - .withExistingWorkspace("kxiuxqggvqr", "hyhlwcjsqg") - .withPrivateEndpoint(new PrivateEndpoint()) - .withPrivateLinkServiceConnectionState( - new PrivateLinkServiceConnectionState().withStatus("swenawwa").withDescription("cleqioulndhzyo")) - .create(); - - Assertions.assertEquals("hqnucs", response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("hsidsjtdlpbnin", response.privateLinkServiceConnectionState().description()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsDeleteMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsDeleteMockTests.java deleted file mode 100644 index 7439efc3a82b0..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsDeleteMockTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.OperationResource; -import com.azure.resourcemanager.synapse.models.OperationStatus; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"id\":\"qagynoipr\",\"name\":\"calincryqxz\",\"status\":\"InProgress\",\"properties\":\"dataibmq\",\"startTime\":\"2021-05-30T20:40:28Z\",\"endTime\":\"2021-11-06T06:39:58Z\",\"percentComplete\":94.34178}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - OperationResource response = - manager - .privateEndpointConnections() - .delete("fcmfcn", "jajqmatxjt", "elnzqgxxgfbbmt", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("qagynoipr", response.id()); - Assertions.assertEquals("calincryqxz", response.name()); - Assertions.assertEquals(OperationStatus.IN_PROGRESS, response.status()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-30T20:40:28Z"), response.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-06T06:39:58Z"), response.endTime()); - Assertions.assertEquals(94.34178F, response.percentComplete()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java deleted file mode 100644 index 774b37d165796..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsGetWithResponseMockTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.PrivateEndpointConnection; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"privateEndpoint\":{\"id\":\"xvjabjq\"},\"privateLinkServiceConnectionState\":{\"status\":\"uyvymcnu\",\"description\":\"doabhj\",\"actionsRequired\":\"xqweu\"},\"provisioningState\":\"mp\"},\"id\":\"ksmitnsqxtlt\",\"name\":\"lkrdpqgfhy\",\"type\":\"frakkldgrc\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateEndpointConnection response = - manager - .privateEndpointConnections() - .getWithResponse("ukosrn", "wnvz", "lnk", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("uyvymcnu", response.privateLinkServiceConnectionState().status()); - Assertions.assertEquals("doabhj", response.privateLinkServiceConnectionState().description()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsListMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsListMockTests.java deleted file mode 100644 index 732812d7a7171..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsListMockTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.PrivateEndpointConnection; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"privateEndpoint\":{\"id\":\"k\"},\"privateLinkServiceConnectionState\":{\"status\":\"yao\",\"description\":\"zowpuohdkcprgukx\",\"actionsRequired\":\"tiochlutixmqr\"},\"provisioningState\":\"jizcbfzmcrunfhiu\"},\"id\":\"nmfbc\",\"name\":\"aqktkrumzu\",\"type\":\"dkyzbfvxov\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.privateEndpointConnections().list("qguhfupetasvvo", "sbpkf", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("yao", response.iterator().next().privateLinkServiceConnectionState().status()); - Assertions - .assertEquals( - "zowpuohdkcprgukx", response.iterator().next().privateLinkServiceConnectionState().description()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsPrivateLinkHubsGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsPrivateLinkHubsGetWithResponseMockTests.java deleted file mode 100644 index a758e168d8a5d..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsPrivateLinkHubsGetWithResponseMockTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.PrivateEndpointConnectionForPrivateLinkHub; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsPrivateLinkHubsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"name\":\"wnbaf\",\"type\":\"to\",\"id\":\"haquvwsxbgnvk\",\"properties\":{\"privateEndpoint\":{\"id\":\"choadhrsxqv\"},\"privateLinkServiceConnectionState\":{\"status\":\"pabdsrg\",\"description\":\"jglzrsubklrxhjnl\",\"actionsRequired\":\"etjdvqydieqqkwa\"},\"provisioningState\":\"wdxvqzxoebwg\"}}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateEndpointConnectionForPrivateLinkHub response = - manager - .privateEndpointConnectionsPrivateLinkHubs() - .getWithResponse("bwxgoooxzpra", "mskxknp", "gzigjsugswhgsaod", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("haquvwsxbgnvk", response.id()); - Assertions.assertEquals("pabdsrg", response.properties().privateLinkServiceConnectionState().status()); - Assertions - .assertEquals("jglzrsubklrxhjnl", response.properties().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("wnbaf", response.name()); - Assertions.assertEquals("to", response.type()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsPrivateLinkHubsListMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsPrivateLinkHubsListMockTests.java deleted file mode 100644 index a04fb045c0fe8..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointConnectionsPrivateLinkHubsListMockTests.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.PrivateEndpointConnectionForPrivateLinkHub; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateEndpointConnectionsPrivateLinkHubsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"zmqilrixysfnim\",\"type\":\"y\",\"id\":\"wmhkruwaedrympml\",\"properties\":{\"privateEndpoint\":{\"id\":\"hzdue\"},\"privateLinkServiceConnectionState\":{\"status\":\"apfjiik\",\"description\":\"diqfliejhpclbi\",\"actionsRequired\":\"fsbw\"},\"provisioningState\":\"ivbvzi\"}}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .privateEndpointConnectionsPrivateLinkHubs() - .list("hyqgsdrmmttjx", "phgerhsmvgoh", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("wmhkruwaedrympml", response.iterator().next().id()); - Assertions - .assertEquals( - "apfjiik", response.iterator().next().properties().privateLinkServiceConnectionState().status()); - Assertions - .assertEquals( - "diqfliejhpclbi", - response.iterator().next().properties().privateLinkServiceConnectionState().description()); - Assertions.assertEquals("zmqilrixysfnim", response.iterator().next().name()); - Assertions.assertEquals("y", response.iterator().next().type()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointTests.java deleted file mode 100644 index 4264d185d8f5b..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateEndpointTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.PrivateEndpoint; - -public final class PrivateEndpointTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateEndpoint model = BinaryData.fromString("{\"id\":\"f\"}").toObject(PrivateEndpoint.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateEndpoint model = new PrivateEndpoint(); - model = BinaryData.fromObject(model).toObject(PrivateEndpoint.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubInfoListResultTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubInfoListResultTests.java deleted file mode 100644 index cb187b09585ca..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubInfoListResultTests.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.PrivateLinkHubInner; -import com.azure.resourcemanager.synapse.models.PrivateLinkHubInfoListResult; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkHubInfoListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkHubInfoListResult model = - BinaryData - .fromString( - "{\"nextLink\":\"aamdect\",\"value\":[{\"properties\":{\"provisioningState\":\"scjeypv\",\"privateEndpointConnections\":[]},\"location\":\"zrkgqhcjrefovg\",\"tags\":{\"yvxyqjp\":\"sle\"},\"id\":\"cattpngjcrcczsq\",\"name\":\"jh\",\"type\":\"mdajv\"}]}") - .toObject(PrivateLinkHubInfoListResult.class); - Assertions.assertEquals("aamdect", model.nextLink()); - Assertions.assertEquals("zrkgqhcjrefovg", model.value().get(0).location()); - Assertions.assertEquals("sle", model.value().get(0).tags().get("yvxyqjp")); - Assertions.assertEquals("scjeypv", model.value().get(0).provisioningState()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkHubInfoListResult model = - new PrivateLinkHubInfoListResult() - .withNextLink("aamdect") - .withValue( - Arrays - .asList( - new PrivateLinkHubInner() - .withLocation("zrkgqhcjrefovg") - .withTags(mapOf("yvxyqjp", "sle")) - .withProvisioningState("scjeypv"))); - model = BinaryData.fromObject(model).toObject(PrivateLinkHubInfoListResult.class); - Assertions.assertEquals("aamdect", model.nextLink()); - Assertions.assertEquals("zrkgqhcjrefovg", model.value().get(0).location()); - Assertions.assertEquals("sle", model.value().get(0).tags().get("yvxyqjp")); - Assertions.assertEquals("scjeypv", model.value().get(0).provisioningState()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubInnerTests.java deleted file mode 100644 index d742bc62c2e63..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubInnerTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.PrivateLinkHubInner; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkHubInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkHubInner model = - BinaryData - .fromString( - "{\"properties\":{\"provisioningState\":\"ounqecano\",\"privateEndpointConnections\":[{\"id\":\"fhyhltrpmopjmcma\"}]},\"location\":\"okth\",\"tags\":{\"xodpuozmyzydagfu\":\"uaodsfcpk\",\"dxwzywqsmbsurexi\":\"xbezyiuokktwh\"},\"id\":\"o\",\"name\":\"yocf\",\"type\":\"fksymddystki\"}") - .toObject(PrivateLinkHubInner.class); - Assertions.assertEquals("okth", model.location()); - Assertions.assertEquals("uaodsfcpk", model.tags().get("xodpuozmyzydagfu")); - Assertions.assertEquals("ounqecano", model.provisioningState()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkHubInner model = - new PrivateLinkHubInner() - .withLocation("okth") - .withTags(mapOf("xodpuozmyzydagfu", "uaodsfcpk", "dxwzywqsmbsurexi", "xbezyiuokktwh")) - .withProvisioningState("ounqecano"); - model = BinaryData.fromObject(model).toObject(PrivateLinkHubInner.class); - Assertions.assertEquals("okth", model.location()); - Assertions.assertEquals("uaodsfcpk", model.tags().get("xodpuozmyzydagfu")); - Assertions.assertEquals("ounqecano", model.provisioningState()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubPatchInfoTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubPatchInfoTests.java deleted file mode 100644 index c0679128e108d..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubPatchInfoTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.PrivateLinkHubPatchInfo; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkHubPatchInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkHubPatchInfo model = - BinaryData - .fromString( - "{\"tags\":{\"foskghsauuimj\":\"ku\",\"rfbyaosvexcso\":\"vxieduugidyj\",\"vleggzfbuhfmvfax\":\"pclhocohslk\",\"hl\":\"ffeii\"}}") - .toObject(PrivateLinkHubPatchInfo.class); - Assertions.assertEquals("ku", model.tags().get("foskghsauuimj")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkHubPatchInfo model = - new PrivateLinkHubPatchInfo() - .withTags( - mapOf( - "foskghsauuimj", - "ku", - "rfbyaosvexcso", - "vxieduugidyj", - "vleggzfbuhfmvfax", - "pclhocohslk", - "hl", - "ffeii")); - model = BinaryData.fromObject(model).toObject(PrivateLinkHubPatchInfo.class); - Assertions.assertEquals("ku", model.tags().get("foskghsauuimj")); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubPrivateLinkResourcesGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubPrivateLinkResourcesGetWithResponseMockTests.java deleted file mode 100644 index 5234b566f6d22..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubPrivateLinkResourcesGetWithResponseMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.PrivateLinkResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateLinkHubPrivateLinkResourcesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"groupId\":\"mnitmujd\",\"requiredMembers\":[\"clyymffhmjpddn\"],\"requiredZoneNames\":[\"zuvrzmzqmz\",\"qrbrpvnmdyfoeboj\"]},\"id\":\"jpp\",\"name\":\"laohoqkp\",\"type\":\"t\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateLinkResource response = - manager - .privateLinkHubPrivateLinkResources() - .getWithResponse("pjlh", "yxpzruzythqk", "whbgxvellvul", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubPrivateLinkResourcesListMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubPrivateLinkResourcesListMockTests.java deleted file mode 100644 index efeaed8b29c1c..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubPrivateLinkResourcesListMockTests.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.PrivateLinkResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateLinkHubPrivateLinkResourcesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"groupId\":\"tfgcwvrr\",\"requiredMembers\":[\"ntycnawt\"],\"requiredZoneNames\":[\"ax\",\"nuyeamcmhud\",\"jecehokwc\",\"qtwloes\"]},\"id\":\"rg\",\"name\":\"vrbnyrukoil\",\"type\":\"ciduwjle\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.privateLinkHubPrivateLinkResources().list("fj", "rwq", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubPropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubPropertiesTests.java deleted file mode 100644 index 810560be810e1..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubPropertiesTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.PrivateLinkHubProperties; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkHubPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkHubProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"xhqyudxorrqnb\",\"privateEndpointConnections\":[{\"id\":\"vyifqrvkdvjsl\",\"properties\":{\"provisioningState\":\"d\"}},{\"id\":\"atkpnp\",\"properties\":{\"provisioningState\":\"bczw\"}}]}") - .toObject(PrivateLinkHubProperties.class); - Assertions.assertEquals("xhqyudxorrqnb", model.provisioningState()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkHubProperties model = new PrivateLinkHubProperties().withProvisioningState("xhqyudxorrqnb"); - model = BinaryData.fromObject(model).toObject(PrivateLinkHubProperties.class); - Assertions.assertEquals("xhqyudxorrqnb", model.provisioningState()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsCreateOrUpdateWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index bb9c2626f8b9c..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.PrivateLinkHub; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateLinkHubsCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"xjsgbi\",\"privateEndpointConnections\":[]},\"location\":\"kdveksb\",\"tags\":{\"rdpibfd\":\"duchvls\",\"wlkaaggkrehbfrnu\":\"jdusspyszekb\",\"qtaadusrexxfavsq\":\"bffljfiimreoag\"},\"id\":\"udo\",\"name\":\"zilfmnlikps\",\"type\":\"msfeypofqpm\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateLinkHub response = - manager - .privateLinkHubs() - .define("es") - .withRegion("lajmllp") - .withExistingResourceGroup("kkwa") - .withTags(mapOf("mfowgwbtmkek", "vh", "xofqovchi", "pkzwa", "ztekxbyjgmsfep", "bplvfidu")) - .withProvisioningState("jlpzeqtoyrp") - .create(); - - Assertions.assertEquals("kdveksb", response.location()); - Assertions.assertEquals("duchvls", response.tags().get("rdpibfd")); - Assertions.assertEquals("xjsgbi", response.provisioningState()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsDeleteMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsDeleteMockTests.java deleted file mode 100644 index 6376b4e04583d..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateLinkHubsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.privateLinkHubs().delete("wljuxlkbectvt", "j", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsGetByResourceGroupWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index e479e3163c834..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.PrivateLinkHub; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateLinkHubsGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"provisioningState\":\"jnsxzajlnsjhwjuy\",\"privateEndpointConnections\":[]},\"location\":\"xqvmvuay\",\"tags\":{\"eqbw\":\"dxk\",\"xsl\":\"ntghyksarcdr\",\"x\":\"vlzladl\",\"wzdanojisgglmvo\":\"pbqhvfdqqjwkr\"},\"id\":\"atuztjct\",\"name\":\"bpvbkaehxsmzygd\",\"type\":\"wakwseivmakxhys\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateLinkHub response = - manager - .privateLinkHubs() - .getByResourceGroupWithResponse("zuu", "ljcirvpefycdvei", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("xqvmvuay", response.location()); - Assertions.assertEquals("dxk", response.tags().get("eqbw")); - Assertions.assertEquals("jnsxzajlnsjhwjuy", response.provisioningState()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsListByResourceGroupMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsListByResourceGroupMockTests.java deleted file mode 100644 index 8a6411e88898b..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsListByResourceGroupMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.PrivateLinkHub; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateLinkHubsListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"hxdqaol\",\"privateEndpointConnections\":[]},\"location\":\"nkkbjpjvlywltmfw\",\"tags\":{\"lwyjfnqzocrdz\":\"jw\",\"ncaqttiekoifu\":\"czeuntgx\",\"yri\":\"nyttzgix\",\"lqtxnrflkndrn\":\"lgmgbe\"},\"id\":\"pgfjo\",\"name\":\"hdaqotwfhipxwg\",\"type\":\"abvcipowzaf\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.privateLinkHubs().listByResourceGroup("qjilaywkdcwmqsyr", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("nkkbjpjvlywltmfw", response.iterator().next().location()); - Assertions.assertEquals("jw", response.iterator().next().tags().get("lwyjfnqzocrdz")); - Assertions.assertEquals("hxdqaol", response.iterator().next().provisioningState()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsListMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsListMockTests.java deleted file mode 100644 index d195bbdd33a69..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkHubsListMockTests.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.PrivateLinkHub; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateLinkHubsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"provisioningState\":\"dchmaiubavlz\",\"privateEndpointConnections\":[]},\"location\":\"gmfalkzazmgoked\",\"tags\":{\"wpqrtvaozn\":\"afkmkrokzrthqe\",\"iezeagm\":\"ni\",\"lzmb\":\"eituugedhfpjs\",\"fsyrledjc\":\"syjdeolctae\"},\"id\":\"stbvtqig\",\"name\":\"xzvsgeafgf\",\"type\":\"sehxlzsxezp\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.privateLinkHubs().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("gmfalkzazmgoked", response.iterator().next().location()); - Assertions.assertEquals("afkmkrokzrthqe", response.iterator().next().tags().get("wpqrtvaozn")); - Assertions.assertEquals("dchmaiubavlz", response.iterator().next().provisioningState()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkResourceInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkResourceInnerTests.java deleted file mode 100644 index 0a07031bc4aa6..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkResourceInnerTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.PrivateLinkResourceInner; - -public final class PrivateLinkResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceInner model = - BinaryData - .fromString( - "{\"properties\":{\"groupId\":\"wtgrhpdjpj\",\"requiredMembers\":[\"sxazjpq\",\"e\",\"ualhbxxhejj\",\"zvdudgwdslfhotwm\"],\"requiredZoneNames\":[\"pwlbjnpg\",\"cftadeh\",\"nltyfsoppusuesnz\"]},\"id\":\"dejbavo\",\"name\":\"xzdmohctb\",\"type\":\"vudwx\"}") - .toObject(PrivateLinkResourceInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceInner model = new PrivateLinkResourceInner(); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceInner.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkResourceListResultTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkResourceListResultTests.java deleted file mode 100644 index 0a1d736fea738..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkResourceListResultTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.PrivateLinkResourceListResult; - -public final class PrivateLinkResourceListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"groupId\":\"drvyn\",\"requiredMembers\":[],\"requiredZoneNames\":[]},\"id\":\"pphrcgynco\",\"name\":\"pec\",\"type\":\"vmmcoofs\"},{\"properties\":{\"groupId\":\"evgbmqjq\",\"requiredMembers\":[],\"requiredZoneNames\":[]},\"id\":\"y\",\"name\":\"mivkwlzuvcc\",\"type\":\"wnfnbacf\"},{\"properties\":{\"groupId\":\"l\",\"requiredMembers\":[],\"requiredZoneNames\":[]},\"id\":\"etqgtzxdpnq\",\"name\":\"qqwx\",\"type\":\"jfeallnwsub\"},{\"properties\":{\"groupId\":\"jampmngnzscxaqw\",\"requiredMembers\":[],\"requiredZoneNames\":[]},\"id\":\"hcbonqvpkvlr\",\"name\":\"njeaseipheofloke\",\"type\":\"y\"}],\"nextLink\":\"nj\"}") - .toObject(PrivateLinkResourceListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceListResult model = new PrivateLinkResourceListResult(); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceListResult.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkResourcePropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkResourcePropertiesTests.java deleted file mode 100644 index f405dd3433c34..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkResourcePropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.PrivateLinkResourceProperties; - -public final class PrivateLinkResourcePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourceProperties model = - BinaryData - .fromString( - "{\"groupId\":\"dnvowg\",\"requiredMembers\":[\"ugw\",\"kcglhslaz\",\"dyggdtjixhbku\"],\"requiredZoneNames\":[\"wey\",\"hmenevfyexfwhybc\",\"bvyvdcsity\"]}") - .toObject(PrivateLinkResourceProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourceProperties model = new PrivateLinkResourceProperties(); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourceProperties.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkResourcesOperationsGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkResourcesOperationsGetWithResponseMockTests.java deleted file mode 100644 index 3f3b62aaf8c75..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkResourcesOperationsGetWithResponseMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.PrivateLinkResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateLinkResourcesOperationsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"groupId\":\"be\",\"requiredMembers\":[\"isrz\"],\"requiredZoneNames\":[\"kdidjc\",\"lrmpwctofldse\"]},\"id\":\"cdhz\",\"name\":\"xkbrfg\",\"type\":\"rwjiyew\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PrivateLinkResource response = - manager - .privateLinkResourcesOperations() - .getWithResponse("njzudr", "pzkg", "eboywhczzqrhm", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkResourcesOperationsListMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkResourcesOperationsListMockTests.java deleted file mode 100644 index 0a8210dd7bfee..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkResourcesOperationsListMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.PrivateLinkResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class PrivateLinkResourcesOperationsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"groupId\":\"ah\",\"requiredMembers\":[\"niiwllbvgwz\"],\"requiredZoneNames\":[\"tedousnktjtgrava\"]},\"id\":\"ogfkbebauzlqb\",\"name\":\"xxw\",\"type\":\"f\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .privateLinkResourcesOperations() - .list("lhydwbdbfgrlpu", "ytjlkesmmpath", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkResourcesPropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkResourcesPropertiesTests.java deleted file mode 100644 index 80ffa5046e45a..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkResourcesPropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.PrivateLinkResourcesProperties; - -public final class PrivateLinkResourcesPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResourcesProperties model = - BinaryData - .fromString( - "{\"groupId\":\"hpabgdexjddvjs\",\"requiredMembers\":[\"otmmw\",\"lcol\",\"rsxaptefh\",\"xcgjokjljnhvlq\"],\"requiredZoneNames\":[\"kpeeksnbksdqhj\"],\"provisioningState\":\"Creating\"}") - .toObject(PrivateLinkResourcesProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResourcesProperties model = new PrivateLinkResourcesProperties(); - model = BinaryData.fromObject(model).toObject(PrivateLinkResourcesProperties.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkResourcesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkResourcesTests.java deleted file mode 100644 index 53125e74b0ce1..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkResourcesTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.KustoPoolPrivateLinkResourcesInner; -import com.azure.resourcemanager.synapse.models.PrivateLinkResources; -import java.util.Arrays; - -public final class PrivateLinkResourcesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkResources model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"groupId\":\"uipldqq\",\"requiredMembers\":[],\"requiredZoneNames\":[],\"provisioningState\":\"Canceled\"},\"id\":\"lblhtjq\",\"name\":\"qyv\",\"type\":\"eh\"}]}") - .toObject(PrivateLinkResources.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkResources model = - new PrivateLinkResources().withValue(Arrays.asList(new KustoPoolPrivateLinkResourcesInner())); - model = BinaryData.fromObject(model).toObject(PrivateLinkResources.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkServiceConnectionStateTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkServiceConnectionStateTests.java deleted file mode 100644 index 2a8457e184080..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PrivateLinkServiceConnectionStateTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.PrivateLinkServiceConnectionState; -import org.junit.jupiter.api.Assertions; - -public final class PrivateLinkServiceConnectionStateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PrivateLinkServiceConnectionState model = - BinaryData - .fromString("{\"status\":\"yd\",\"description\":\"lmjthjq\",\"actionsRequired\":\"pyeicxm\"}") - .toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals("yd", model.status()); - Assertions.assertEquals("lmjthjq", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PrivateLinkServiceConnectionState model = - new PrivateLinkServiceConnectionState().withStatus("yd").withDescription("lmjthjq"); - model = BinaryData.fromObject(model).toObject(PrivateLinkServiceConnectionState.class); - Assertions.assertEquals("yd", model.status()); - Assertions.assertEquals("lmjthjq", model.description()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PurviewConfigurationTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PurviewConfigurationTests.java deleted file mode 100644 index 3cfa0835e4acb..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/PurviewConfigurationTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.PurviewConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class PurviewConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PurviewConfiguration model = - BinaryData.fromString("{\"purviewResourceId\":\"ezkgi\"}").toObject(PurviewConfiguration.class); - Assertions.assertEquals("ezkgi", model.purviewResourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PurviewConfiguration model = new PurviewConfiguration().withPurviewResourceId("ezkgi"); - model = BinaryData.fromObject(model).toObject(PurviewConfiguration.class); - Assertions.assertEquals("ezkgi", model.purviewResourceId()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ReadOnlyFollowingDatabasePropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ReadOnlyFollowingDatabasePropertiesTests.java deleted file mode 100644 index 44e961bbb5752..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ReadOnlyFollowingDatabasePropertiesTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.ReadOnlyFollowingDatabaseProperties; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class ReadOnlyFollowingDatabasePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReadOnlyFollowingDatabaseProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"Creating\",\"softDeletePeriod\":\"PT21H33M36S\",\"hotCachePeriod\":\"PT30H42M39S\",\"statistics\":{\"size\":1.7092168},\"leaderClusterResourceId\":\"azyqbxyxoyfp\",\"attachedDatabaseConfigurationName\":\"qi\",\"principalsModificationKind\":\"None\"}") - .toObject(ReadOnlyFollowingDatabaseProperties.class); - Assertions.assertEquals(Duration.parse("PT30H42M39S"), model.hotCachePeriod()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReadOnlyFollowingDatabaseProperties model = - new ReadOnlyFollowingDatabaseProperties().withHotCachePeriod(Duration.parse("PT30H42M39S")); - model = BinaryData.fromObject(model).toObject(ReadOnlyFollowingDatabaseProperties.class); - Assertions.assertEquals(Duration.parse("PT30H42M39S"), model.hotCachePeriod()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ReadOnlyFollowingDatabaseTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ReadOnlyFollowingDatabaseTests.java deleted file mode 100644 index ebdefc530246e..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ReadOnlyFollowingDatabaseTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.ReadOnlyFollowingDatabase; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class ReadOnlyFollowingDatabaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReadOnlyFollowingDatabase model = - BinaryData - .fromString( - "{\"kind\":\"ReadOnlyFollowing\",\"properties\":{\"provisioningState\":\"Deleting\",\"softDeletePeriod\":\"PT1H8M39S\",\"hotCachePeriod\":\"PT168H52M2S\",\"statistics\":{\"size\":48.76836},\"leaderClusterResourceId\":\"jufptbjczjnciuiy\",\"attachedDatabaseConfigurationName\":\"ldaswvpp\",\"principalsModificationKind\":\"None\"},\"location\":\"zlgcndhzxrrf\",\"id\":\"srhkhgsnxuwwkpph\",\"name\":\"fsbzxlbzxo\",\"type\":\"eikjclwza\"}") - .toObject(ReadOnlyFollowingDatabase.class); - Assertions.assertEquals("zlgcndhzxrrf", model.location()); - Assertions.assertEquals(Duration.parse("PT168H52M2S"), model.hotCachePeriod()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReadOnlyFollowingDatabase model = - new ReadOnlyFollowingDatabase() - .withLocation("zlgcndhzxrrf") - .withHotCachePeriod(Duration.parse("PT168H52M2S")); - model = BinaryData.fromObject(model).toObject(ReadOnlyFollowingDatabase.class); - Assertions.assertEquals("zlgcndhzxrrf", model.location()); - Assertions.assertEquals(Duration.parse("PT168H52M2S"), model.hotCachePeriod()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ReadWriteDatabasePropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ReadWriteDatabasePropertiesTests.java deleted file mode 100644 index 5f541ef850dd7..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ReadWriteDatabasePropertiesTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.ReadWriteDatabaseProperties; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class ReadWriteDatabasePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReadWriteDatabaseProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"Moving\",\"softDeletePeriod\":\"PT155H28M34S\",\"hotCachePeriod\":\"PT125H27S\",\"statistics\":{\"size\":51.67798},\"isFollowed\":false}") - .toObject(ReadWriteDatabaseProperties.class); - Assertions.assertEquals(Duration.parse("PT155H28M34S"), model.softDeletePeriod()); - Assertions.assertEquals(Duration.parse("PT125H27S"), model.hotCachePeriod()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReadWriteDatabaseProperties model = - new ReadWriteDatabaseProperties() - .withSoftDeletePeriod(Duration.parse("PT155H28M34S")) - .withHotCachePeriod(Duration.parse("PT125H27S")); - model = BinaryData.fromObject(model).toObject(ReadWriteDatabaseProperties.class); - Assertions.assertEquals(Duration.parse("PT155H28M34S"), model.softDeletePeriod()); - Assertions.assertEquals(Duration.parse("PT125H27S"), model.hotCachePeriod()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ReadWriteDatabaseTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ReadWriteDatabaseTests.java deleted file mode 100644 index faf7341682115..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ReadWriteDatabaseTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.ReadWriteDatabase; -import java.time.Duration; -import org.junit.jupiter.api.Assertions; - -public final class ReadWriteDatabaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReadWriteDatabase model = - BinaryData - .fromString( - "{\"kind\":\"ReadWrite\",\"properties\":{\"provisioningState\":\"Failed\",\"softDeletePeriod\":\"PT114H20M25S\",\"hotCachePeriod\":\"PT201H28M55S\",\"statistics\":{\"size\":58.395046},\"isFollowed\":true},\"location\":\"tgnjizbeewoiymrv\",\"id\":\"juyrsrziuctixg\",\"name\":\"d\",\"type\":\"uifr\"}") - .toObject(ReadWriteDatabase.class); - Assertions.assertEquals("tgnjizbeewoiymrv", model.location()); - Assertions.assertEquals(Duration.parse("PT114H20M25S"), model.softDeletePeriod()); - Assertions.assertEquals(Duration.parse("PT201H28M55S"), model.hotCachePeriod()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReadWriteDatabase model = - new ReadWriteDatabase() - .withLocation("tgnjizbeewoiymrv") - .withSoftDeletePeriod(Duration.parse("PT114H20M25S")) - .withHotCachePeriod(Duration.parse("PT201H28M55S")); - model = BinaryData.fromObject(model).toObject(ReadWriteDatabase.class); - Assertions.assertEquals("tgnjizbeewoiymrv", model.location()); - Assertions.assertEquals(Duration.parse("PT114H20M25S"), model.softDeletePeriod()); - Assertions.assertEquals(Duration.parse("PT201H28M55S"), model.hotCachePeriod()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/RecommendedSensitivityLabelUpdateListTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/RecommendedSensitivityLabelUpdateListTests.java deleted file mode 100644 index 0d5774fdfced1..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/RecommendedSensitivityLabelUpdateListTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.RecommendedSensitivityLabelUpdate; -import com.azure.resourcemanager.synapse.models.RecommendedSensitivityLabelUpdateKind; -import com.azure.resourcemanager.synapse.models.RecommendedSensitivityLabelUpdateList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class RecommendedSensitivityLabelUpdateListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecommendedSensitivityLabelUpdateList model = - BinaryData - .fromString( - "{\"operations\":[{\"properties\":{\"op\":\"disable\",\"schema\":\"hoftr\",\"table\":\"ae\",\"column\":\"u\"},\"id\":\"ah\",\"name\":\"icslfaoq\",\"type\":\"piyylhalnswhccsp\"},{\"properties\":{\"op\":\"disable\",\"schema\":\"ivwitqscywugg\",\"table\":\"oluhczbwemh\",\"column\":\"i\"},\"id\":\"sbrgz\",\"name\":\"wmsweypqwd\",\"type\":\"ggicccnxqhue\"},{\"properties\":{\"op\":\"enable\",\"schema\":\"ttlstvlzywemhz\",\"table\":\"ncsdtclusiyp\",\"column\":\"sfgytguslfead\"},\"id\":\"ygqukyhejh\",\"name\":\"isxgfp\",\"type\":\"lolp\"},{\"properties\":{\"op\":\"enable\",\"schema\":\"srp\",\"table\":\"vu\",\"column\":\"zraehtwd\"},\"id\":\"r\",\"name\":\"tswiby\",\"type\":\"cdl\"}]}") - .toObject(RecommendedSensitivityLabelUpdateList.class); - Assertions.assertEquals(RecommendedSensitivityLabelUpdateKind.DISABLE, model.operations().get(0).op()); - Assertions.assertEquals("hoftr", model.operations().get(0).schema()); - Assertions.assertEquals("ae", model.operations().get(0).table()); - Assertions.assertEquals("u", model.operations().get(0).column()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecommendedSensitivityLabelUpdateList model = - new RecommendedSensitivityLabelUpdateList() - .withOperations( - Arrays - .asList( - new RecommendedSensitivityLabelUpdate() - .withOp(RecommendedSensitivityLabelUpdateKind.DISABLE) - .withSchema("hoftr") - .withTable("ae") - .withColumn("u"), - new RecommendedSensitivityLabelUpdate() - .withOp(RecommendedSensitivityLabelUpdateKind.DISABLE) - .withSchema("ivwitqscywugg") - .withTable("oluhczbwemh") - .withColumn("i"), - new RecommendedSensitivityLabelUpdate() - .withOp(RecommendedSensitivityLabelUpdateKind.ENABLE) - .withSchema("ttlstvlzywemhz") - .withTable("ncsdtclusiyp") - .withColumn("sfgytguslfead"), - new RecommendedSensitivityLabelUpdate() - .withOp(RecommendedSensitivityLabelUpdateKind.ENABLE) - .withSchema("srp") - .withTable("vu") - .withColumn("zraehtwd"))); - model = BinaryData.fromObject(model).toObject(RecommendedSensitivityLabelUpdateList.class); - Assertions.assertEquals(RecommendedSensitivityLabelUpdateKind.DISABLE, model.operations().get(0).op()); - Assertions.assertEquals("hoftr", model.operations().get(0).schema()); - Assertions.assertEquals("ae", model.operations().get(0).table()); - Assertions.assertEquals("u", model.operations().get(0).column()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/RecommendedSensitivityLabelUpdatePropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/RecommendedSensitivityLabelUpdatePropertiesTests.java deleted file mode 100644 index b52cfe21ac91c..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/RecommendedSensitivityLabelUpdatePropertiesTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.RecommendedSensitivityLabelUpdateProperties; -import com.azure.resourcemanager.synapse.models.RecommendedSensitivityLabelUpdateKind; -import org.junit.jupiter.api.Assertions; - -public final class RecommendedSensitivityLabelUpdatePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecommendedSensitivityLabelUpdateProperties model = - BinaryData - .fromString( - "{\"op\":\"enable\",\"schema\":\"qunyowxwlmdjr\",\"table\":\"vfgbvfvpdboda\",\"column\":\"izsjqlhkrr\"}") - .toObject(RecommendedSensitivityLabelUpdateProperties.class); - Assertions.assertEquals(RecommendedSensitivityLabelUpdateKind.ENABLE, model.op()); - Assertions.assertEquals("qunyowxwlmdjr", model.schema()); - Assertions.assertEquals("vfgbvfvpdboda", model.table()); - Assertions.assertEquals("izsjqlhkrr", model.column()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecommendedSensitivityLabelUpdateProperties model = - new RecommendedSensitivityLabelUpdateProperties() - .withOp(RecommendedSensitivityLabelUpdateKind.ENABLE) - .withSchema("qunyowxwlmdjr") - .withTable("vfgbvfvpdboda") - .withColumn("izsjqlhkrr"); - model = BinaryData.fromObject(model).toObject(RecommendedSensitivityLabelUpdateProperties.class); - Assertions.assertEquals(RecommendedSensitivityLabelUpdateKind.ENABLE, model.op()); - Assertions.assertEquals("qunyowxwlmdjr", model.schema()); - Assertions.assertEquals("vfgbvfvpdboda", model.table()); - Assertions.assertEquals("izsjqlhkrr", model.column()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/RecommendedSensitivityLabelUpdateTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/RecommendedSensitivityLabelUpdateTests.java deleted file mode 100644 index f2b914aff4590..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/RecommendedSensitivityLabelUpdateTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.RecommendedSensitivityLabelUpdate; -import com.azure.resourcemanager.synapse.models.RecommendedSensitivityLabelUpdateKind; -import org.junit.jupiter.api.Assertions; - -public final class RecommendedSensitivityLabelUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecommendedSensitivityLabelUpdate model = - BinaryData - .fromString( - "{\"properties\":{\"op\":\"disable\",\"schema\":\"hfwpracstwit\",\"table\":\"khevxccedc\",\"column\":\"nmdyodnwzxl\"},\"id\":\"jc\",\"name\":\"nhltiugcxn\",\"type\":\"vvwxqi\"}") - .toObject(RecommendedSensitivityLabelUpdate.class); - Assertions.assertEquals(RecommendedSensitivityLabelUpdateKind.DISABLE, model.op()); - Assertions.assertEquals("hfwpracstwit", model.schema()); - Assertions.assertEquals("khevxccedc", model.table()); - Assertions.assertEquals("nmdyodnwzxl", model.column()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecommendedSensitivityLabelUpdate model = - new RecommendedSensitivityLabelUpdate() - .withOp(RecommendedSensitivityLabelUpdateKind.DISABLE) - .withSchema("hfwpracstwit") - .withTable("khevxccedc") - .withColumn("nmdyodnwzxl"); - model = BinaryData.fromObject(model).toObject(RecommendedSensitivityLabelUpdate.class); - Assertions.assertEquals(RecommendedSensitivityLabelUpdateKind.DISABLE, model.op()); - Assertions.assertEquals("hfwpracstwit", model.schema()); - Assertions.assertEquals("khevxccedc", model.table()); - Assertions.assertEquals("nmdyodnwzxl", model.column()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/RecoverableSqlPoolInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/RecoverableSqlPoolInnerTests.java deleted file mode 100644 index 5855bb8028ea8..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/RecoverableSqlPoolInnerTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.RecoverableSqlPoolInner; - -public final class RecoverableSqlPoolInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecoverableSqlPoolInner model = - BinaryData - .fromString( - "{\"properties\":{\"edition\":\"cjbtrgaehvvib\",\"serviceLevelObjective\":\"jj\",\"elasticPoolName\":\"oqbeitpkxzt\",\"lastAvailableBackupDate\":\"2021-07-13T13:28:06Z\"},\"id\":\"bklftidgfcwqmpim\",\"name\":\"qxzhem\",\"type\":\"yhohujswtwkozzwc\"}") - .toObject(RecoverableSqlPoolInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoverableSqlPoolInner model = new RecoverableSqlPoolInner(); - model = BinaryData.fromObject(model).toObject(RecoverableSqlPoolInner.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/RecoverableSqlPoolListResultTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/RecoverableSqlPoolListResultTests.java deleted file mode 100644 index 464bfb4aeeb30..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/RecoverableSqlPoolListResultTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.RecoverableSqlPoolListResult; - -public final class RecoverableSqlPoolListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecoverableSqlPoolListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"edition\":\"efojyqdhcupl\",\"serviceLevelObjective\":\"lcwkhihihlhz\",\"elasticPoolName\":\"qtz\",\"lastAvailableBackupDate\":\"2021-02-23T09:25:04Z\"},\"id\":\"gnowcjhfgmveca\",\"name\":\"txmwoteyow\",\"type\":\"luqovekqvg\"},{\"properties\":{\"edition\":\"wifzmp\",\"serviceLevelObjective\":\"yivqikfxcvhrfsp\",\"elasticPoolName\":\"agr\",\"lastAvailableBackupDate\":\"2021-07-10T20:58:35Z\"},\"id\":\"kteusqczk\",\"name\":\"yklxubyjaffmmfbl\",\"type\":\"qcuubgqibrta\"},{\"properties\":{\"edition\":\"tttwgdslqxih\",\"serviceLevelObjective\":\"moo\",\"elasticPoolName\":\"qseypxiutcxa\",\"lastAvailableBackupDate\":\"2021-01-03T05:51:25Z\"},\"id\":\"y\",\"name\":\"petogebjox\",\"type\":\"lhvnhlab\"}],\"nextLink\":\"nk\"}") - .toObject(RecoverableSqlPoolListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoverableSqlPoolListResult model = new RecoverableSqlPoolListResult(); - model = BinaryData.fromObject(model).toObject(RecoverableSqlPoolListResult.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/RecoverableSqlPoolPropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/RecoverableSqlPoolPropertiesTests.java deleted file mode 100644 index e00f9026e989b..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/RecoverableSqlPoolPropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.RecoverableSqlPoolProperties; - -public final class RecoverableSqlPoolPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RecoverableSqlPoolProperties model = - BinaryData - .fromString( - "{\"edition\":\"kb\",\"serviceLevelObjective\":\"pfajnjwltlwtjj\",\"elasticPoolName\":\"ktalhsnvkcdmxz\",\"lastAvailableBackupDate\":\"2021-05-04T00:50:01Z\"}") - .toObject(RecoverableSqlPoolProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RecoverableSqlPoolProperties model = new RecoverableSqlPoolProperties(); - model = BinaryData.fromObject(model).toObject(RecoverableSqlPoolProperties.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ReplaceAllFirewallRulesOperationResponseInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ReplaceAllFirewallRulesOperationResponseInnerTests.java deleted file mode 100644 index 82f16e31949d0..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ReplaceAllFirewallRulesOperationResponseInnerTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.ReplaceAllFirewallRulesOperationResponseInner; -import org.junit.jupiter.api.Assertions; - -public final class ReplaceAllFirewallRulesOperationResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplaceAllFirewallRulesOperationResponseInner model = - BinaryData - .fromString("{\"operationId\":\"rtfw\"}") - .toObject(ReplaceAllFirewallRulesOperationResponseInner.class); - Assertions.assertEquals("rtfw", model.operationId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplaceAllFirewallRulesOperationResponseInner model = - new ReplaceAllFirewallRulesOperationResponseInner().withOperationId("rtfw"); - model = BinaryData.fromObject(model).toObject(ReplaceAllFirewallRulesOperationResponseInner.class); - Assertions.assertEquals("rtfw", model.operationId()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ReplaceAllIpFirewallRulesRequestTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ReplaceAllIpFirewallRulesRequestTests.java deleted file mode 100644 index 8bf5874ea499d..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ReplaceAllIpFirewallRulesRequestTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.IpFirewallRuleProperties; -import com.azure.resourcemanager.synapse.models.ReplaceAllIpFirewallRulesRequest; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ReplaceAllIpFirewallRulesRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplaceAllIpFirewallRulesRequest model = - BinaryData - .fromString( - "{\"ipFirewallRules\":{\"xqhabi\":{\"endIpAddress\":\"fhfcb\",\"provisioningState\":\"DeleteError\",\"startIpAddress\":\"git\"},\"rkxvdum\":{\"endIpAddress\":\"ikxwc\",\"provisioningState\":\"Provisioning\",\"startIpAddress\":\"cnpqxuhivyqniwby\"}}}") - .toObject(ReplaceAllIpFirewallRulesRequest.class); - Assertions.assertEquals("fhfcb", model.ipFirewallRules().get("xqhabi").endIpAddress()); - Assertions.assertEquals("git", model.ipFirewallRules().get("xqhabi").startIpAddress()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplaceAllIpFirewallRulesRequest model = - new ReplaceAllIpFirewallRulesRequest() - .withIpFirewallRules( - mapOf( - "xqhabi", - new IpFirewallRuleProperties().withEndIpAddress("fhfcb").withStartIpAddress("git"), - "rkxvdum", - new IpFirewallRuleProperties() - .withEndIpAddress("ikxwc") - .withStartIpAddress("cnpqxuhivyqniwby"))); - model = BinaryData.fromObject(model).toObject(ReplaceAllIpFirewallRulesRequest.class); - Assertions.assertEquals("fhfcb", model.ipFirewallRules().get("xqhabi").endIpAddress()); - Assertions.assertEquals("git", model.ipFirewallRules().get("xqhabi").startIpAddress()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ReplicationLinkInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ReplicationLinkInnerTests.java deleted file mode 100644 index 5681b4cfabfe8..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ReplicationLinkInnerTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.ReplicationLinkInner; - -public final class ReplicationLinkInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicationLinkInner model = - BinaryData - .fromString( - "{\"location\":\"dfznudaodv\",\"properties\":{\"isTerminationAllowed\":true,\"replicationMode\":\"blylpstdbh\",\"partnerServer\":\"srzdzucerscdn\",\"partnerDatabase\":\"evfiwjmygt\",\"partnerLocation\":\"slswtm\",\"role\":\"Secondary\",\"partnerRole\":\"Primary\",\"startTime\":\"2021-10-28T16:23:15Z\",\"percentComplete\":1861097710,\"replicationState\":\"CATCH_UP\"},\"id\":\"emwabnet\",\"name\":\"hhszh\",\"type\":\"d\"}") - .toObject(ReplicationLinkInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicationLinkInner model = new ReplicationLinkInner(); - model = BinaryData.fromObject(model).toObject(ReplicationLinkInner.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ReplicationLinkListResultTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ReplicationLinkListResultTests.java deleted file mode 100644 index 4242f3818f5c3..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ReplicationLinkListResultTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.ReplicationLinkInner; -import com.azure.resourcemanager.synapse.models.ReplicationLinkListResult; -import java.util.Arrays; - -public final class ReplicationLinkListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicationLinkListResult model = - BinaryData - .fromString( - "{\"value\":[{\"location\":\"mifthnzdnd\",\"properties\":{\"isTerminationAllowed\":false,\"replicationMode\":\"yq\",\"partnerServer\":\"ynduha\",\"partnerDatabase\":\"qlkth\",\"partnerLocation\":\"aqolbgycduiertg\",\"role\":\"Source\",\"partnerRole\":\"Primary\",\"startTime\":\"2021-09-08T08:41:54Z\",\"percentComplete\":76010479,\"replicationState\":\"CATCH_UP\"},\"id\":\"lqlfm\",\"name\":\"dnbbglzps\",\"type\":\"iydmcwyhzdxs\"}],\"nextLink\":\"dbzm\"}") - .toObject(ReplicationLinkListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicationLinkListResult model = - new ReplicationLinkListResult().withValue(Arrays.asList(new ReplicationLinkInner())); - model = BinaryData.fromObject(model).toObject(ReplicationLinkListResult.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ReplicationLinkPropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ReplicationLinkPropertiesTests.java deleted file mode 100644 index 7e11e012b96b3..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ReplicationLinkPropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.ReplicationLinkProperties; - -public final class ReplicationLinkPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicationLinkProperties model = - BinaryData - .fromString( - "{\"isTerminationAllowed\":true,\"replicationMode\":\"iwubmwmbesldnk\",\"partnerServer\":\"tppjflcx\",\"partnerDatabase\":\"aokonzmnsik\",\"partnerLocation\":\"kqze\",\"role\":\"Copy\",\"partnerRole\":\"NonReadableSecondary\",\"startTime\":\"2021-09-09T14:39:27Z\",\"percentComplete\":684892546,\"replicationState\":\"PENDING\"}") - .toObject(ReplicationLinkProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicationLinkProperties model = new ReplicationLinkProperties(); - model = BinaryData.fromObject(model).toObject(ReplicationLinkProperties.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ResourceMoveDefinitionTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ResourceMoveDefinitionTests.java deleted file mode 100644 index 941fbe15edba0..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ResourceMoveDefinitionTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.ResourceMoveDefinition; -import org.junit.jupiter.api.Assertions; - -public final class ResourceMoveDefinitionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceMoveDefinition model = - BinaryData.fromString("{\"id\":\"qlveualupjmkh\"}").toObject(ResourceMoveDefinition.class); - Assertions.assertEquals("qlveualupjmkh", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceMoveDefinition model = new ResourceMoveDefinition().withId("qlveualupjmkh"); - model = BinaryData.fromObject(model).toObject(ResourceMoveDefinition.class); - Assertions.assertEquals("qlveualupjmkh", model.id()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/RestorableDroppedSqlPoolInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/RestorableDroppedSqlPoolInnerTests.java deleted file mode 100644 index 1dc2e0da36cc7..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/RestorableDroppedSqlPoolInnerTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.RestorableDroppedSqlPoolInner; - -public final class RestorableDroppedSqlPoolInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RestorableDroppedSqlPoolInner model = - BinaryData - .fromString( - "{\"location\":\"wmdboxdfgsftuf\",\"properties\":{\"databaseName\":\"rjlnacgcck\",\"edition\":\"hxkizvytnrzv\",\"maxSizeBytes\":\"jraaeranokqguk\",\"serviceLevelObjective\":\"qnvb\",\"elasticPoolName\":\"ylaxxulcdi\",\"creationDate\":\"2021-07-14T04:09:25Z\",\"deletionDate\":\"2021-02-01T10:54:28Z\",\"earliestRestoreDate\":\"2021-04-13T22:50:17Z\"},\"id\":\"jsvg\",\"name\":\"rwhryvycytd\",\"type\":\"lxgccknfnwmbtm\"}") - .toObject(RestorableDroppedSqlPoolInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RestorableDroppedSqlPoolInner model = new RestorableDroppedSqlPoolInner(); - model = BinaryData.fromObject(model).toObject(RestorableDroppedSqlPoolInner.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/RestorableDroppedSqlPoolListResultTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/RestorableDroppedSqlPoolListResultTests.java deleted file mode 100644 index c756b42fcdfb7..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/RestorableDroppedSqlPoolListResultTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.RestorableDroppedSqlPoolInner; -import com.azure.resourcemanager.synapse.models.RestorableDroppedSqlPoolListResult; -import java.util.Arrays; - -public final class RestorableDroppedSqlPoolListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RestorableDroppedSqlPoolListResult model = - BinaryData - .fromString( - "{\"value\":[{\"location\":\"qlgehg\",\"properties\":{\"databaseName\":\"pifhpfeoajvgcxtx\",\"edition\":\"sheafid\",\"maxSizeBytes\":\"ugsresmkssjhoi\",\"serviceLevelObjective\":\"xfkfwegprhptill\",\"elasticPoolName\":\"biqtgdq\",\"creationDate\":\"2021-07-05T05:21:27Z\",\"deletionDate\":\"2021-06-27T02:38:30Z\",\"earliestRestoreDate\":\"2021-05-01T07:33:50Z\"},\"id\":\"drizetpwbr\",\"name\":\"lllibph\",\"type\":\"qzmiza\"},{\"location\":\"kan\",\"properties\":{\"databaseName\":\"dnjzh\",\"edition\":\"oylhjlmuoyxprimr\",\"maxSizeBytes\":\"pteecjme\",\"serviceLevelObjective\":\"ls\",\"elasticPoolName\":\"asylwx\",\"creationDate\":\"2021-07-29T15:52:33Z\",\"deletionDate\":\"2021-01-12T02:29:32Z\",\"earliestRestoreDate\":\"2021-03-03T01:17:06Z\"},\"id\":\"oohgu\",\"name\":\"fuzboyjathwtzolb\",\"type\":\"emwmdxmebwjs\"},{\"location\":\"p\",\"properties\":{\"databaseName\":\"xveabf\",\"edition\":\"nmwmqtibx\",\"maxSizeBytes\":\"jddtvqct\",\"serviceLevelObjective\":\"dija\",\"elasticPoolName\":\"kmr\",\"creationDate\":\"2021-09-17T14:17:20Z\",\"deletionDate\":\"2021-06-27T19:58:30Z\",\"earliestRestoreDate\":\"2021-03-21T22:02:33Z\"},\"id\":\"dzaapmudqme\",\"name\":\"wig\",\"type\":\"ibudqwy\"}]}") - .toObject(RestorableDroppedSqlPoolListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RestorableDroppedSqlPoolListResult model = - new RestorableDroppedSqlPoolListResult() - .withValue( - Arrays - .asList( - new RestorableDroppedSqlPoolInner(), - new RestorableDroppedSqlPoolInner(), - new RestorableDroppedSqlPoolInner())); - model = BinaryData.fromObject(model).toObject(RestorableDroppedSqlPoolListResult.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/RestorableDroppedSqlPoolPropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/RestorableDroppedSqlPoolPropertiesTests.java deleted file mode 100644 index 65d989cbc02ed..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/RestorableDroppedSqlPoolPropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.RestorableDroppedSqlPoolProperties; - -public final class RestorableDroppedSqlPoolPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RestorableDroppedSqlPoolProperties model = - BinaryData - .fromString( - "{\"databaseName\":\"dvjdhttza\",\"edition\":\"edxihchrphkmcrj\",\"maxSizeBytes\":\"nsdfzpbgtgky\",\"serviceLevelObjective\":\"dgh\",\"elasticPoolName\":\"euutlwxezwzh\",\"creationDate\":\"2021-10-29T09:06Z\",\"deletionDate\":\"2021-09-18T08:14:23Z\",\"earliestRestoreDate\":\"2021-06-26T10:05:09Z\"}") - .toObject(RestorableDroppedSqlPoolProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RestorableDroppedSqlPoolProperties model = new RestorableDroppedSqlPoolProperties(); - model = BinaryData.fromObject(model).toObject(RestorableDroppedSqlPoolProperties.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/RestorableDroppedSqlPoolsGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/RestorableDroppedSqlPoolsGetWithResponseMockTests.java deleted file mode 100644 index e98229d869be1..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/RestorableDroppedSqlPoolsGetWithResponseMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.RestorableDroppedSqlPool; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class RestorableDroppedSqlPoolsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"location\":\"jyrkwfug\",\"properties\":{\"databaseName\":\"rrkuumnqd\",\"edition\":\"hz\",\"maxSizeBytes\":\"opueo\",\"serviceLevelObjective\":\"svwlujop\",\"elasticPoolName\":\"ibittoztjdqum\",\"creationDate\":\"2021-01-19T23:42:11Z\",\"deletionDate\":\"2021-05-21T17:58:08Z\",\"earliestRestoreDate\":\"2021-09-08T08:44:20Z\"},\"id\":\"ddtgctxegtvgwy\",\"name\":\"rbelfnzz\",\"type\":\"yizwbxgdebxla\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - RestorableDroppedSqlPool response = - manager - .restorableDroppedSqlPools() - .getWithResponse("doey", "fpnimtwuuhaueg", "kwmnfeub", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/RestorableDroppedSqlPoolsListByWorkspaceMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/RestorableDroppedSqlPoolsListByWorkspaceMockTests.java deleted file mode 100644 index 2da08ee4ac126..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/RestorableDroppedSqlPoolsListByWorkspaceMockTests.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.RestorableDroppedSqlPool; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class RestorableDroppedSqlPoolsListByWorkspaceMockTests { - @Test - public void testListByWorkspace() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"location\":\"benqlamwmg\",\"properties\":{\"databaseName\":\"yxflnbcpjstbh\",\"edition\":\"hcucsqsnx\",\"maxSizeBytes\":\"xufeapd\",\"serviceLevelObjective\":\"zyvbsuadulpodk\",\"elasticPoolName\":\"p\",\"creationDate\":\"2021-03-27T03:25:44Z\",\"deletionDate\":\"2021-07-26T00:19:22Z\",\"earliestRestoreDate\":\"2021-03-23T08:11:33Z\"},\"id\":\"hjdqltdeluqr\",\"name\":\"jadhfztl\",\"type\":\"aysrkgzky\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.restorableDroppedSqlPools().listByWorkspace("unomir", "p", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/RestorePointInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/RestorePointInnerTests.java deleted file mode 100644 index 026ecddc47a79..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/RestorePointInnerTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.RestorePointInner; - -public final class RestorePointInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RestorePointInner model = - BinaryData - .fromString( - "{\"location\":\"bpybsrfbjf\",\"properties\":{\"restorePointType\":\"CONTINUOUS\",\"earliestRestoreDate\":\"2021-01-25T00:48:06Z\",\"restorePointCreationDate\":\"2021-06-01T18:34:35Z\",\"restorePointLabel\":\"pvjzbe\"},\"id\":\"ilzznfqqnvwp\",\"name\":\"qtaruoujmkcjhwq\",\"type\":\"tjrybnwjewgdr\"}") - .toObject(RestorePointInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RestorePointInner model = new RestorePointInner(); - model = BinaryData.fromObject(model).toObject(RestorePointInner.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/RestorePointListResultTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/RestorePointListResultTests.java deleted file mode 100644 index b98539e3f4782..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/RestorePointListResultTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.RestorePointListResult; - -public final class RestorePointListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RestorePointListResult model = - BinaryData - .fromString( - "{\"value\":[{\"location\":\"xmedjvcsly\",\"properties\":{\"restorePointType\":\"DISCRETE\",\"earliestRestoreDate\":\"2021-06-18T01:03:59Z\",\"restorePointCreationDate\":\"2021-02-16T11:10:06Z\",\"restorePointLabel\":\"hxg\"},\"id\":\"trmgucnapkte\",\"name\":\"ellwptfdy\",\"type\":\"pfqbuaceopzf\"},{\"location\":\"hhuao\",\"properties\":{\"restorePointType\":\"CONTINUOUS\",\"earliestRestoreDate\":\"2021-06-20T04:26:50Z\",\"restorePointCreationDate\":\"2021-08-17T00:04:54Z\",\"restorePointLabel\":\"lzdahzxctobgbkdm\"},\"id\":\"izpost\",\"name\":\"grcfb\",\"type\":\"nrmfqjhhk\"},{\"location\":\"pvjymjhxxjyng\",\"properties\":{\"restorePointType\":\"CONTINUOUS\",\"earliestRestoreDate\":\"2021-03-03T06:08:52Z\",\"restorePointCreationDate\":\"2021-05-11T10:46:47Z\",\"restorePointLabel\":\"bxqz\"},\"id\":\"szjfauvjfdxxivet\",\"name\":\"t\",\"type\":\"qaqtdoqmcbxvwvxy\"},{\"location\":\"qbhsfxobl\",\"properties\":{\"restorePointType\":\"CONTINUOUS\",\"earliestRestoreDate\":\"2021-11-17T19:10:27Z\",\"restorePointCreationDate\":\"2021-08-02T07:01:05Z\",\"restorePointLabel\":\"wwfbkrvrnsvshq\"},\"id\":\"ohxcrsbfova\",\"name\":\"rruvwbhsq\",\"type\":\"sub\"}],\"nextLink\":\"jbi\"}") - .toObject(RestorePointListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RestorePointListResult model = new RestorePointListResult(); - model = BinaryData.fromObject(model).toObject(RestorePointListResult.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/RestorePointPropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/RestorePointPropertiesTests.java deleted file mode 100644 index 8f7d4fa945fdc..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/RestorePointPropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.RestorePointProperties; - -public final class RestorePointPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RestorePointProperties model = - BinaryData - .fromString( - "{\"restorePointType\":\"DISCRETE\",\"earliestRestoreDate\":\"2021-02-06T06:59:31Z\",\"restorePointCreationDate\":\"2021-09-18T13:17Z\",\"restorePointLabel\":\"qp\"}") - .toObject(RestorePointProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RestorePointProperties model = new RestorePointProperties(); - model = BinaryData.fromObject(model).toObject(RestorePointProperties.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SecretBaseTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SecretBaseTests.java deleted file mode 100644 index f2132036905bc..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SecretBaseTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.SecretBase; - -public final class SecretBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SecretBase model = BinaryData.fromString("{\"type\":\"SecretBase\"}").toObject(SecretBase.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SecretBase model = new SecretBase(); - model = BinaryData.fromObject(model).toObject(SecretBase.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SecureStringTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SecureStringTests.java deleted file mode 100644 index 19d8bc3043e5f..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SecureStringTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.SecureString; -import org.junit.jupiter.api.Assertions; - -public final class SecureStringTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SecureString model = - BinaryData.fromString("{\"type\":\"SecureString\",\"value\":\"ormcqmic\"}").toObject(SecureString.class); - Assertions.assertEquals("ormcqmic", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SecureString model = new SecureString().withValue("ormcqmic"); - model = BinaryData.fromObject(model).toObject(SecureString.class); - Assertions.assertEquals("ormcqmic", model.value()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SelfHostedIntegrationRuntimeNodeInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SelfHostedIntegrationRuntimeNodeInnerTests.java deleted file mode 100644 index fa55ca4577d43..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SelfHostedIntegrationRuntimeNodeInnerTests.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.core.util.serializer.JacksonAdapter; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.synapse.fluent.models.SelfHostedIntegrationRuntimeNodeInner; -import java.util.HashMap; -import java.util.Map; - -public final class SelfHostedIntegrationRuntimeNodeInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SelfHostedIntegrationRuntimeNodeInner model = - BinaryData - .fromString( - "{\"nodeName\":\"denxau\",\"machineName\":\"pakdkifmjnnawt\",\"hostServiceUri\":\"bpxuckpggqoweyi\",\"status\":\"Upgrading\",\"capabilities\":{\"wfl\":\"sn\",\"zruwn\":\"qmp\",\"iixtmkzj\":\"qxpxiwfcngjsaa\",\"irhgfgrwsdp\":\"kv\"},\"versionStatus\":\"atzv\",\"version\":\"glbyvi\",\"registerTime\":\"2021-05-26T01:46:31Z\",\"lastConnectTime\":\"2021-03-31T05:55:27Z\",\"expiryTime\":\"2021-10-06T10:18:17Z\",\"lastStartTime\":\"2021-07-31T12:16:42Z\",\"lastStopTime\":\"2021-01-04T19:12:22Z\",\"lastUpdateResult\":\"Succeed\",\"lastStartUpdateTime\":\"2021-04-03T23:49:09Z\",\"lastEndUpdateTime\":\"2021-12-06T00:37:58Z\",\"isActiveDispatcher\":false,\"concurrentJobsLimit\":1340920016,\"maxConcurrentJobs\":1977846106,\"\":{\"clnapxbiygnugjkn\":\"datazxwopdbydpizq\",\"oiquvrehmrnjhvs\":\"datasmfcttuxuuyilfl\"}}") - .toObject(SelfHostedIntegrationRuntimeNodeInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SelfHostedIntegrationRuntimeNodeInner model = - new SelfHostedIntegrationRuntimeNodeInner() - .withAdditionalProperties( - mapOf( - "nodeName", - "denxau", - "lastStartUpdateTime", - "2021-04-03T23:49:09Z", - "lastConnectTime", - "2021-03-31T05:55:27Z", - "capabilities", - JacksonAdapter - .createDefaultSerializerAdapter() - .deserialize( - "{\"wfl\":\"sn\",\"zruwn\":\"qmp\",\"iixtmkzj\":\"qxpxiwfcngjsaa\",\"irhgfgrwsdp\":\"kv\"}", - Object.class, - SerializerEncoding.JSON), - "hostServiceUri", - "bpxuckpggqoweyi", - "registerTime", - "2021-05-26T01:46:31Z", - "maxConcurrentJobs", - 1977846106, - "lastStopTime", - "2021-01-04T19:12:22Z", - "version", - "glbyvi", - "machineName", - "pakdkifmjnnawt", - "versionStatus", - "atzv", - "concurrentJobsLimit", - 1340920016, - "lastEndUpdateTime", - "2021-12-06T00:37:58Z", - "expiryTime", - "2021-10-06T10:18:17Z", - "lastStartTime", - "2021-07-31T12:16:42Z", - "lastUpdateResult", - "Succeed", - "isActiveDispatcher", - false, - "status", - "Upgrading")); - model = BinaryData.fromObject(model).toObject(SelfHostedIntegrationRuntimeNodeInner.class); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SelfHostedIntegrationRuntimeStatusTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SelfHostedIntegrationRuntimeStatusTests.java deleted file mode 100644 index ad823611728b6..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SelfHostedIntegrationRuntimeStatusTests.java +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.core.util.serializer.JacksonAdapter; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.synapse.fluent.models.SelfHostedIntegrationRuntimeNodeInner; -import com.azure.resourcemanager.synapse.models.LinkedIntegrationRuntime; -import com.azure.resourcemanager.synapse.models.SelfHostedIntegrationRuntimeStatus; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class SelfHostedIntegrationRuntimeStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SelfHostedIntegrationRuntimeStatus model = - BinaryData - .fromString( - "{\"type\":\"SelfHosted\",\"typeProperties\":{\"createTime\":\"2020-12-26T02:01:59Z\",\"taskQueueId\":\"nokzwjjz\",\"nodeCommunicationChannelEncryptionMode\":\"tixldzyyfytpqs\",\"internalChannelEncryption\":\"SslEncrypted\",\"version\":\"m\",\"nodes\":[{\"nodeName\":\"vyqlkjuvsmbmslzo\",\"machineName\":\"vwzdbpqvyb\",\"hostServiceUri\":\"gvmxnok\",\"status\":\"Offline\",\"capabilities\":{},\"versionStatus\":\"bse\",\"version\":\"vcuartrhun\",\"registerTime\":\"2021-10-23T09:44:51Z\",\"lastConnectTime\":\"2021-03-25T16:48:43Z\",\"expiryTime\":\"2021-01-17T22:26:54Z\",\"lastStartTime\":\"2021-09-25T18:28:14Z\",\"lastStopTime\":\"2021-08-08T22:57:09Z\",\"lastUpdateResult\":\"Fail\",\"lastStartUpdateTime\":\"2021-05-27T06:07:42Z\",\"lastEndUpdateTime\":\"2021-10-29T14:16:23Z\",\"isActiveDispatcher\":false,\"concurrentJobsLimit\":924088824,\"maxConcurrentJobs\":1327984375,\"\":{}},{\"nodeName\":\"wagltbxoeeonqlnf\",\"machineName\":\"y\",\"hostServiceUri\":\"vqdbpbhfck\",\"status\":\"Offline\",\"capabilities\":{},\"versionStatus\":\"rcssbzhddubbnq\",\"version\":\"lhkalehpavawugi\",\"registerTime\":\"2021-02-25T01:40:45Z\",\"lastConnectTime\":\"2021-04-01T19:27:08Z\",\"expiryTime\":\"2021-07-26T21:58:24Z\",\"lastStartTime\":\"2021-07-01T06:50:20Z\",\"lastStopTime\":\"2021-09-05T10:18:10Z\",\"lastUpdateResult\":\"Fail\",\"lastStartUpdateTime\":\"2021-05-05T10:06:38Z\",\"lastEndUpdateTime\":\"2021-08-05T18:56:25Z\",\"isActiveDispatcher\":false,\"concurrentJobsLimit\":495911185,\"maxConcurrentJobs\":1621846817,\"\":{}},{\"nodeName\":\"pnbonhpcz\",\"machineName\":\"mktp\",\"hostServiceUri\":\"xqcsehch\",\"status\":\"InitializeFailed\",\"capabilities\":{},\"versionStatus\":\"pqumqyjgydzulo\",\"version\":\"aeuzanh\",\"registerTime\":\"2021-11-19T22:08:29Z\",\"lastConnectTime\":\"2021-09-25T14:16:25Z\",\"expiryTime\":\"2021-09-07T18:47:04Z\",\"lastStartTime\":\"2020-12-23T17:30:48Z\",\"lastStopTime\":\"2021-07-07T19:48:07Z\",\"lastUpdateResult\":\"Fail\",\"lastStartUpdateTime\":\"2021-08-08T10:34:07Z\",\"lastEndUpdateTime\":\"2021-07-05T02:00:42Z\",\"isActiveDispatcher\":true,\"concurrentJobsLimit\":1809951616,\"maxConcurrentJobs\":1731697979,\"\":{}}],\"scheduledUpdateDate\":\"2020-12-23T03:00:17Z\",\"updateDelayOffset\":\"jufwbeqrkuorhtss\",\"localTimeZoneOffset\":\"qnmdvhazcvjy\",\"capabilities\":{\"txtd\":\"swbqerzwxi\",\"ktg\":\"ukvlb\",\"bewreswmowegmmut\":\"styoua\"},\"serviceUrls\":[\"eyguq\"],\"autoUpdate\":\"On\",\"versionStatus\":\"ii\",\"links\":[{\"name\":\"xlzdesygrijwa\",\"subscriptionId\":\"fanraybfu\",\"dataFactoryName\":\"frojsydgr\",\"dataFactoryLocation\":\"dkygywezski\",\"createTime\":\"2021-01-02T19:13:56Z\"},{\"name\":\"ygzmxieqvdsmak\",\"subscriptionId\":\"xq\",\"dataFactoryName\":\"hyhxa\",\"dataFactoryLocation\":\"bx\",\"createTime\":\"2021-08-24T02:30:22Z\"}],\"pushedVersion\":\"jpodtbl\",\"latestVersion\":\"kkwjdjodq\",\"autoUpdateETA\":\"2021-01-07T22:22:02Z\",\"serviceRegion\":\"ncn\",\"newerVersions\":[\"ehllizhceum\",\"qodkadppyibngql\",\"d\"],\"osType\":30824840,\"targetFramework\":1164247130},\"dataFactoryName\":\"yd\",\"state\":\"Stopped\",\"\":{\"nuyemlowuo\":\"dataadswz\",\"blgmokzkltrfowtd\":\"datahlxlnwyrmou\"}}") - .toObject(SelfHostedIntegrationRuntimeStatus.class); - Assertions.assertEquals("ncn", model.serviceRegion()); - Assertions.assertEquals("ehllizhceum", model.newerVersions().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SelfHostedIntegrationRuntimeStatus model = - new SelfHostedIntegrationRuntimeStatus() - .withNodes( - Arrays - .asList( - new SelfHostedIntegrationRuntimeNodeInner() - .withAdditionalProperties( - mapOf( - "nodeName", - "vyqlkjuvsmbmslzo", - "lastStartUpdateTime", - "2021-05-27T06:07:42Z", - "lastConnectTime", - "2021-03-25T16:48:43Z", - "capabilities", - JacksonAdapter - .createDefaultSerializerAdapter() - .deserialize("{}", Object.class, SerializerEncoding.JSON), - "hostServiceUri", - "gvmxnok", - "registerTime", - "2021-10-23T09:44:51Z", - "maxConcurrentJobs", - 1327984375, - "lastStopTime", - "2021-08-08T22:57:09Z", - "version", - "vcuartrhun", - "machineName", - "vwzdbpqvyb", - "versionStatus", - "bse", - "concurrentJobsLimit", - 924088824, - "lastEndUpdateTime", - "2021-10-29T14:16:23Z", - "expiryTime", - "2021-01-17T22:26:54Z", - "lastStartTime", - "2021-09-25T18:28:14Z", - "lastUpdateResult", - "Fail", - "isActiveDispatcher", - false, - "status", - "Offline")), - new SelfHostedIntegrationRuntimeNodeInner() - .withAdditionalProperties( - mapOf( - "nodeName", - "wagltbxoeeonqlnf", - "lastStartUpdateTime", - "2021-05-05T10:06:38Z", - "lastConnectTime", - "2021-04-01T19:27:08Z", - "capabilities", - JacksonAdapter - .createDefaultSerializerAdapter() - .deserialize("{}", Object.class, SerializerEncoding.JSON), - "hostServiceUri", - "vqdbpbhfck", - "registerTime", - "2021-02-25T01:40:45Z", - "maxConcurrentJobs", - 1621846817, - "lastStopTime", - "2021-09-05T10:18:10Z", - "version", - "lhkalehpavawugi", - "machineName", - "y", - "versionStatus", - "rcssbzhddubbnq", - "concurrentJobsLimit", - 495911185, - "lastEndUpdateTime", - "2021-08-05T18:56:25Z", - "expiryTime", - "2021-07-26T21:58:24Z", - "lastStartTime", - "2021-07-01T06:50:20Z", - "lastUpdateResult", - "Fail", - "isActiveDispatcher", - false, - "status", - "Offline")), - new SelfHostedIntegrationRuntimeNodeInner() - .withAdditionalProperties( - mapOf( - "nodeName", - "pnbonhpcz", - "lastStartUpdateTime", - "2021-08-08T10:34:07Z", - "lastConnectTime", - "2021-09-25T14:16:25Z", - "capabilities", - JacksonAdapter - .createDefaultSerializerAdapter() - .deserialize("{}", Object.class, SerializerEncoding.JSON), - "hostServiceUri", - "xqcsehch", - "registerTime", - "2021-11-19T22:08:29Z", - "maxConcurrentJobs", - 1731697979, - "lastStopTime", - "2021-07-07T19:48:07Z", - "version", - "aeuzanh", - "machineName", - "mktp", - "versionStatus", - "pqumqyjgydzulo", - "concurrentJobsLimit", - 1809951616, - "lastEndUpdateTime", - "2021-07-05T02:00:42Z", - "expiryTime", - "2021-09-07T18:47:04Z", - "lastStartTime", - "2020-12-23T17:30:48Z", - "lastUpdateResult", - "Fail", - "isActiveDispatcher", - true, - "status", - "InitializeFailed")))) - .withLinks(Arrays.asList(new LinkedIntegrationRuntime(), new LinkedIntegrationRuntime())) - .withServiceRegion("ncn") - .withNewerVersions(Arrays.asList("ehllizhceum", "qodkadppyibngql", "d")); - model = BinaryData.fromObject(model).toObject(SelfHostedIntegrationRuntimeStatus.class); - Assertions.assertEquals("ncn", model.serviceRegion()); - Assertions.assertEquals("ehllizhceum", model.newerVersions().get(0)); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SelfHostedIntegrationRuntimeStatusTypePropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SelfHostedIntegrationRuntimeStatusTypePropertiesTests.java deleted file mode 100644 index 18cb0fc4d4264..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SelfHostedIntegrationRuntimeStatusTypePropertiesTests.java +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.core.util.serializer.JacksonAdapter; -import com.azure.core.util.serializer.SerializerEncoding; -import com.azure.resourcemanager.synapse.fluent.models.SelfHostedIntegrationRuntimeNodeInner; -import com.azure.resourcemanager.synapse.fluent.models.SelfHostedIntegrationRuntimeStatusTypeProperties; -import com.azure.resourcemanager.synapse.models.LinkedIntegrationRuntime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class SelfHostedIntegrationRuntimeStatusTypePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SelfHostedIntegrationRuntimeStatusTypeProperties model = - BinaryData - .fromString( - "{\"createTime\":\"2021-08-26T18:49:19Z\",\"taskQueueId\":\"vlihcvjd\",\"nodeCommunicationChannelEncryptionMode\":\"crjidhftukv\",\"internalChannelEncryption\":\"NotSet\",\"version\":\"wyojbfqzdkfnjyi\",\"nodes\":[{\"nodeName\":\"ratqxmbjro\",\"machineName\":\"zznval\",\"hostServiceUri\":\"rhuzgfxonjtpu\",\"status\":\"Offline\",\"capabilities\":{\"tzbpdbollgry\":\"pvti\",\"c\":\"qiuasigrows\",\"kqevadrmmw\":\"equygdjboqgrmtq\",\"iidisczskoswoqiq\":\"uawvcmjzk\"},\"versionStatus\":\"ugam\",\"version\":\"krrcoiisbamnpp\",\"registerTime\":\"2021-02-16T12:39:32Z\",\"lastConnectTime\":\"2021-01-26T11:50:54Z\",\"expiryTime\":\"2021-06-25T00:19:43Z\",\"lastStartTime\":\"2021-07-04T11:10:13Z\",\"lastStopTime\":\"2021-01-07T18:31:11Z\",\"lastUpdateResult\":\"Succeed\",\"lastStartUpdateTime\":\"2021-10-12T09:23:03Z\",\"lastEndUpdateTime\":\"2021-06-30T10:07:15Z\",\"isActiveDispatcher\":true,\"concurrentJobsLimit\":844556330,\"maxConcurrentJobs\":1620840016,\"\":{\"rx\":\"datahnepkpeti\"}}],\"scheduledUpdateDate\":\"2021-11-06T16:28:06Z\",\"updateDelayOffset\":\"xdukecpxd\",\"localTimeZoneOffset\":\"v\",\"capabilities\":{\"dblnsntrp\":\"tmmkosz\",\"fmhklbnld\":\"aqkiofkb\",\"hez\":\"vcb\"},\"serviceUrls\":[\"wusqx\"],\"autoUpdate\":\"On\",\"versionStatus\":\"brruyuuatv\",\"links\":[{\"name\":\"wcolbmxl\",\"subscriptionId\":\"w\",\"dataFactoryName\":\"cpahprzrvxhm\",\"dataFactoryLocation\":\"hocn\",\"createTime\":\"2021-11-27T20:51:03Z\"},{\"name\":\"jhngxnoq\",\"subscriptionId\":\"tdisnjevhdlmyd\",\"dataFactoryName\":\"whepfww\",\"dataFactoryLocation\":\"f\",\"createTime\":\"2020-12-22T04:54:50Z\"},{\"name\":\"xxhmwcdbc\",\"subscriptionId\":\"oikxkxhnegk\",\"dataFactoryName\":\"z\",\"dataFactoryLocation\":\"h\",\"createTime\":\"2021-03-01T09:51:56Z\"}],\"pushedVersion\":\"lvukaobrlb\",\"latestVersion\":\"snbagnchjhg\",\"autoUpdateETA\":\"2021-04-12T07:19:34Z\",\"serviceRegion\":\"wakywalhjymxcgq\",\"newerVersions\":[\"drclssoljome\",\"tfy\",\"nlbvgjcodkk\"],\"osType\":712624970,\"targetFramework\":1951024208}") - .toObject(SelfHostedIntegrationRuntimeStatusTypeProperties.class); - Assertions.assertEquals("wakywalhjymxcgq", model.serviceRegion()); - Assertions.assertEquals("drclssoljome", model.newerVersions().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SelfHostedIntegrationRuntimeStatusTypeProperties model = - new SelfHostedIntegrationRuntimeStatusTypeProperties() - .withNodes( - Arrays - .asList( - new SelfHostedIntegrationRuntimeNodeInner() - .withAdditionalProperties( - mapOf( - "nodeName", - "ratqxmbjro", - "lastStartUpdateTime", - "2021-10-12T09:23:03Z", - "lastConnectTime", - "2021-01-26T11:50:54Z", - "capabilities", - JacksonAdapter - .createDefaultSerializerAdapter() - .deserialize( - "{\"tzbpdbollgry\":\"pvti\",\"c\":\"qiuasigrows\",\"kqevadrmmw\":\"equygdjboqgrmtq\",\"iidisczskoswoqiq\":\"uawvcmjzk\"}", - Object.class, - SerializerEncoding.JSON), - "hostServiceUri", - "rhuzgfxonjtpu", - "registerTime", - "2021-02-16T12:39:32Z", - "maxConcurrentJobs", - 1620840016, - "lastStopTime", - "2021-01-07T18:31:11Z", - "version", - "krrcoiisbamnpp", - "machineName", - "zznval", - "versionStatus", - "ugam", - "concurrentJobsLimit", - 844556330, - "lastEndUpdateTime", - "2021-06-30T10:07:15Z", - "expiryTime", - "2021-06-25T00:19:43Z", - "lastStartTime", - "2021-07-04T11:10:13Z", - "lastUpdateResult", - "Succeed", - "isActiveDispatcher", - true, - "status", - "Offline")))) - .withLinks( - Arrays - .asList( - new LinkedIntegrationRuntime(), - new LinkedIntegrationRuntime(), - new LinkedIntegrationRuntime())) - .withServiceRegion("wakywalhjymxcgq") - .withNewerVersions(Arrays.asList("drclssoljome", "tfy", "nlbvgjcodkk")); - model = BinaryData.fromObject(model).toObject(SelfHostedIntegrationRuntimeStatusTypeProperties.class); - Assertions.assertEquals("wakywalhjymxcgq", model.serviceRegion()); - Assertions.assertEquals("drclssoljome", model.newerVersions().get(0)); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SelfHostedIntegrationRuntimeTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SelfHostedIntegrationRuntimeTests.java deleted file mode 100644 index de90d24953d4c..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SelfHostedIntegrationRuntimeTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.LinkedIntegrationRuntimeType; -import com.azure.resourcemanager.synapse.models.SelfHostedIntegrationRuntime; -import org.junit.jupiter.api.Assertions; - -public final class SelfHostedIntegrationRuntimeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SelfHostedIntegrationRuntime model = - BinaryData - .fromString( - "{\"type\":\"SelfHosted\",\"typeProperties\":{\"linkedInfo\":{\"authorizationType\":\"LinkedIntegrationRuntimeType\"}},\"description\":\"txeqi\",\"\":{\"sfayorpravkjoges\":\"datazdyi\",\"wynqxaekqsykvwj\":\"dataabnsmj\",\"spxklu\":\"dataqpkevmyltjc\",\"ytzpo\":\"datacclfgxannn\"}}") - .toObject(SelfHostedIntegrationRuntime.class); - Assertions.assertEquals("txeqi", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SelfHostedIntegrationRuntime model = - new SelfHostedIntegrationRuntime() - .withDescription("txeqi") - .withLinkedInfo(new LinkedIntegrationRuntimeType()); - model = BinaryData.fromObject(model).toObject(SelfHostedIntegrationRuntime.class); - Assertions.assertEquals("txeqi", model.description()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SelfHostedIntegrationRuntimeTypePropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SelfHostedIntegrationRuntimeTypePropertiesTests.java deleted file mode 100644 index cf758012830c2..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SelfHostedIntegrationRuntimeTypePropertiesTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.SelfHostedIntegrationRuntimeTypeProperties; -import com.azure.resourcemanager.synapse.models.LinkedIntegrationRuntimeType; - -public final class SelfHostedIntegrationRuntimeTypePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SelfHostedIntegrationRuntimeTypeProperties model = - BinaryData - .fromString("{\"linkedInfo\":{\"authorizationType\":\"LinkedIntegrationRuntimeType\"}}") - .toObject(SelfHostedIntegrationRuntimeTypeProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SelfHostedIntegrationRuntimeTypeProperties model = - new SelfHostedIntegrationRuntimeTypeProperties().withLinkedInfo(new LinkedIntegrationRuntimeType()); - model = BinaryData.fromObject(model).toObject(SelfHostedIntegrationRuntimeTypeProperties.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SensitivityLabelInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SensitivityLabelInnerTests.java deleted file mode 100644 index c083a79f99c39..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SensitivityLabelInnerTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.SensitivityLabelInner; -import com.azure.resourcemanager.synapse.models.SensitivityLabelRank; -import org.junit.jupiter.api.Assertions; - -public final class SensitivityLabelInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SensitivityLabelInner model = - BinaryData - .fromString( - "{\"properties\":{\"schemaName\":\"odko\",\"tableName\":\"bw\",\"columnName\":\"jhemms\",\"labelName\":\"dkcrodt\",\"labelId\":\"nfwjlfltkacjvefk\",\"informationType\":\"foakgg\",\"informationTypeId\":\"pagao\",\"isDisabled\":true,\"rank\":\"None\"},\"managedBy\":\"blylsyxkqjnsj\",\"id\":\"r\",\"name\":\"tiagx\",\"type\":\"dszue\"}") - .toObject(SensitivityLabelInner.class); - Assertions.assertEquals("dkcrodt", model.labelName()); - Assertions.assertEquals("nfwjlfltkacjvefk", model.labelId()); - Assertions.assertEquals("foakgg", model.informationType()); - Assertions.assertEquals("pagao", model.informationTypeId()); - Assertions.assertEquals(SensitivityLabelRank.NONE, model.rank()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SensitivityLabelInner model = - new SensitivityLabelInner() - .withLabelName("dkcrodt") - .withLabelId("nfwjlfltkacjvefk") - .withInformationType("foakgg") - .withInformationTypeId("pagao") - .withRank(SensitivityLabelRank.NONE); - model = BinaryData.fromObject(model).toObject(SensitivityLabelInner.class); - Assertions.assertEquals("dkcrodt", model.labelName()); - Assertions.assertEquals("nfwjlfltkacjvefk", model.labelId()); - Assertions.assertEquals("foakgg", model.informationType()); - Assertions.assertEquals("pagao", model.informationTypeId()); - Assertions.assertEquals(SensitivityLabelRank.NONE, model.rank()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SensitivityLabelListResultTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SensitivityLabelListResultTests.java deleted file mode 100644 index 70da2178388ae..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SensitivityLabelListResultTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.SensitivityLabelListResult; - -public final class SensitivityLabelListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SensitivityLabelListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"schemaName\":\"irels\",\"tableName\":\"aenwabf\",\"columnName\":\"kl\",\"labelName\":\"xbjhwuaanozjosph\",\"labelId\":\"ulpjr\",\"informationType\":\"ag\",\"informationTypeId\":\"vimjwos\",\"isDisabled\":false,\"rank\":\"High\"},\"managedBy\":\"skfc\",\"id\":\"tq\",\"name\":\"miekkezzikhlyfjh\",\"type\":\"gqggebdunygae\"},{\"properties\":{\"schemaName\":\"bqfatpxllrxcyjmo\",\"tableName\":\"su\",\"columnName\":\"r\",\"labelName\":\"wdmjsjqbjhhyx\",\"labelId\":\"wlycoduhpkxkg\",\"informationType\":\"areqna\",\"informationTypeId\":\"qugjhkycube\",\"isDisabled\":false,\"rank\":\"High\"},\"managedBy\":\"fwqmzqalkrmn\",\"id\":\"i\",\"name\":\"pxacqqudfn\",\"type\":\"yxbaaabjyvayf\"},{\"properties\":{\"schemaName\":\"rzrtuzqogsex\",\"tableName\":\"vfdnwnwmewzsyyce\",\"columnName\":\"soibjudpfrx\",\"labelName\":\"thzvaytdwkqbrqu\",\"labelId\":\"axhexiilivp\",\"informationType\":\"iirqtd\",\"informationTypeId\":\"axoruzfgsquy\",\"isDisabled\":false,\"rank\":\"High\"},\"managedBy\":\"eptra\",\"id\":\"xje\",\"name\":\"wlwnwxuqlcv\",\"type\":\"dy\"}],\"nextLink\":\"tdooaoj\"}") - .toObject(SensitivityLabelListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SensitivityLabelListResult model = new SensitivityLabelListResult(); - model = BinaryData.fromObject(model).toObject(SensitivityLabelListResult.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SensitivityLabelPropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SensitivityLabelPropertiesTests.java deleted file mode 100644 index fa6c5b497efcb..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SensitivityLabelPropertiesTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.SensitivityLabelProperties; -import com.azure.resourcemanager.synapse.models.SensitivityLabelRank; -import org.junit.jupiter.api.Assertions; - -public final class SensitivityLabelPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SensitivityLabelProperties model = - BinaryData - .fromString( - "{\"schemaName\":\"sbzkf\",\"tableName\":\"eyvpnqicvinvkj\",\"columnName\":\"dxrbuukzcle\",\"labelName\":\"hmlwpaztzpo\",\"labelId\":\"cckwyfzqwhxxbu\",\"informationType\":\"a\",\"informationTypeId\":\"feqztppriol\",\"isDisabled\":true,\"rank\":\"High\"}") - .toObject(SensitivityLabelProperties.class); - Assertions.assertEquals("hmlwpaztzpo", model.labelName()); - Assertions.assertEquals("cckwyfzqwhxxbu", model.labelId()); - Assertions.assertEquals("a", model.informationType()); - Assertions.assertEquals("feqztppriol", model.informationTypeId()); - Assertions.assertEquals(SensitivityLabelRank.HIGH, model.rank()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SensitivityLabelProperties model = - new SensitivityLabelProperties() - .withLabelName("hmlwpaztzpo") - .withLabelId("cckwyfzqwhxxbu") - .withInformationType("a") - .withInformationTypeId("feqztppriol") - .withRank(SensitivityLabelRank.HIGH); - model = BinaryData.fromObject(model).toObject(SensitivityLabelProperties.class); - Assertions.assertEquals("hmlwpaztzpo", model.labelName()); - Assertions.assertEquals("cckwyfzqwhxxbu", model.labelId()); - Assertions.assertEquals("a", model.informationType()); - Assertions.assertEquals("feqztppriol", model.informationTypeId()); - Assertions.assertEquals(SensitivityLabelRank.HIGH, model.rank()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SensitivityLabelUpdateInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SensitivityLabelUpdateInnerTests.java deleted file mode 100644 index cae1227a35db9..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SensitivityLabelUpdateInnerTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.SensitivityLabelInner; -import com.azure.resourcemanager.synapse.fluent.models.SensitivityLabelUpdateInner; -import com.azure.resourcemanager.synapse.models.SensitivityLabelUpdateKind; -import org.junit.jupiter.api.Assertions; - -public final class SensitivityLabelUpdateInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SensitivityLabelUpdateInner model = - BinaryData - .fromString( - "{\"properties\":{\"op\":\"remove\",\"schema\":\"qouicybxarzgsz\",\"table\":\"foxciq\",\"column\":\"p\",\"sensitivityLabel\":{\"managedBy\":\"mciodhkhazxkhn\",\"id\":\"bon\",\"name\":\"wntoegokdwbwh\",\"type\":\"szzcmrvexztv\"}},\"id\":\"t\",\"name\":\"gsfraoyzkoow\",\"type\":\"lmnguxaw\"}") - .toObject(SensitivityLabelUpdateInner.class); - Assertions.assertEquals(SensitivityLabelUpdateKind.REMOVE, model.op()); - Assertions.assertEquals("qouicybxarzgsz", model.schema()); - Assertions.assertEquals("foxciq", model.table()); - Assertions.assertEquals("p", model.column()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SensitivityLabelUpdateInner model = - new SensitivityLabelUpdateInner() - .withOp(SensitivityLabelUpdateKind.REMOVE) - .withSchema("qouicybxarzgsz") - .withTable("foxciq") - .withColumn("p") - .withSensitivityLabel(new SensitivityLabelInner()); - model = BinaryData.fromObject(model).toObject(SensitivityLabelUpdateInner.class); - Assertions.assertEquals(SensitivityLabelUpdateKind.REMOVE, model.op()); - Assertions.assertEquals("qouicybxarzgsz", model.schema()); - Assertions.assertEquals("foxciq", model.table()); - Assertions.assertEquals("p", model.column()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SensitivityLabelUpdateListTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SensitivityLabelUpdateListTests.java deleted file mode 100644 index 887d2e45ea56b..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SensitivityLabelUpdateListTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.SensitivityLabelUpdateInner; -import com.azure.resourcemanager.synapse.models.SensitivityLabelUpdateKind; -import com.azure.resourcemanager.synapse.models.SensitivityLabelUpdateList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SensitivityLabelUpdateListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SensitivityLabelUpdateList model = - BinaryData - .fromString( - "{\"operations\":[{\"properties\":{\"op\":\"set\",\"schema\":\"mncwsobqwcsdb\",\"table\":\"wdcfhucqdpfuv\",\"column\":\"lsbjjcanvxbv\"},\"id\":\"udutnco\",\"name\":\"mr\",\"type\":\"xqtvcofu\"},{\"properties\":{\"op\":\"set\",\"schema\":\"vkg\",\"table\":\"u\",\"column\":\"gdknnqv\"},\"id\":\"znqntoru\",\"name\":\"sgsahmkycgr\",\"type\":\"uwjuetaeburuvdmo\"},{\"properties\":{\"op\":\"set\",\"schema\":\"zlxwabmqoefkifr\",\"table\":\"tpuqujmq\",\"column\":\"gkfbtndoaong\"},\"id\":\"cn\",\"name\":\"ujitcjedftww\",\"type\":\"ezkojvdcp\"}]}") - .toObject(SensitivityLabelUpdateList.class); - Assertions.assertEquals(SensitivityLabelUpdateKind.SET, model.operations().get(0).op()); - Assertions.assertEquals("mncwsobqwcsdb", model.operations().get(0).schema()); - Assertions.assertEquals("wdcfhucqdpfuv", model.operations().get(0).table()); - Assertions.assertEquals("lsbjjcanvxbv", model.operations().get(0).column()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SensitivityLabelUpdateList model = - new SensitivityLabelUpdateList() - .withOperations( - Arrays - .asList( - new SensitivityLabelUpdateInner() - .withOp(SensitivityLabelUpdateKind.SET) - .withSchema("mncwsobqwcsdb") - .withTable("wdcfhucqdpfuv") - .withColumn("lsbjjcanvxbv"), - new SensitivityLabelUpdateInner() - .withOp(SensitivityLabelUpdateKind.SET) - .withSchema("vkg") - .withTable("u") - .withColumn("gdknnqv"), - new SensitivityLabelUpdateInner() - .withOp(SensitivityLabelUpdateKind.SET) - .withSchema("zlxwabmqoefkifr") - .withTable("tpuqujmq") - .withColumn("gkfbtndoaong"))); - model = BinaryData.fromObject(model).toObject(SensitivityLabelUpdateList.class); - Assertions.assertEquals(SensitivityLabelUpdateKind.SET, model.operations().get(0).op()); - Assertions.assertEquals("mncwsobqwcsdb", model.operations().get(0).schema()); - Assertions.assertEquals("wdcfhucqdpfuv", model.operations().get(0).table()); - Assertions.assertEquals("lsbjjcanvxbv", model.operations().get(0).column()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SensitivityLabelUpdatePropertiesInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SensitivityLabelUpdatePropertiesInnerTests.java deleted file mode 100644 index 26c8dd02815bf..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SensitivityLabelUpdatePropertiesInnerTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.SensitivityLabelInner; -import com.azure.resourcemanager.synapse.fluent.models.SensitivityLabelUpdatePropertiesInner; -import com.azure.resourcemanager.synapse.models.SensitivityLabelRank; -import com.azure.resourcemanager.synapse.models.SensitivityLabelUpdateKind; -import org.junit.jupiter.api.Assertions; - -public final class SensitivityLabelUpdatePropertiesInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SensitivityLabelUpdatePropertiesInner model = - BinaryData - .fromString( - "{\"op\":\"set\",\"schema\":\"ldsyuuximerqfob\",\"table\":\"yznkby\",\"column\":\"utwpfhp\",\"sensitivityLabel\":{\"properties\":{\"schemaName\":\"r\",\"tableName\":\"dsnfdsdoakgtdl\",\"columnName\":\"kzevdlhewpusds\",\"labelName\":\"wvogvbbejdc\",\"labelId\":\"qqmoaku\",\"informationType\":\"m\",\"informationTypeId\":\"rwr\",\"isDisabled\":true,\"rank\":\"Critical\"},\"managedBy\":\"enuuzkopbm\",\"id\":\"nrfdw\",\"name\":\"yuhhziu\",\"type\":\"efozbhdms\"}}") - .toObject(SensitivityLabelUpdatePropertiesInner.class); - Assertions.assertEquals(SensitivityLabelUpdateKind.SET, model.op()); - Assertions.assertEquals("ldsyuuximerqfob", model.schema()); - Assertions.assertEquals("yznkby", model.table()); - Assertions.assertEquals("utwpfhp", model.column()); - Assertions.assertEquals("wvogvbbejdc", model.sensitivityLabel().labelName()); - Assertions.assertEquals("qqmoaku", model.sensitivityLabel().labelId()); - Assertions.assertEquals("m", model.sensitivityLabel().informationType()); - Assertions.assertEquals("rwr", model.sensitivityLabel().informationTypeId()); - Assertions.assertEquals(SensitivityLabelRank.CRITICAL, model.sensitivityLabel().rank()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SensitivityLabelUpdatePropertiesInner model = - new SensitivityLabelUpdatePropertiesInner() - .withOp(SensitivityLabelUpdateKind.SET) - .withSchema("ldsyuuximerqfob") - .withTable("yznkby") - .withColumn("utwpfhp") - .withSensitivityLabel( - new SensitivityLabelInner() - .withLabelName("wvogvbbejdc") - .withLabelId("qqmoaku") - .withInformationType("m") - .withInformationTypeId("rwr") - .withRank(SensitivityLabelRank.CRITICAL)); - model = BinaryData.fromObject(model).toObject(SensitivityLabelUpdatePropertiesInner.class); - Assertions.assertEquals(SensitivityLabelUpdateKind.SET, model.op()); - Assertions.assertEquals("ldsyuuximerqfob", model.schema()); - Assertions.assertEquals("yznkby", model.table()); - Assertions.assertEquals("utwpfhp", model.column()); - Assertions.assertEquals("wvogvbbejdc", model.sensitivityLabel().labelName()); - Assertions.assertEquals("qqmoaku", model.sensitivityLabel().labelId()); - Assertions.assertEquals("m", model.sensitivityLabel().informationType()); - Assertions.assertEquals("rwr", model.sensitivityLabel().informationTypeId()); - Assertions.assertEquals(SensitivityLabelRank.CRITICAL, model.sensitivityLabel().rank()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ServerUsageInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ServerUsageInnerTests.java deleted file mode 100644 index 053ac498369b8..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ServerUsageInnerTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.ServerUsageInner; - -public final class ServerUsageInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServerUsageInner model = - BinaryData - .fromString( - "{\"name\":\"cojocqwogfnzjvus\",\"resourceName\":\"ld\",\"displayName\":\"zuxylfsbtkadpyso\",\"currentValue\":86.65607552642484,\"limit\":7.676130945689518,\"unit\":\"grjqctojcmi\",\"nextResetTime\":\"2021-11-09T20:08:20Z\"}") - .toObject(ServerUsageInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServerUsageInner model = new ServerUsageInner(); - model = BinaryData.fromObject(model).toObject(ServerUsageInner.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ServerUsageListResultTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ServerUsageListResultTests.java deleted file mode 100644 index f831e34acdd80..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/ServerUsageListResultTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.ServerUsageInner; -import com.azure.resourcemanager.synapse.models.ServerUsageListResult; -import java.util.Arrays; - -public final class ServerUsageListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServerUsageListResult model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"tdhlfkqo\",\"resourceName\":\"ykvgtrdcnifmz\",\"displayName\":\"dymbrny\",\"currentValue\":46.451447996054554,\"limit\":83.52714933447804,\"unit\":\"wgck\",\"nextResetTime\":\"2021-10-29T18:48:32Z\"},{\"name\":\"vdff\",\"resourceName\":\"afqr\",\"displayName\":\"daspavehhrvk\",\"currentValue\":1.1838483598822447,\"limit\":42.47072653885069,\"unit\":\"hcxgkmoyx\",\"nextResetTime\":\"2021-01-10T03:49:41Z\"},{\"name\":\"ibhmfdn\",\"resourceName\":\"ydvfvfcjnae\",\"displayName\":\"srvhmgorffuki\",\"currentValue\":94.64225623949771,\"limit\":84.35615092688725,\"unit\":\"plef\",\"nextResetTime\":\"2021-07-03T18:39:05Z\"},{\"name\":\"ilcbtgnhnzeyqxtj\",\"resourceName\":\"zqlqhyc\",\"displayName\":\"odggx\",\"currentValue\":8.822766264266713,\"limit\":65.97138391291614,\"unit\":\"knlrariaawiuagy\",\"nextResetTime\":\"2021-09-15T12:14:34Z\"}],\"nextLink\":\"bylyrfgia\"}") - .toObject(ServerUsageListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServerUsageListResult model = - new ServerUsageListResult() - .withValue( - Arrays - .asList( - new ServerUsageInner(), - new ServerUsageInner(), - new ServerUsageInner(), - new ServerUsageInner())); - model = BinaryData.fromObject(model).toObject(ServerUsageListResult.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SkuDescriptionInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SkuDescriptionInnerTests.java deleted file mode 100644 index 305a5dbf0e682..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SkuDescriptionInnerTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.SkuDescriptionInner; - -public final class SkuDescriptionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SkuDescriptionInner model = - BinaryData - .fromString( - "{\"resourceType\":\"jvlgfggcvkyyliz\",\"name\":\"bjpsfxsfuztlvtm\",\"size\":\"gbwidqlvh\",\"locations\":[\"veo\",\"i\",\"rvjfnmjmvlw\",\"z\"],\"locationInfo\":[{\"location\":\"lkujrllfojui\",\"zones\":[\"uuyjucejikz\",\"eovvtzej\",\"tjklntikyjuzk\"]},{\"location\":\"bqzolxr\",\"zones\":[\"qjwt\",\"htgv\",\"zpcrrkolawj\"]},{\"location\":\"jsmwrokc\",\"zones\":[\"zzzwy\",\"afitlhguynuchlg\",\"ltxdwhmozu\",\"gzvlnsnn\"]},{\"location\":\"zfpafolpymwamxqz\",\"zones\":[\"p\",\"dphtv\",\"ulajvlejchc\",\"rlzk\"]}],\"restrictions\":[\"datalanrupdwvnp\",\"datacnzqtpjhmqr\",\"datav\",\"datahlaiwd\"]}") - .toObject(SkuDescriptionInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuDescriptionInner model = new SkuDescriptionInner(); - model = BinaryData.fromObject(model).toObject(SkuDescriptionInner.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SkuDescriptionListTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SkuDescriptionListTests.java deleted file mode 100644 index d2c3b9ffa95a8..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SkuDescriptionListTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.SkuDescriptionList; - -public final class SkuDescriptionListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SkuDescriptionList model = - BinaryData - .fromString( - "{\"value\":[{\"resourceType\":\"zlwhhmemhooclu\",\"name\":\"pqmem\",\"size\":\"jk\",\"locations\":[\"kyujxsglhsrrr\",\"ejylmbkzu\"],\"locationInfo\":[],\"restrictions\":[\"datafihotj\"]},{\"resourceType\":\"lpxuzzjgnrefq\",\"name\":\"qotoihiqakydiwfb\",\"size\":\"wpzdqtvhcspo\",\"locations\":[\"axsipietgb\",\"bjfu\",\"bmoichd\",\"pnfpubntnbat\"],\"locationInfo\":[],\"restrictions\":[\"dataowsaaelcattcjuh\",\"datalrvkmjc\"]}]}") - .toObject(SkuDescriptionList.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuDescriptionList model = new SkuDescriptionList(); - model = BinaryData.fromObject(model).toObject(SkuDescriptionList.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SkuLocationInfoItemTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SkuLocationInfoItemTests.java deleted file mode 100644 index cecce4be835b8..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SkuLocationInfoItemTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.SkuLocationInfoItem; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SkuLocationInfoItemTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SkuLocationInfoItem model = - BinaryData - .fromString("{\"location\":\"xsmlz\",\"zones\":[\"dtxetlgydlh\",\"vlnnpx\",\"b\"]}") - .toObject(SkuLocationInfoItem.class); - Assertions.assertEquals("xsmlz", model.location()); - Assertions.assertEquals("dtxetlgydlh", model.zones().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SkuLocationInfoItem model = - new SkuLocationInfoItem().withLocation("xsmlz").withZones(Arrays.asList("dtxetlgydlh", "vlnnpx", "b")); - model = BinaryData.fromObject(model).toObject(SkuLocationInfoItem.class); - Assertions.assertEquals("xsmlz", model.location()); - Assertions.assertEquals("dtxetlgydlh", model.zones().get(0)); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SkuTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SkuTests.java deleted file mode 100644 index 083df91469efc..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SkuTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.Sku; -import org.junit.jupiter.api.Assertions; - -public final class SkuTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Sku model = - BinaryData - .fromString("{\"tier\":\"spnqzahmgkb\",\"name\":\"yydhibnuqqk\",\"capacity\":1850827957}") - .toObject(Sku.class); - Assertions.assertEquals("spnqzahmgkb", model.tier()); - Assertions.assertEquals("yydhibnuqqk", model.name()); - Assertions.assertEquals(1850827957, model.capacity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Sku model = new Sku().withTier("spnqzahmgkb").withName("yydhibnuqqk").withCapacity(1850827957); - model = BinaryData.fromObject(model).toObject(Sku.class); - Assertions.assertEquals("spnqzahmgkb", model.tier()); - Assertions.assertEquals("yydhibnuqqk", model.name()); - Assertions.assertEquals(1850827957, model.capacity()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SparkConfigPropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SparkConfigPropertiesTests.java deleted file mode 100644 index 43eeedb3ccdc1..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SparkConfigPropertiesTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.ConfigurationType; -import com.azure.resourcemanager.synapse.models.SparkConfigProperties; -import org.junit.jupiter.api.Assertions; - -public final class SparkConfigPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SparkConfigProperties model = - BinaryData - .fromString( - "{\"time\":\"2021-10-16T17:09:06Z\",\"content\":\"tmzlbiojlv\",\"filename\":\"rbbpneqvcwwyy\",\"configurationType\":\"Artifact\"}") - .toObject(SparkConfigProperties.class); - Assertions.assertEquals("tmzlbiojlv", model.content()); - Assertions.assertEquals("rbbpneqvcwwyy", model.filename()); - Assertions.assertEquals(ConfigurationType.ARTIFACT, model.configurationType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SparkConfigProperties model = - new SparkConfigProperties() - .withContent("tmzlbiojlv") - .withFilename("rbbpneqvcwwyy") - .withConfigurationType(ConfigurationType.ARTIFACT); - model = BinaryData.fromObject(model).toObject(SparkConfigProperties.class); - Assertions.assertEquals("tmzlbiojlv", model.content()); - Assertions.assertEquals("rbbpneqvcwwyy", model.filename()); - Assertions.assertEquals(ConfigurationType.ARTIFACT, model.configurationType()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SparkConfigurationInfoTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SparkConfigurationInfoTests.java deleted file mode 100644 index f1c2e891a65ee..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SparkConfigurationInfoTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.SparkConfigurationInfo; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class SparkConfigurationInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SparkConfigurationInfo model = - BinaryData - .fromString( - "{\"description\":\"enuygbq\",\"configs\":{\"guaucmfdjwnla\":\"qekewvnqvcd\",\"ikczvvitacgxmf\":\"punj\",\"sjgqrsxyp\":\"sserxhtvsoxhlwn\",\"yuel\":\"uuuybnchrsziz\"},\"annotations\":[\"ndnbfqy\"],\"notes\":\"agfl\",\"createdBy\":\"gm\",\"created\":\"2021-02-22T20:12:59Z\",\"configMergeRule\":{\"pigqfusuckzmkw\":\"zjmucftbyrplroh\",\"jnhgwydyyn\":\"lsnoxaxmqeqalh\",\"ta\":\"svkhgbv\"}}") - .toObject(SparkConfigurationInfo.class); - Assertions.assertEquals("enuygbq", model.description()); - Assertions.assertEquals("qekewvnqvcd", model.configs().get("guaucmfdjwnla")); - Assertions.assertEquals("ndnbfqy", model.annotations().get(0)); - Assertions.assertEquals("agfl", model.notes()); - Assertions.assertEquals("gm", model.createdBy()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-22T20:12:59Z"), model.created()); - Assertions.assertEquals("zjmucftbyrplroh", model.configMergeRule().get("pigqfusuckzmkw")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SparkConfigurationInfo model = - new SparkConfigurationInfo() - .withDescription("enuygbq") - .withConfigs( - mapOf( - "guaucmfdjwnla", - "qekewvnqvcd", - "ikczvvitacgxmf", - "punj", - "sjgqrsxyp", - "sserxhtvsoxhlwn", - "yuel", - "uuuybnchrsziz")) - .withAnnotations(Arrays.asList("ndnbfqy")) - .withNotes("agfl") - .withCreatedBy("gm") - .withCreated(OffsetDateTime.parse("2021-02-22T20:12:59Z")) - .withConfigMergeRule( - mapOf("pigqfusuckzmkw", "zjmucftbyrplroh", "jnhgwydyyn", "lsnoxaxmqeqalh", "ta", "svkhgbv")); - model = BinaryData.fromObject(model).toObject(SparkConfigurationInfo.class); - Assertions.assertEquals("enuygbq", model.description()); - Assertions.assertEquals("qekewvnqvcd", model.configs().get("guaucmfdjwnla")); - Assertions.assertEquals("ndnbfqy", model.annotations().get(0)); - Assertions.assertEquals("agfl", model.notes()); - Assertions.assertEquals("gm", model.createdBy()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-22T20:12:59Z"), model.created()); - Assertions.assertEquals("zjmucftbyrplroh", model.configMergeRule().get("pigqfusuckzmkw")); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SparkConfigurationListResponseTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SparkConfigurationListResponseTests.java deleted file mode 100644 index 6694ea3e1c050..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SparkConfigurationListResponseTests.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.SparkConfigurationResourceInner; -import com.azure.resourcemanager.synapse.models.SparkConfigurationListResponse; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class SparkConfigurationListResponseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SparkConfigurationListResponse model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"description\":\"fdlpukhpyr\",\"configs\":{},\"annotations\":[],\"notes\":\"zjcpeogk\",\"createdBy\":\"mgbro\",\"created\":\"2021-10-26T06:11:35Z\",\"configMergeRule\":{}},\"etag\":\"hfhpfp\",\"id\":\"zjzoywjxhpdul\",\"name\":\"ntacn\",\"type\":\"qwtehtuevr\"},{\"properties\":{\"description\":\"ljyoogwx\",\"configs\":{},\"annotations\":[],\"notes\":\"duugwbsre\",\"createdBy\":\"fqkfuarenl\",\"created\":\"2021-11-15T21:51:51Z\",\"configMergeRule\":{}},\"etag\":\"lnvnafvvkyfedev\",\"id\":\"bo\",\"name\":\"lcqxypokk\",\"type\":\"minqcym\"},{\"properties\":{\"description\":\"ngnbdxxew\",\"configs\":{},\"annotations\":[],\"notes\":\"nvudbchaqdtvqecr\",\"createdBy\":\"tmxxdtddmflhuy\",\"created\":\"2021-10-16T00:35:13Z\",\"configMergeRule\":{}},\"etag\":\"zna\",\"id\":\"xbannovvoxc\",\"name\":\"ytprwnwvroev\",\"type\":\"tlyo\"},{\"properties\":{\"description\":\"rrouuxvnsasbcry\",\"configs\":{},\"annotations\":[],\"notes\":\"izrxklob\",\"createdBy\":\"nazpmk\",\"created\":\"2021-01-20T07:51:57Z\",\"configMergeRule\":{}},\"etag\":\"vfxzopjh\",\"id\":\"zxlioh\",\"name\":\"d\",\"type\":\"dtfgxqbawpcbb\"}],\"nextLink\":\"qcy\"}") - .toObject(SparkConfigurationListResponse.class); - Assertions.assertEquals("fdlpukhpyr", model.value().get(0).description()); - Assertions.assertEquals("zjcpeogk", model.value().get(0).notes()); - Assertions.assertEquals("mgbro", model.value().get(0).createdBy()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-26T06:11:35Z"), model.value().get(0).created()); - Assertions.assertEquals("qcy", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SparkConfigurationListResponse model = - new SparkConfigurationListResponse() - .withValue( - Arrays - .asList( - new SparkConfigurationResourceInner() - .withDescription("fdlpukhpyr") - .withConfigs(mapOf()) - .withAnnotations(Arrays.asList()) - .withNotes("zjcpeogk") - .withCreatedBy("mgbro") - .withCreated(OffsetDateTime.parse("2021-10-26T06:11:35Z")) - .withConfigMergeRule(mapOf()), - new SparkConfigurationResourceInner() - .withDescription("ljyoogwx") - .withConfigs(mapOf()) - .withAnnotations(Arrays.asList()) - .withNotes("duugwbsre") - .withCreatedBy("fqkfuarenl") - .withCreated(OffsetDateTime.parse("2021-11-15T21:51:51Z")) - .withConfigMergeRule(mapOf()), - new SparkConfigurationResourceInner() - .withDescription("ngnbdxxew") - .withConfigs(mapOf()) - .withAnnotations(Arrays.asList()) - .withNotes("nvudbchaqdtvqecr") - .withCreatedBy("tmxxdtddmflhuy") - .withCreated(OffsetDateTime.parse("2021-10-16T00:35:13Z")) - .withConfigMergeRule(mapOf()), - new SparkConfigurationResourceInner() - .withDescription("rrouuxvnsasbcry") - .withConfigs(mapOf()) - .withAnnotations(Arrays.asList()) - .withNotes("izrxklob") - .withCreatedBy("nazpmk") - .withCreated(OffsetDateTime.parse("2021-01-20T07:51:57Z")) - .withConfigMergeRule(mapOf()))) - .withNextLink("qcy"); - model = BinaryData.fromObject(model).toObject(SparkConfigurationListResponse.class); - Assertions.assertEquals("fdlpukhpyr", model.value().get(0).description()); - Assertions.assertEquals("zjcpeogk", model.value().get(0).notes()); - Assertions.assertEquals("mgbro", model.value().get(0).createdBy()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-26T06:11:35Z"), model.value().get(0).created()); - Assertions.assertEquals("qcy", model.nextLink()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SparkConfigurationResourceInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SparkConfigurationResourceInnerTests.java deleted file mode 100644 index 9a69049b7ca02..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SparkConfigurationResourceInnerTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.SparkConfigurationResourceInner; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class SparkConfigurationResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SparkConfigurationResourceInner model = - BinaryData - .fromString( - "{\"properties\":{\"description\":\"qzeqyjleziunjxdf\",\"configs\":{\"mlbnseq\":\"ntkwcegy\",\"m\":\"cjjvpilguooqja\",\"hrtdtpdelq\":\"itgueiookjbs\",\"vcjkgd\":\"cslmotoebnfxo\"},\"annotations\":[\"zft\",\"ejwabmdujtmvco\",\"excmjurbuhhl\",\"yqltqsro\"],\"notes\":\"uwkffdjktsysid\",\"createdBy\":\"c\",\"created\":\"2021-11-11T21:46:56Z\",\"configMergeRule\":{\"ogsf\":\"fuijtkbus\"}},\"etag\":\"ayiansharujtji\",\"id\":\"xfz\",\"name\":\"j\",\"type\":\"ttvwkpqh\"}") - .toObject(SparkConfigurationResourceInner.class); - Assertions.assertEquals("qzeqyjleziunjxdf", model.description()); - Assertions.assertEquals("ntkwcegy", model.configs().get("mlbnseq")); - Assertions.assertEquals("zft", model.annotations().get(0)); - Assertions.assertEquals("uwkffdjktsysid", model.notes()); - Assertions.assertEquals("c", model.createdBy()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-11T21:46:56Z"), model.created()); - Assertions.assertEquals("fuijtkbus", model.configMergeRule().get("ogsf")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SparkConfigurationResourceInner model = - new SparkConfigurationResourceInner() - .withDescription("qzeqyjleziunjxdf") - .withConfigs( - mapOf( - "mlbnseq", - "ntkwcegy", - "m", - "cjjvpilguooqja", - "hrtdtpdelq", - "itgueiookjbs", - "vcjkgd", - "cslmotoebnfxo")) - .withAnnotations(Arrays.asList("zft", "ejwabmdujtmvco", "excmjurbuhhl", "yqltqsro")) - .withNotes("uwkffdjktsysid") - .withCreatedBy("c") - .withCreated(OffsetDateTime.parse("2021-11-11T21:46:56Z")) - .withConfigMergeRule(mapOf("ogsf", "fuijtkbus")); - model = BinaryData.fromObject(model).toObject(SparkConfigurationResourceInner.class); - Assertions.assertEquals("qzeqyjleziunjxdf", model.description()); - Assertions.assertEquals("ntkwcegy", model.configs().get("mlbnseq")); - Assertions.assertEquals("zft", model.annotations().get(0)); - Assertions.assertEquals("uwkffdjktsysid", model.notes()); - Assertions.assertEquals("c", model.createdBy()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-11T21:46:56Z"), model.created()); - Assertions.assertEquals("fuijtkbus", model.configMergeRule().get("ogsf")); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SparkConfigurationsGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SparkConfigurationsGetWithResponseMockTests.java deleted file mode 100644 index 31cdc2c0b6967..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SparkConfigurationsGetWithResponseMockTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.SparkConfigurationResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SparkConfigurationsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"description\":\"vavucg\",\"configs\":{\"qpmnu\":\"ua\",\"wuzdmh\":\"zhrchx\"},\"annotations\":[\"vivjm\",\"mlitqdsj\"],\"notes\":\"dvisco\",\"createdBy\":\"xbriifefn\",\"created\":\"2021-04-05T15:00:08Z\",\"configMergeRule\":{\"eailwdqmqf\":\"qoemwsi\",\"kd\":\"deotmfx\",\"gnamkuuyiu\":\"g\",\"hdcfm\":\"uafixlxicwgp\"}},\"etag\":\"cfasfodropal\",\"id\":\"ngtwyuskwgq\",\"name\":\"ntaumd\",\"type\":\"cjlvkrkegtyc\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SparkConfigurationResource response = - manager - .sparkConfigurations() - .getWithResponse("tonvhgnhtmeplhb", "jba", "mumm", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("vavucg", response.description()); - Assertions.assertEquals("ua", response.configs().get("qpmnu")); - Assertions.assertEquals("vivjm", response.annotations().get(0)); - Assertions.assertEquals("dvisco", response.notes()); - Assertions.assertEquals("xbriifefn", response.createdBy()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-05T15:00:08Z"), response.created()); - Assertions.assertEquals("qoemwsi", response.configMergeRule().get("eailwdqmqf")); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SparkConfigurationsOperationsListByWorkspaceMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SparkConfigurationsOperationsListByWorkspaceMockTests.java deleted file mode 100644 index 37894ee25a9f9..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SparkConfigurationsOperationsListByWorkspaceMockTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.SparkConfigurationResource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SparkConfigurationsOperationsListByWorkspaceMockTests { - @Test - public void testListByWorkspace() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"description\":\"abm\",\"configs\":{\"xduetbapfc\":\"s\",\"bpxya\":\"ewxtrl\",\"yegbthms\":\"kjpirgzxvbczw\"},\"annotations\":[\"jbuiggru\",\"ozfvualjt\",\"oivsdwsngkrf\"],\"notes\":\"sc\",\"createdBy\":\"akmhz\",\"created\":\"2021-01-22T22:10:09Z\",\"configMergeRule\":{\"nnx\":\"fbwih\"}},\"etag\":\"vynuqqkotauratn\",\"id\":\"cppfzsclefyrle\",\"name\":\"ndqlmfdggnbbuy\",\"type\":\"wovvv\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .sparkConfigurationsOperations() - .listByWorkspace("uppiyxlzm", "yddeeqz", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("abm", response.iterator().next().description()); - Assertions.assertEquals("s", response.iterator().next().configs().get("xduetbapfc")); - Assertions.assertEquals("jbuiggru", response.iterator().next().annotations().get(0)); - Assertions.assertEquals("sc", response.iterator().next().notes()); - Assertions.assertEquals("akmhz", response.iterator().next().createdBy()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-22T22:10:09Z"), response.iterator().next().created()); - Assertions.assertEquals("fbwih", response.iterator().next().configMergeRule().get("nnx")); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolColumnInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolColumnInnerTests.java deleted file mode 100644 index a06516f914dad..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolColumnInnerTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.SqlPoolColumnInner; -import com.azure.resourcemanager.synapse.models.ColumnDataType; -import org.junit.jupiter.api.Assertions; - -public final class SqlPoolColumnInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SqlPoolColumnInner model = - BinaryData - .fromString( - "{\"properties\":{\"columnType\":\"uniqueidentifier\",\"isComputed\":true},\"id\":\"hftqsxhqxujxukn\",\"name\":\"xdigrjg\",\"type\":\"ufzdmsyq\"}") - .toObject(SqlPoolColumnInner.class); - Assertions.assertEquals(ColumnDataType.UNIQUEIDENTIFIER, model.columnType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SqlPoolColumnInner model = new SqlPoolColumnInner().withColumnType(ColumnDataType.UNIQUEIDENTIFIER); - model = BinaryData.fromObject(model).toObject(SqlPoolColumnInner.class); - Assertions.assertEquals(ColumnDataType.UNIQUEIDENTIFIER, model.columnType()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolColumnListResultTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolColumnListResultTests.java deleted file mode 100644 index 59177fbe4c970..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolColumnListResultTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.SqlPoolColumnListResult; - -public final class SqlPoolColumnListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SqlPoolColumnListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"columnType\":\"date\",\"isComputed\":false},\"id\":\"rmbzo\",\"name\":\"okixrjqcir\",\"type\":\"zpfrla\"},{\"properties\":{\"columnType\":\"bit\",\"isComputed\":false},\"id\":\"oiindfpwpjy\",\"name\":\"wbtlhflsjcdh\",\"type\":\"zfjvfbgofe\"},{\"properties\":{\"columnType\":\"image\",\"isComputed\":true},\"id\":\"mqhldvrii\",\"name\":\"ojnal\",\"type\":\"hfkvtvsexsowuel\"}],\"nextLink\":\"hhahhxvrhmzkwpjg\"}") - .toObject(SqlPoolColumnListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SqlPoolColumnListResult model = new SqlPoolColumnListResult(); - model = BinaryData.fromObject(model).toObject(SqlPoolColumnListResult.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolColumnPropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolColumnPropertiesTests.java deleted file mode 100644 index 58fb63ee23901..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolColumnPropertiesTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.SqlPoolColumnProperties; -import com.azure.resourcemanager.synapse.models.ColumnDataType; -import org.junit.jupiter.api.Assertions; - -public final class SqlPoolColumnPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SqlPoolColumnProperties model = - BinaryData - .fromString("{\"columnType\":\"tinyint\",\"isComputed\":true}") - .toObject(SqlPoolColumnProperties.class); - Assertions.assertEquals(ColumnDataType.TINYINT, model.columnType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SqlPoolColumnProperties model = new SqlPoolColumnProperties().withColumnType(ColumnDataType.TINYINT); - model = BinaryData.fromObject(model).toObject(SqlPoolColumnProperties.class); - Assertions.assertEquals(ColumnDataType.TINYINT, model.columnType()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolColumnsGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolColumnsGetWithResponseMockTests.java deleted file mode 100644 index e1e96cfde6515..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolColumnsGetWithResponseMockTests.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.ColumnDataType; -import com.azure.resourcemanager.synapse.models.SqlPoolColumn; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolColumnsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"columnType\":\"text\",\"isComputed\":false},\"id\":\"vfrjwu\",\"name\":\"aonzvaj\",\"type\":\"vbnkrdemdidac\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SqlPoolColumn response = - manager - .sqlPoolColumns() - .getWithResponse( - "zbzuzudlev", - "skejcgwfsgq", - "styec", - "pyuijp", - "rdavsjcfmazpzdq", - "uzvcmcok", - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(ColumnDataType.TEXT, response.columnType()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolConnectionPoliciesGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolConnectionPoliciesGetWithResponseMockTests.java deleted file mode 100644 index 255ea510ccb7c..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolConnectionPoliciesGetWithResponseMockTests.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.ConnectionPolicyName; -import com.azure.resourcemanager.synapse.models.SqlPoolConnectionPolicy; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolConnectionPoliciesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"kind\":\"ueqihkkyowlt\",\"location\":\"uwhldxwhieproqks\",\"properties\":{\"securityEnabledAccess\":\"mcvprstvk\",\"proxyDnsName\":\"b\",\"proxyPort\":\"tdyotnplf\",\"visibility\":\"qoccqrqxwetjt\",\"useServerDefault\":\"hutfdoadtxopge\",\"redirectionState\":\"adkm\",\"state\":\"gssz\"},\"id\":\"vctkbbx\",\"name\":\"harls\",\"type\":\"rncclabv\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SqlPoolConnectionPolicy response = - manager - .sqlPoolConnectionPolicies() - .getWithResponse( - "knpwirfljf", - "wxqouoxudnmc", - "aprhknqiijgencdg", - ConnectionPolicyName.DEFAULT, - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("mcvprstvk", response.securityEnabledAccess()); - Assertions.assertEquals("b", response.proxyDnsName()); - Assertions.assertEquals("tdyotnplf", response.proxyPort()); - Assertions.assertEquals("qoccqrqxwetjt", response.visibility()); - Assertions.assertEquals("hutfdoadtxopge", response.useServerDefault()); - Assertions.assertEquals("adkm", response.redirectionState()); - Assertions.assertEquals("gssz", response.state()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolConnectionPolicyInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolConnectionPolicyInnerTests.java deleted file mode 100644 index f4b38a6e87e32..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolConnectionPolicyInnerTests.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.SqlPoolConnectionPolicyInner; -import org.junit.jupiter.api.Assertions; - -public final class SqlPoolConnectionPolicyInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SqlPoolConnectionPolicyInner model = - BinaryData - .fromString( - "{\"kind\":\"botzingamvppho\",\"location\":\"qzudphq\",\"properties\":{\"securityEnabledAccess\":\"dkfw\",\"proxyDnsName\":\"wcvtbvkayhmtnvyq\",\"proxyPort\":\"tkzwpcnpwzc\",\"visibility\":\"esgvvsccyaj\",\"useServerDefault\":\"qfhwyg\",\"redirectionState\":\"vdnkfxusem\",\"state\":\"zrmuhapfcqdps\"},\"id\":\"xqv\",\"name\":\"svuo\",\"type\":\"mgccelvezrypq\"}") - .toObject(SqlPoolConnectionPolicyInner.class); - Assertions.assertEquals("dkfw", model.securityEnabledAccess()); - Assertions.assertEquals("wcvtbvkayhmtnvyq", model.proxyDnsName()); - Assertions.assertEquals("tkzwpcnpwzc", model.proxyPort()); - Assertions.assertEquals("esgvvsccyaj", model.visibility()); - Assertions.assertEquals("qfhwyg", model.useServerDefault()); - Assertions.assertEquals("vdnkfxusem", model.redirectionState()); - Assertions.assertEquals("zrmuhapfcqdps", model.state()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SqlPoolConnectionPolicyInner model = - new SqlPoolConnectionPolicyInner() - .withSecurityEnabledAccess("dkfw") - .withProxyDnsName("wcvtbvkayhmtnvyq") - .withProxyPort("tkzwpcnpwzc") - .withVisibility("esgvvsccyaj") - .withUseServerDefault("qfhwyg") - .withRedirectionState("vdnkfxusem") - .withState("zrmuhapfcqdps"); - model = BinaryData.fromObject(model).toObject(SqlPoolConnectionPolicyInner.class); - Assertions.assertEquals("dkfw", model.securityEnabledAccess()); - Assertions.assertEquals("wcvtbvkayhmtnvyq", model.proxyDnsName()); - Assertions.assertEquals("tkzwpcnpwzc", model.proxyPort()); - Assertions.assertEquals("esgvvsccyaj", model.visibility()); - Assertions.assertEquals("qfhwyg", model.useServerDefault()); - Assertions.assertEquals("vdnkfxusem", model.redirectionState()); - Assertions.assertEquals("zrmuhapfcqdps", model.state()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolConnectionPolicyPropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolConnectionPolicyPropertiesTests.java deleted file mode 100644 index a0c50e4723b4f..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolConnectionPolicyPropertiesTests.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.SqlPoolConnectionPolicyProperties; -import org.junit.jupiter.api.Assertions; - -public final class SqlPoolConnectionPolicyPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SqlPoolConnectionPolicyProperties model = - BinaryData - .fromString( - "{\"securityEnabledAccess\":\"feo\",\"proxyDnsName\":\"rqwky\",\"proxyPort\":\"ob\",\"visibility\":\"gxedkow\",\"useServerDefault\":\"bqpc\",\"redirectionState\":\"kbwcc\",\"state\":\"jvcdwxlpqekf\"}") - .toObject(SqlPoolConnectionPolicyProperties.class); - Assertions.assertEquals("feo", model.securityEnabledAccess()); - Assertions.assertEquals("rqwky", model.proxyDnsName()); - Assertions.assertEquals("ob", model.proxyPort()); - Assertions.assertEquals("gxedkow", model.visibility()); - Assertions.assertEquals("bqpc", model.useServerDefault()); - Assertions.assertEquals("kbwcc", model.redirectionState()); - Assertions.assertEquals("jvcdwxlpqekf", model.state()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SqlPoolConnectionPolicyProperties model = - new SqlPoolConnectionPolicyProperties() - .withSecurityEnabledAccess("feo") - .withProxyDnsName("rqwky") - .withProxyPort("ob") - .withVisibility("gxedkow") - .withUseServerDefault("bqpc") - .withRedirectionState("kbwcc") - .withState("jvcdwxlpqekf"); - model = BinaryData.fromObject(model).toObject(SqlPoolConnectionPolicyProperties.class); - Assertions.assertEquals("feo", model.securityEnabledAccess()); - Assertions.assertEquals("rqwky", model.proxyDnsName()); - Assertions.assertEquals("ob", model.proxyPort()); - Assertions.assertEquals("gxedkow", model.visibility()); - Assertions.assertEquals("bqpc", model.useServerDefault()); - Assertions.assertEquals("kbwcc", model.redirectionState()); - Assertions.assertEquals("jvcdwxlpqekf", model.state()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolDataWarehouseUserActivitiesGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolDataWarehouseUserActivitiesGetWithResponseMockTests.java deleted file mode 100644 index d09571cd53daa..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolDataWarehouseUserActivitiesGetWithResponseMockTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.DataWarehouseUserActivities; -import com.azure.resourcemanager.synapse.models.DataWarehouseUserActivityName; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolDataWarehouseUserActivitiesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"activeQueriesCount\":1544076334},\"id\":\"btb\",\"name\":\"ekqhs\",\"type\":\"htfpwpqb\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DataWarehouseUserActivities response = - manager - .sqlPoolDataWarehouseUserActivities() - .getWithResponse( - "cvstclgqrvwerf", - "xbsmtbljje", - "hci", - DataWarehouseUserActivityName.CURRENT, - com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolGeoBackupPoliciesCreateOrUpdateWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolGeoBackupPoliciesCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 96de9420330a1..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolGeoBackupPoliciesCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.GeoBackupPolicy; -import com.azure.resourcemanager.synapse.models.GeoBackupPolicyName; -import com.azure.resourcemanager.synapse.models.GeoBackupPolicyState; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolGeoBackupPoliciesCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"state\":\"Disabled\",\"storageType\":\"nracli\"},\"kind\":\"fqpspkladyd\",\"location\":\"hautw\",\"id\":\"kexzgpmnmabeddqi\",\"name\":\"wg\",\"type\":\"fpfqf\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - GeoBackupPolicy response = - manager - .sqlPoolGeoBackupPolicies() - .define(GeoBackupPolicyName.DEFAULT) - .withExistingSqlPool("kwsdgkj", "yacwrasekwefc", "o") - .withState(GeoBackupPolicyState.DISABLED) - .create(); - - Assertions.assertEquals(GeoBackupPolicyState.DISABLED, response.state()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolGeoBackupPoliciesGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolGeoBackupPoliciesGetWithResponseMockTests.java deleted file mode 100644 index 28f7b8df9be7b..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolGeoBackupPoliciesGetWithResponseMockTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.GeoBackupPolicy; -import com.azure.resourcemanager.synapse.models.GeoBackupPolicyName; -import com.azure.resourcemanager.synapse.models.GeoBackupPolicyState; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolGeoBackupPoliciesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"state\":\"Enabled\",\"storageType\":\"rietbg\"},\"kind\":\"xx\",\"location\":\"wzkyf\",\"id\":\"nwpiwxeiicrm\",\"name\":\"e\",\"type\":\"kldmaxxijv\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - GeoBackupPolicy response = - manager - .sqlPoolGeoBackupPolicies() - .getWithResponse( - "msexroqr", "dktxfv", "nfee", GeoBackupPolicyName.DEFAULT, com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(GeoBackupPolicyState.ENABLED, response.state()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolGeoBackupPoliciesListMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolGeoBackupPoliciesListMockTests.java deleted file mode 100644 index 42ffb639860fe..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolGeoBackupPoliciesListMockTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.GeoBackupPolicy; -import com.azure.resourcemanager.synapse.models.GeoBackupPolicyState; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolGeoBackupPoliciesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"state\":\"Enabled\",\"storageType\":\"eoh\"},\"kind\":\"h\",\"location\":\"uz\",\"id\":\"pceeznzangprbf\",\"name\":\"xyxz\",\"type\":\"bcip\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .sqlPoolGeoBackupPolicies() - .list("gkrepdqhqyhw", "wemvxqabckmze", "xin", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(GeoBackupPolicyState.ENABLED, response.iterator().next().state()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolInfoListResultTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolInfoListResultTests.java deleted file mode 100644 index 71025749c68a1..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolInfoListResultTests.java +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.SqlPoolInner; -import com.azure.resourcemanager.synapse.models.CreateMode; -import com.azure.resourcemanager.synapse.models.Sku; -import com.azure.resourcemanager.synapse.models.SqlPoolInfoListResult; -import com.azure.resourcemanager.synapse.models.StorageAccountType; -import java.time.OffsetDateTime; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class SqlPoolInfoListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SqlPoolInfoListResult model = - BinaryData - .fromString( - "{\"nextLink\":\"ancuxrhd\",\"value\":[{\"sku\":{\"tier\":\"bniwdj\",\"name\":\"zt\",\"capacity\":593552862},\"properties\":{\"maxSizeBytes\":6037940700314515859,\"collation\":\"txhp\",\"sourceDatabaseId\":\"bzpfzab\",\"recoverableDatabaseId\":\"cuh\",\"provisioningState\":\"tcty\",\"status\":\"klbb\",\"restorePointInTime\":\"2021-04-06T10:17:39Z\",\"createMode\":\"Recovery\",\"creationDate\":\"2021-08-16T02:09:31Z\",\"storageAccountType\":\"GRS\",\"sourceDatabaseDeletionDate\":\"2021-01-10T00:04:32Z\"},\"location\":\"u\",\"tags\":{\"fpl\":\"svmkfssxquk\",\"xnkjzkdesl\":\"mg\"},\"id\":\"vlopwiyighx\",\"name\":\"kdwzbaiuebbaumny\",\"type\":\"upedeojnabckhs\"},{\"sku\":{\"tier\":\"psiebtfhvpes\",\"name\":\"skrdqmhjj\",\"capacity\":871941711},\"properties\":{\"maxSizeBytes\":2973722017967146384,\"collation\":\"zxuutkncwscwsvl\",\"sourceDatabaseId\":\"togt\",\"recoverableDatabaseId\":\"upqsx\",\"provisioningState\":\"micykvceoveilo\",\"status\":\"oty\",\"restorePointInTime\":\"2021-10-24T21:54:25Z\",\"createMode\":\"Restore\",\"creationDate\":\"2021-02-15T03:10:17Z\",\"storageAccountType\":\"GRS\",\"sourceDatabaseDeletionDate\":\"2021-03-04T17:11:57Z\"},\"location\":\"dhbt\",\"tags\":{\"wpn\":\"h\",\"mclfplphoxuscr\":\"jtoqne\"},\"id\":\"abgy\",\"name\":\"psbjta\",\"type\":\"qugxywpmueefjzwf\"},{\"sku\":{\"tier\":\"ujidsuyono\",\"name\":\"laocqxtccmg\",\"capacity\":1054992005},\"properties\":{\"maxSizeBytes\":6928065700546189319,\"collation\":\"oyrxvwfudwpzntxh\",\"sourceDatabaseId\":\"hl\",\"recoverableDatabaseId\":\"jbhckfrlhr\",\"provisioningState\":\"bkyvp\",\"status\":\"anuzbpzkafkuw\",\"restorePointInTime\":\"2021-02-12T18:02:16Z\",\"createMode\":\"Default\",\"creationDate\":\"2021-12-08T08:00:45Z\",\"storageAccountType\":\"GRS\",\"sourceDatabaseDeletionDate\":\"2021-06-08T07:46:39Z\"},\"location\":\"eyvjusrtslhspkde\",\"tags\":{\"ahvljuaha\":\"ofmxagkvtmelmqkr\",\"ualaexqpvfadmw\":\"uhcdhm\",\"vgomz\":\"rcrgvx\"},\"id\":\"fmisg\",\"name\":\"bnbbeldawkz\",\"type\":\"ali\"},{\"sku\":{\"tier\":\"qhakauhashsf\",\"name\":\"osow\",\"capacity\":38783234},\"properties\":{\"maxSizeBytes\":48775130109439677,\"collation\":\"ooxdjebwpuc\",\"sourceDatabaseId\":\"fvovbvmeuecivy\",\"recoverableDatabaseId\":\"ce\",\"provisioningState\":\"jgjrwjueiotwm\",\"status\":\"ytdxwit\",\"restorePointInTime\":\"2021-05-14T21:36:27Z\",\"createMode\":\"Recovery\",\"creationDate\":\"2021-06-11T21:37:26Z\",\"storageAccountType\":\"GRS\",\"sourceDatabaseDeletionDate\":\"2021-10-18T22:59:22Z\"},\"location\":\"hniskxfbkpyc\",\"tags\":{\"auwhvylwzbtdhx\":\"wndnhj\"},\"id\":\"jznb\",\"name\":\"pow\",\"type\":\"wpr\"}]}") - .toObject(SqlPoolInfoListResult.class); - Assertions.assertEquals("ancuxrhd", model.nextLink()); - Assertions.assertEquals("u", model.value().get(0).location()); - Assertions.assertEquals("svmkfssxquk", model.value().get(0).tags().get("fpl")); - Assertions.assertEquals("bniwdj", model.value().get(0).sku().tier()); - Assertions.assertEquals("zt", model.value().get(0).sku().name()); - Assertions.assertEquals(593552862, model.value().get(0).sku().capacity()); - Assertions.assertEquals(6037940700314515859L, model.value().get(0).maxSizeBytes()); - Assertions.assertEquals("txhp", model.value().get(0).collation()); - Assertions.assertEquals("bzpfzab", model.value().get(0).sourceDatabaseId()); - Assertions.assertEquals("cuh", model.value().get(0).recoverableDatabaseId()); - Assertions.assertEquals("tcty", model.value().get(0).provisioningState()); - Assertions - .assertEquals(OffsetDateTime.parse("2021-04-06T10:17:39Z"), model.value().get(0).restorePointInTime()); - Assertions.assertEquals(CreateMode.RECOVERY, model.value().get(0).createMode()); - Assertions.assertEquals(StorageAccountType.GRS, model.value().get(0).storageAccountType()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-01-10T00:04:32Z"), model.value().get(0).sourceDatabaseDeletionDate()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SqlPoolInfoListResult model = - new SqlPoolInfoListResult() - .withNextLink("ancuxrhd") - .withValue( - Arrays - .asList( - new SqlPoolInner() - .withLocation("u") - .withTags(mapOf("fpl", "svmkfssxquk", "xnkjzkdesl", "mg")) - .withSku(new Sku().withTier("bniwdj").withName("zt").withCapacity(593552862)) - .withMaxSizeBytes(6037940700314515859L) - .withCollation("txhp") - .withSourceDatabaseId("bzpfzab") - .withRecoverableDatabaseId("cuh") - .withProvisioningState("tcty") - .withRestorePointInTime(OffsetDateTime.parse("2021-04-06T10:17:39Z")) - .withCreateMode(CreateMode.RECOVERY) - .withStorageAccountType(StorageAccountType.GRS) - .withSourceDatabaseDeletionDate(OffsetDateTime.parse("2021-01-10T00:04:32Z")), - new SqlPoolInner() - .withLocation("dhbt") - .withTags(mapOf("wpn", "h", "mclfplphoxuscr", "jtoqne")) - .withSku( - new Sku().withTier("psiebtfhvpes").withName("skrdqmhjj").withCapacity(871941711)) - .withMaxSizeBytes(2973722017967146384L) - .withCollation("zxuutkncwscwsvl") - .withSourceDatabaseId("togt") - .withRecoverableDatabaseId("upqsx") - .withProvisioningState("micykvceoveilo") - .withRestorePointInTime(OffsetDateTime.parse("2021-10-24T21:54:25Z")) - .withCreateMode(CreateMode.RESTORE) - .withStorageAccountType(StorageAccountType.GRS) - .withSourceDatabaseDeletionDate(OffsetDateTime.parse("2021-03-04T17:11:57Z")), - new SqlPoolInner() - .withLocation("eyvjusrtslhspkde") - .withTags( - mapOf( - "ahvljuaha", "ofmxagkvtmelmqkr", "ualaexqpvfadmw", "uhcdhm", "vgomz", "rcrgvx")) - .withSku( - new Sku().withTier("ujidsuyono").withName("laocqxtccmg").withCapacity(1054992005)) - .withMaxSizeBytes(6928065700546189319L) - .withCollation("oyrxvwfudwpzntxh") - .withSourceDatabaseId("hl") - .withRecoverableDatabaseId("jbhckfrlhr") - .withProvisioningState("bkyvp") - .withRestorePointInTime(OffsetDateTime.parse("2021-02-12T18:02:16Z")) - .withCreateMode(CreateMode.DEFAULT) - .withStorageAccountType(StorageAccountType.GRS) - .withSourceDatabaseDeletionDate(OffsetDateTime.parse("2021-06-08T07:46:39Z")), - new SqlPoolInner() - .withLocation("hniskxfbkpyc") - .withTags(mapOf("auwhvylwzbtdhx", "wndnhj")) - .withSku(new Sku().withTier("qhakauhashsf").withName("osow").withCapacity(38783234)) - .withMaxSizeBytes(48775130109439677L) - .withCollation("ooxdjebwpuc") - .withSourceDatabaseId("fvovbvmeuecivy") - .withRecoverableDatabaseId("ce") - .withProvisioningState("jgjrwjueiotwm") - .withRestorePointInTime(OffsetDateTime.parse("2021-05-14T21:36:27Z")) - .withCreateMode(CreateMode.RECOVERY) - .withStorageAccountType(StorageAccountType.GRS) - .withSourceDatabaseDeletionDate(OffsetDateTime.parse("2021-10-18T22:59:22Z")))); - model = BinaryData.fromObject(model).toObject(SqlPoolInfoListResult.class); - Assertions.assertEquals("ancuxrhd", model.nextLink()); - Assertions.assertEquals("u", model.value().get(0).location()); - Assertions.assertEquals("svmkfssxquk", model.value().get(0).tags().get("fpl")); - Assertions.assertEquals("bniwdj", model.value().get(0).sku().tier()); - Assertions.assertEquals("zt", model.value().get(0).sku().name()); - Assertions.assertEquals(593552862, model.value().get(0).sku().capacity()); - Assertions.assertEquals(6037940700314515859L, model.value().get(0).maxSizeBytes()); - Assertions.assertEquals("txhp", model.value().get(0).collation()); - Assertions.assertEquals("bzpfzab", model.value().get(0).sourceDatabaseId()); - Assertions.assertEquals("cuh", model.value().get(0).recoverableDatabaseId()); - Assertions.assertEquals("tcty", model.value().get(0).provisioningState()); - Assertions - .assertEquals(OffsetDateTime.parse("2021-04-06T10:17:39Z"), model.value().get(0).restorePointInTime()); - Assertions.assertEquals(CreateMode.RECOVERY, model.value().get(0).createMode()); - Assertions.assertEquals(StorageAccountType.GRS, model.value().get(0).storageAccountType()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-01-10T00:04:32Z"), model.value().get(0).sourceDatabaseDeletionDate()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolInnerTests.java deleted file mode 100644 index 7ad5cbcb69516..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolInnerTests.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.SqlPoolInner; -import com.azure.resourcemanager.synapse.models.CreateMode; -import com.azure.resourcemanager.synapse.models.Sku; -import com.azure.resourcemanager.synapse.models.StorageAccountType; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class SqlPoolInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SqlPoolInner model = - BinaryData - .fromString( - "{\"sku\":{\"tier\":\"hgyxzkonoc\",\"name\":\"oklyaxuconuq\",\"capacity\":1340074682},\"properties\":{\"maxSizeBytes\":3139982845212693168,\"collation\":\"ewrmjmwvvjektc\",\"sourceDatabaseId\":\"enhwlrs\",\"recoverableDatabaseId\":\"rzpwvlqdqgbiq\",\"provisioningState\":\"ihkaetcktvfc\",\"status\":\"fsnkymuctq\",\"restorePointInTime\":\"2021-09-28T09:51:37Z\",\"createMode\":\"PointInTimeRestore\",\"creationDate\":\"2021-08-08T18:22:37Z\",\"storageAccountType\":\"GRS\",\"sourceDatabaseDeletionDate\":\"2021-06-01T09:38:07Z\"},\"location\":\"rfuwutt\",\"tags\":{\"nljky\":\"vjrbirphxepcyvah\",\"ljyoxgvcltb\":\"xjvuujqgidokg\",\"bijhtxfvgxbf\":\"sncghkjeszz\",\"ec\":\"mxnehmp\"},\"id\":\"godebfqkkrbmpu\",\"name\":\"gr\",\"type\":\"wflzlfbxzpuzy\"}") - .toObject(SqlPoolInner.class); - Assertions.assertEquals("rfuwutt", model.location()); - Assertions.assertEquals("vjrbirphxepcyvah", model.tags().get("nljky")); - Assertions.assertEquals("hgyxzkonoc", model.sku().tier()); - Assertions.assertEquals("oklyaxuconuq", model.sku().name()); - Assertions.assertEquals(1340074682, model.sku().capacity()); - Assertions.assertEquals(3139982845212693168L, model.maxSizeBytes()); - Assertions.assertEquals("ewrmjmwvvjektc", model.collation()); - Assertions.assertEquals("enhwlrs", model.sourceDatabaseId()); - Assertions.assertEquals("rzpwvlqdqgbiq", model.recoverableDatabaseId()); - Assertions.assertEquals("ihkaetcktvfc", model.provisioningState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-28T09:51:37Z"), model.restorePointInTime()); - Assertions.assertEquals(CreateMode.POINT_IN_TIME_RESTORE, model.createMode()); - Assertions.assertEquals(StorageAccountType.GRS, model.storageAccountType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-01T09:38:07Z"), model.sourceDatabaseDeletionDate()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SqlPoolInner model = - new SqlPoolInner() - .withLocation("rfuwutt") - .withTags( - mapOf( - "nljky", - "vjrbirphxepcyvah", - "ljyoxgvcltb", - "xjvuujqgidokg", - "bijhtxfvgxbf", - "sncghkjeszz", - "ec", - "mxnehmp")) - .withSku(new Sku().withTier("hgyxzkonoc").withName("oklyaxuconuq").withCapacity(1340074682)) - .withMaxSizeBytes(3139982845212693168L) - .withCollation("ewrmjmwvvjektc") - .withSourceDatabaseId("enhwlrs") - .withRecoverableDatabaseId("rzpwvlqdqgbiq") - .withProvisioningState("ihkaetcktvfc") - .withRestorePointInTime(OffsetDateTime.parse("2021-09-28T09:51:37Z")) - .withCreateMode(CreateMode.POINT_IN_TIME_RESTORE) - .withStorageAccountType(StorageAccountType.GRS) - .withSourceDatabaseDeletionDate(OffsetDateTime.parse("2021-06-01T09:38:07Z")); - model = BinaryData.fromObject(model).toObject(SqlPoolInner.class); - Assertions.assertEquals("rfuwutt", model.location()); - Assertions.assertEquals("vjrbirphxepcyvah", model.tags().get("nljky")); - Assertions.assertEquals("hgyxzkonoc", model.sku().tier()); - Assertions.assertEquals("oklyaxuconuq", model.sku().name()); - Assertions.assertEquals(1340074682, model.sku().capacity()); - Assertions.assertEquals(3139982845212693168L, model.maxSizeBytes()); - Assertions.assertEquals("ewrmjmwvvjektc", model.collation()); - Assertions.assertEquals("enhwlrs", model.sourceDatabaseId()); - Assertions.assertEquals("rzpwvlqdqgbiq", model.recoverableDatabaseId()); - Assertions.assertEquals("ihkaetcktvfc", model.provisioningState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-09-28T09:51:37Z"), model.restorePointInTime()); - Assertions.assertEquals(CreateMode.POINT_IN_TIME_RESTORE, model.createMode()); - Assertions.assertEquals(StorageAccountType.GRS, model.storageAccountType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-01T09:38:07Z"), model.sourceDatabaseDeletionDate()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolMaintenanceWindowOptionsGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolMaintenanceWindowOptionsGetWithResponseMockTests.java deleted file mode 100644 index 31693d5ca7e26..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolMaintenanceWindowOptionsGetWithResponseMockTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.MaintenanceWindowOptions; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolMaintenanceWindowOptionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"isEnabled\":false,\"maintenanceWindowCycles\":[],\"minDurationInMinutes\":1450032317,\"defaultDurationInMinutes\":2139767173,\"minCycles\":316800252,\"timeGranularityInMinutes\":522253905,\"allowMultipleMaintenanceWindowsPerCycle\":true},\"id\":\"zltg\",\"name\":\"omqo\",\"type\":\"pepiaeapfs\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - MaintenanceWindowOptions response = - manager - .sqlPoolMaintenanceWindowOptions() - .getWithResponse("xcjzlquze", "okjxebjvb", "inzabwmvoglj", "v", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(false, response.isEnabled()); - Assertions.assertEquals(1450032317, response.minDurationInMinutes()); - Assertions.assertEquals(2139767173, response.defaultDurationInMinutes()); - Assertions.assertEquals(316800252, response.minCycles()); - Assertions.assertEquals(522253905, response.timeGranularityInMinutes()); - Assertions.assertEquals(true, response.allowMultipleMaintenanceWindowsPerCycle()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolMaintenanceWindowsCreateOrUpdateWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolMaintenanceWindowsCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index cfcd8eb29015d..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolMaintenanceWindowsCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.fluent.models.MaintenanceWindowsInner; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolMaintenanceWindowsCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .sqlPoolMaintenanceWindows() - .createOrUpdateWithResponse( - "fm", - "fgvqcpdw", - "gquxweysland", - "dcdjhunh", - new MaintenanceWindowsInner().withTimeRanges(Arrays.asList()), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolMaintenanceWindowsGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolMaintenanceWindowsGetWithResponseMockTests.java deleted file mode 100644 index 032b5f83a7c74..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolMaintenanceWindowsGetWithResponseMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.MaintenanceWindows; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolMaintenanceWindowsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"timeRanges\":[]},\"id\":\"reyxelyicghf\",\"name\":\"rufssjyg\",\"type\":\"sfxrkbhammgm\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - MaintenanceWindows response = - manager - .sqlPoolMaintenanceWindows() - .getWithResponse("euairaabmdlqjb", "dp", "ixlhupm", "mihzbdnpxp", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolMetadataSyncConfigsCreateWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolMetadataSyncConfigsCreateWithResponseMockTests.java deleted file mode 100644 index 9fd2c20014098..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolMetadataSyncConfigsCreateWithResponseMockTests.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.fluent.models.MetadataSyncConfigInner; -import com.azure.resourcemanager.synapse.models.MetadataSyncConfig; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolMetadataSyncConfigsCreateWithResponseMockTests { - @Test - public void testCreateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"enabled\":true,\"syncIntervalInMinutes\":645754690},\"id\":\"tfwfqchvczevj\",\"name\":\"nctagfyvrtpqpem\",\"type\":\"z\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - MetadataSyncConfig response = - manager - .sqlPoolMetadataSyncConfigs() - .createWithResponse( - "jgmn", - "jotvmrxkhl", - "bvvjbhvhdiq", - new MetadataSyncConfigInner().withEnabled(true).withSyncIntervalInMinutes(699341177), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(true, response.enabled()); - Assertions.assertEquals(645754690, response.syncIntervalInMinutes()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolMetadataSyncConfigsGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolMetadataSyncConfigsGetWithResponseMockTests.java deleted file mode 100644 index 6fe4c34783c27..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolMetadataSyncConfigsGetWithResponseMockTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.MetadataSyncConfig; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolMetadataSyncConfigsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"enabled\":true,\"syncIntervalInMinutes\":1268752565},\"id\":\"czldbglzoutbaaqg\",\"name\":\"ekaj\",\"type\":\"lyzgsnor\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - MetadataSyncConfig response = - manager - .sqlPoolMetadataSyncConfigs() - .getWithResponse("iegftc", "biiftksdwgdnk", "fgmwd", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(true, response.enabled()); - Assertions.assertEquals(1268752565, response.syncIntervalInMinutes()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolPatchInfoTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolPatchInfoTests.java deleted file mode 100644 index 7bc7fa4d79272..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolPatchInfoTests.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.CreateMode; -import com.azure.resourcemanager.synapse.models.Sku; -import com.azure.resourcemanager.synapse.models.SqlPoolPatchInfo; -import com.azure.resourcemanager.synapse.models.StorageAccountType; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class SqlPoolPatchInfoTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SqlPoolPatchInfo model = - BinaryData - .fromString( - "{\"tags\":{\"henbtkcxywnytn\":\"xmyskp\"},\"location\":\"yn\",\"sku\":{\"tier\":\"dybyxczfclhaa\",\"name\":\"babphlwrqlfk\",\"capacity\":1003967781},\"properties\":{\"maxSizeBytes\":3711072422112516968,\"collation\":\"cmnyyazttb\",\"sourceDatabaseId\":\"wrqpue\",\"recoverableDatabaseId\":\"kzywbiex\",\"provisioningState\":\"eyueaxibxujwb\",\"status\":\"walm\",\"restorePointInTime\":\"2021-11-10T04:08:23Z\",\"createMode\":\"Restore\",\"creationDate\":\"2021-07-26T23:02:26Z\",\"storageAccountType\":\"LRS\",\"sourceDatabaseDeletionDate\":\"2021-06-08T12:36:20Z\"}}") - .toObject(SqlPoolPatchInfo.class); - Assertions.assertEquals("xmyskp", model.tags().get("henbtkcxywnytn")); - Assertions.assertEquals("yn", model.location()); - Assertions.assertEquals("dybyxczfclhaa", model.sku().tier()); - Assertions.assertEquals("babphlwrqlfk", model.sku().name()); - Assertions.assertEquals(1003967781, model.sku().capacity()); - Assertions.assertEquals(3711072422112516968L, model.maxSizeBytes()); - Assertions.assertEquals("cmnyyazttb", model.collation()); - Assertions.assertEquals("wrqpue", model.sourceDatabaseId()); - Assertions.assertEquals("kzywbiex", model.recoverableDatabaseId()); - Assertions.assertEquals("eyueaxibxujwb", model.provisioningState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-10T04:08:23Z"), model.restorePointInTime()); - Assertions.assertEquals(CreateMode.RESTORE, model.createMode()); - Assertions.assertEquals(StorageAccountType.LRS, model.storageAccountType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-08T12:36:20Z"), model.sourceDatabaseDeletionDate()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SqlPoolPatchInfo model = - new SqlPoolPatchInfo() - .withTags(mapOf("henbtkcxywnytn", "xmyskp")) - .withLocation("yn") - .withSku(new Sku().withTier("dybyxczfclhaa").withName("babphlwrqlfk").withCapacity(1003967781)) - .withMaxSizeBytes(3711072422112516968L) - .withCollation("cmnyyazttb") - .withSourceDatabaseId("wrqpue") - .withRecoverableDatabaseId("kzywbiex") - .withProvisioningState("eyueaxibxujwb") - .withRestorePointInTime(OffsetDateTime.parse("2021-11-10T04:08:23Z")) - .withCreateMode(CreateMode.RESTORE) - .withStorageAccountType(StorageAccountType.LRS) - .withSourceDatabaseDeletionDate(OffsetDateTime.parse("2021-06-08T12:36:20Z")); - model = BinaryData.fromObject(model).toObject(SqlPoolPatchInfo.class); - Assertions.assertEquals("xmyskp", model.tags().get("henbtkcxywnytn")); - Assertions.assertEquals("yn", model.location()); - Assertions.assertEquals("dybyxczfclhaa", model.sku().tier()); - Assertions.assertEquals("babphlwrqlfk", model.sku().name()); - Assertions.assertEquals(1003967781, model.sku().capacity()); - Assertions.assertEquals(3711072422112516968L, model.maxSizeBytes()); - Assertions.assertEquals("cmnyyazttb", model.collation()); - Assertions.assertEquals("wrqpue", model.sourceDatabaseId()); - Assertions.assertEquals("kzywbiex", model.recoverableDatabaseId()); - Assertions.assertEquals("eyueaxibxujwb", model.provisioningState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-10T04:08:23Z"), model.restorePointInTime()); - Assertions.assertEquals(CreateMode.RESTORE, model.createMode()); - Assertions.assertEquals(StorageAccountType.LRS, model.storageAccountType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-06-08T12:36:20Z"), model.sourceDatabaseDeletionDate()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolRecommendedSensitivityLabelsUpdateWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolRecommendedSensitivityLabelsUpdateWithResponseMockTests.java deleted file mode 100644 index a0abdde4164af..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolRecommendedSensitivityLabelsUpdateWithResponseMockTests.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.RecommendedSensitivityLabelUpdate; -import com.azure.resourcemanager.synapse.models.RecommendedSensitivityLabelUpdateList; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolRecommendedSensitivityLabelsUpdateWithResponseMockTests { - @Test - public void testUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .sqlPoolRecommendedSensitivityLabels() - .updateWithResponse( - "qa", - "j", - "vaz", - new RecommendedSensitivityLabelUpdateList() - .withOperations( - Arrays - .asList( - new RecommendedSensitivityLabelUpdate(), - new RecommendedSensitivityLabelUpdate(), - new RecommendedSensitivityLabelUpdate(), - new RecommendedSensitivityLabelUpdate())), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolReplicationLinksGetByNameWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolReplicationLinksGetByNameWithResponseMockTests.java deleted file mode 100644 index ba766e4f5ce80..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolReplicationLinksGetByNameWithResponseMockTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.ReplicationLink; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolReplicationLinksGetByNameWithResponseMockTests { - @Test - public void testGetByNameWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"location\":\"kiczdfrj\",\"properties\":{\"isTerminationAllowed\":true,\"replicationMode\":\"gqaboohx\",\"partnerServer\":\"sgyc\",\"partnerDatabase\":\"xrmdvewuyqaeohpj\",\"partnerLocation\":\"ejkbvhhdaurgho\",\"role\":\"Primary\",\"partnerRole\":\"Copy\",\"startTime\":\"2021-08-25T17:36:27Z\",\"percentComplete\":1446009255,\"replicationState\":\"SUSPENDED\"},\"id\":\"joezlqxrkdknkobe\",\"name\":\"tmbozomtzamicbig\",\"type\":\"cdgzseznux\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ReplicationLink response = - manager - .sqlPoolReplicationLinks() - .getByNameWithResponse( - "lusnawmhhgzotfr", "yrgkoekv", "wxxyxhighctx", "xmolpcqydeyk", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolReplicationLinksListMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolReplicationLinksListMockTests.java deleted file mode 100644 index fafdfc09b7846..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolReplicationLinksListMockTests.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.ReplicationLink; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolReplicationLinksListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"location\":\"fcemftzgyyky\",\"properties\":{\"isTerminationAllowed\":true,\"replicationMode\":\"kd\",\"partnerServer\":\"nht\",\"partnerDatabase\":\"do\",\"partnerLocation\":\"czfjjnn\",\"role\":\"Secondary\",\"partnerRole\":\"Copy\",\"startTime\":\"2021-10-23T07:10:18Z\",\"percentComplete\":1452082126,\"replicationState\":\"SEEDING\"},\"id\":\"lwe\",\"name\":\"pdcifrhju\",\"type\":\"rsulwzp\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.sqlPoolReplicationLinks().list("bfokxkhu", "ze", "ufgjblcdr", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolResourcePropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolResourcePropertiesTests.java deleted file mode 100644 index 5a8a740ce574c..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolResourcePropertiesTests.java +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.SqlPoolResourceProperties; -import com.azure.resourcemanager.synapse.models.CreateMode; -import com.azure.resourcemanager.synapse.models.StorageAccountType; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class SqlPoolResourcePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SqlPoolResourceProperties model = - BinaryData - .fromString( - "{\"maxSizeBytes\":547148134768197922,\"collation\":\"vtq\",\"sourceDatabaseId\":\"n\",\"recoverableDatabaseId\":\"ynhijggme\",\"provisioningState\":\"siarbutrcvpn\",\"status\":\"zmhjrunmp\",\"restorePointInTime\":\"2021-03-04T22:45:41Z\",\"createMode\":\"Default\",\"creationDate\":\"2021-07-16T15:39:21Z\",\"storageAccountType\":\"LRS\",\"sourceDatabaseDeletionDate\":\"2021-10-27T21:49:11Z\"}") - .toObject(SqlPoolResourceProperties.class); - Assertions.assertEquals(547148134768197922L, model.maxSizeBytes()); - Assertions.assertEquals("vtq", model.collation()); - Assertions.assertEquals("n", model.sourceDatabaseId()); - Assertions.assertEquals("ynhijggme", model.recoverableDatabaseId()); - Assertions.assertEquals("siarbutrcvpn", model.provisioningState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-04T22:45:41Z"), model.restorePointInTime()); - Assertions.assertEquals(CreateMode.DEFAULT, model.createMode()); - Assertions.assertEquals(StorageAccountType.LRS, model.storageAccountType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-27T21:49:11Z"), model.sourceDatabaseDeletionDate()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SqlPoolResourceProperties model = - new SqlPoolResourceProperties() - .withMaxSizeBytes(547148134768197922L) - .withCollation("vtq") - .withSourceDatabaseId("n") - .withRecoverableDatabaseId("ynhijggme") - .withProvisioningState("siarbutrcvpn") - .withRestorePointInTime(OffsetDateTime.parse("2021-03-04T22:45:41Z")) - .withCreateMode(CreateMode.DEFAULT) - .withStorageAccountType(StorageAccountType.LRS) - .withSourceDatabaseDeletionDate(OffsetDateTime.parse("2021-10-27T21:49:11Z")); - model = BinaryData.fromObject(model).toObject(SqlPoolResourceProperties.class); - Assertions.assertEquals(547148134768197922L, model.maxSizeBytes()); - Assertions.assertEquals("vtq", model.collation()); - Assertions.assertEquals("n", model.sourceDatabaseId()); - Assertions.assertEquals("ynhijggme", model.recoverableDatabaseId()); - Assertions.assertEquals("siarbutrcvpn", model.provisioningState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-04T22:45:41Z"), model.restorePointInTime()); - Assertions.assertEquals(CreateMode.DEFAULT, model.createMode()); - Assertions.assertEquals(StorageAccountType.LRS, model.storageAccountType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-27T21:49:11Z"), model.sourceDatabaseDeletionDate()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolRestorePointsCreateMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolRestorePointsCreateMockTests.java deleted file mode 100644 index 906de20187de9..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolRestorePointsCreateMockTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.CreateSqlPoolRestorePointDefinition; -import com.azure.resourcemanager.synapse.models.RestorePoint; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolRestorePointsCreateMockTests { - @Test - public void testCreate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"location\":\"udivbxnhsqeaeonq\",\"properties\":{\"restorePointType\":\"CONTINUOUS\",\"earliestRestoreDate\":\"2021-07-02T09:32:39Z\",\"restorePointCreationDate\":\"2021-01-08T21:25:54Z\",\"restorePointLabel\":\"zytzarogatmolj\"},\"id\":\"ywmpinmzvfkneer\",\"name\":\"ztrknsj\",\"type\":\"lugdybnhrxlelf\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - RestorePoint response = - manager - .sqlPoolRestorePoints() - .create( - "voffbkkwvdxae", - "qokmyrljial", - "bn", - new CreateSqlPoolRestorePointDefinition().withRestorePointLabel("brqlpbcjtrpz"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolRestorePointsDeleteWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolRestorePointsDeleteWithResponseMockTests.java deleted file mode 100644 index 8a18bd93cb311..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolRestorePointsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolRestorePointsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .sqlPoolRestorePoints() - .deleteWithResponse( - "ajnkdflqionswae", "kzfzqxjosho", "totryegpkhxrme", "znlw", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolRestorePointsGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolRestorePointsGetWithResponseMockTests.java deleted file mode 100644 index f2057e9ebd08b..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolRestorePointsGetWithResponseMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.RestorePoint; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolRestorePointsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"location\":\"mlcfnzhmhsurl\",\"properties\":{\"restorePointType\":\"CONTINUOUS\",\"earliestRestoreDate\":\"2021-04-20T12:47:45Z\",\"restorePointCreationDate\":\"2021-09-14T19:13:14Z\",\"restorePointLabel\":\"stauolawi\"},\"id\":\"bmom\",\"name\":\"gvvjhvvlr\",\"type\":\"ohewjj\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - RestorePoint response = - manager - .sqlPoolRestorePoints() - .getWithResponse("hkeizcp", "htdm", "wjekptycaydbj", "c", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolRestorePointsListMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolRestorePointsListMockTests.java deleted file mode 100644 index 76d8a16b71edb..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolRestorePointsListMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.RestorePoint; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolRestorePointsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"location\":\"kfmkhcqtwmlmhjn\",\"properties\":{\"restorePointType\":\"CONTINUOUS\",\"earliestRestoreDate\":\"2021-08-10T12:42:08Z\",\"restorePointCreationDate\":\"2021-01-27T09:17:43Z\",\"restorePointLabel\":\"vragpokddx\"},\"id\":\"jhhkv\",\"name\":\"uavt\",\"type\":\"tbkewkqynspg\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .sqlPoolRestorePoints() - .list("ejuwyqwdqigmghgi", "z", "xlujkhnjcm", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolSchemaInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolSchemaInnerTests.java deleted file mode 100644 index 61ff28cdedecc..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolSchemaInnerTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.SqlPoolSchemaInner; - -public final class SqlPoolSchemaInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SqlPoolSchemaInner model = - BinaryData - .fromString("{\"id\":\"wfsdjpvkvpbj\",\"name\":\"bkzbzkd\",\"type\":\"ncj\"}") - .toObject(SqlPoolSchemaInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SqlPoolSchemaInner model = new SqlPoolSchemaInner(); - model = BinaryData.fromObject(model).toObject(SqlPoolSchemaInner.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolSchemaListResultTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolSchemaListResultTests.java deleted file mode 100644 index 868d4ce1c03bf..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolSchemaListResultTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.SqlPoolSchemaListResult; - -public final class SqlPoolSchemaListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SqlPoolSchemaListResult model = - BinaryData - .fromString( - "{\"value\":[{\"id\":\"eibq\",\"name\":\"p\",\"type\":\"kghv\"},{\"id\":\"ndzwmkrefa\",\"name\":\"pjorwkqnyhg\",\"type\":\"ij\"}],\"nextLink\":\"ivfxzsjabibsyst\"}") - .toObject(SqlPoolSchemaListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SqlPoolSchemaListResult model = new SqlPoolSchemaListResult(); - model = BinaryData.fromObject(model).toObject(SqlPoolSchemaListResult.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolSchemasGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolSchemasGetWithResponseMockTests.java deleted file mode 100644 index 1d26447b19965..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolSchemasGetWithResponseMockTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.SqlPoolSchema; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolSchemasGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"id\":\"nthbbnkgzukwd\",\"name\":\"nzkjthfceyjn\",\"type\":\"jmlfuyfjbp\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SqlPoolSchema response = - manager - .sqlPoolSchemas() - .getWithResponse("kczynuhhoqeqsh", "vl", "q", "xyrqo", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolSchemasListMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolSchemasListMockTests.java deleted file mode 100644 index 7d0f60289caa5..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolSchemasListMockTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.SqlPoolSchema; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolSchemasListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"value\":[{\"id\":\"fjzc\",\"name\":\"aaxoialahfxwcc\",\"type\":\"kdxkuk\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .sqlPoolSchemas() - .list("jjsbcmlzaahzbhur", "olk", "lirh", "mojusuz", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsCreateOrUpdateWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 0ded10b633149..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.SensitivityLabel; -import com.azure.resourcemanager.synapse.models.SensitivityLabelRank; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolSensitivityLabelsCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"schemaName\":\"squbfajcywh\",\"tableName\":\"wmchqo\",\"columnName\":\"fxcpupukiym\",\"labelName\":\"pwdlvwti\",\"labelId\":\"mosaonh\",\"informationType\":\"amppultassaekewn\",\"informationTypeId\":\"eajbkajlcyizyddc\",\"isDisabled\":false,\"rank\":\"None\"},\"managedBy\":\"vfsxx\",\"id\":\"ydesqlvgec\",\"name\":\"wgoljtzx\",\"type\":\"mxsdobygoog\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SensitivityLabel response = - manager - .sqlPoolSensitivityLabels() - .define() - .withExistingColumn("apeqiscrpil", "ftr", "rejdaahuqim", "dahlfxlmuifmuadj", "fsn", "skiioshjgczetybn") - .withLabelName("ylrwoxzg") - .withLabelId("syxjijeyp") - .withInformationType("rbkerdkd") - .withInformationTypeId("awqwjxild") - .withRank(SensitivityLabelRank.MEDIUM) - .create(); - - Assertions.assertEquals("pwdlvwti", response.labelName()); - Assertions.assertEquals("mosaonh", response.labelId()); - Assertions.assertEquals("amppultassaekewn", response.informationType()); - Assertions.assertEquals("eajbkajlcyizyddc", response.informationTypeId()); - Assertions.assertEquals(SensitivityLabelRank.NONE, response.rank()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsDeleteWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsDeleteWithResponseMockTests.java deleted file mode 100644 index 1ec7d0bc7b464..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolSensitivityLabelsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .sqlPoolSensitivityLabels() - .deleteWithResponse( - "zjljmphfk", - "ezolgjzm", - "cuydoccnxshanz", - "uiadhbatecaatsdo", - "zn", - "ucbdaom", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsDisableRecommendationWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsDisableRecommendationWithResponseMockTests.java deleted file mode 100644 index bc1e807e3b15d..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsDisableRecommendationWithResponseMockTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolSensitivityLabelsDisableRecommendationWithResponseMockTests { - @Test - public void testDisableRecommendationWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .sqlPoolSensitivityLabels() - .disableRecommendationWithResponse( - "qfkyfhiwvjaqu", "by", "nvskpaj", "mgeu", "exmj", "xcbccwkqmt", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsEnableRecommendationWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsEnableRecommendationWithResponseMockTests.java deleted file mode 100644 index f2b0670a76783..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsEnableRecommendationWithResponseMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolSensitivityLabelsEnableRecommendationWithResponseMockTests { - @Test - public void testEnableRecommendationWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .sqlPoolSensitivityLabels() - .enableRecommendationWithResponse( - "ccgrvkcxzznn", - "i", - "ersejeg", - "rkjguwrjmwvvbt", - "qkxximwgxql", - "ekotjgxi", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsGetWithResponseMockTests.java deleted file mode 100644 index 1c600eb9f0a98..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsGetWithResponseMockTests.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.SensitivityLabel; -import com.azure.resourcemanager.synapse.models.SensitivityLabelRank; -import com.azure.resourcemanager.synapse.models.SensitivityLabelSource; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolSensitivityLabelsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"schemaName\":\"kvjgbzs\",\"tableName\":\"br\",\"columnName\":\"ttfyhcdjwsuoard\",\"labelName\":\"gttpufpbpgnrho\",\"labelId\":\"ujbfwxiplkys\",\"informationType\":\"syjprxslwhdmcvh\",\"informationTypeId\":\"bzjhfvhuwzb\",\"isDisabled\":true,\"rank\":\"Medium\"},\"managedBy\":\"ihotjecohmxv\",\"id\":\"lrrskap\",\"name\":\"xwieexuyade\",\"type\":\"ltfokyksyim\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SensitivityLabel response = - manager - .sqlPoolSensitivityLabels() - .getWithResponse( - "wiinjdllw", - "tlepowavvqxua", - "g", - "qwulynkgfcfdru", - "si", - "xxtclhuulri", - SensitivityLabelSource.RECOMMENDED, - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("gttpufpbpgnrho", response.labelName()); - Assertions.assertEquals("ujbfwxiplkys", response.labelId()); - Assertions.assertEquals("syjprxslwhdmcvh", response.informationType()); - Assertions.assertEquals("bzjhfvhuwzb", response.informationTypeId()); - Assertions.assertEquals(SensitivityLabelRank.MEDIUM, response.rank()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsListCurrentMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsListCurrentMockTests.java deleted file mode 100644 index 6c4176190c6a5..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsListCurrentMockTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.SensitivityLabel; -import com.azure.resourcemanager.synapse.models.SensitivityLabelRank; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolSensitivityLabelsListCurrentMockTests { - @Test - public void testListCurrent() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"schemaName\":\"waivmuqkevzg\",\"tableName\":\"panhxmpdxxze\",\"columnName\":\"wzjwotnxlkfhg\",\"labelName\":\"rfo\",\"labelId\":\"wecr\",\"informationType\":\"hpcselqxovp\",\"informationTypeId\":\"ibuk\",\"isDisabled\":true,\"rank\":\"Critical\"},\"managedBy\":\"rmlccmet\",\"id\":\"scz\",\"name\":\"vfqbqna\",\"type\":\"dsyenzsieuscpl\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .sqlPoolSensitivityLabels() - .listCurrent( - "cgubsrtmdylper", "ilttjzgczfcmfpfb", "detres", "gvtshu", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("rfo", response.iterator().next().labelName()); - Assertions.assertEquals("wecr", response.iterator().next().labelId()); - Assertions.assertEquals("hpcselqxovp", response.iterator().next().informationType()); - Assertions.assertEquals("ibuk", response.iterator().next().informationTypeId()); - Assertions.assertEquals(SensitivityLabelRank.CRITICAL, response.iterator().next().rank()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsListRecommendedMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsListRecommendedMockTests.java deleted file mode 100644 index 1888a41d3fef4..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsListRecommendedMockTests.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.SensitivityLabel; -import com.azure.resourcemanager.synapse.models.SensitivityLabelRank; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolSensitivityLabelsListRecommendedMockTests { - @Test - public void testListRecommended() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"schemaName\":\"dajfwnncfma\",\"tableName\":\"qgjjrlhiqlwixv\",\"columnName\":\"ougu\",\"labelName\":\"n\",\"labelId\":\"pg\",\"informationType\":\"tbasu\",\"informationTypeId\":\"ap\",\"isDisabled\":false,\"rank\":\"High\"},\"managedBy\":\"aqbkixvvlwynpbbf\",\"id\":\"vzfjm\",\"name\":\"pu\",\"type\":\"zfe\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .sqlPoolSensitivityLabels() - .listRecommended( - "eaqgrvgpomxpupd", - "sdfjyiesoc", - "iqbuou", - false, - "py", - "gleofjsbgbw", - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("n", response.iterator().next().labelName()); - Assertions.assertEquals("pg", response.iterator().next().labelId()); - Assertions.assertEquals("tbasu", response.iterator().next().informationType()); - Assertions.assertEquals("ap", response.iterator().next().informationTypeId()); - Assertions.assertEquals(SensitivityLabelRank.HIGH, response.iterator().next().rank()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsUpdateWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsUpdateWithResponseMockTests.java deleted file mode 100644 index ff84a39b85a1b..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolSensitivityLabelsUpdateWithResponseMockTests.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.fluent.models.SensitivityLabelUpdateInner; -import com.azure.resourcemanager.synapse.models.SensitivityLabelUpdateList; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolSensitivityLabelsUpdateWithResponseMockTests { - @Test - public void testUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .sqlPoolSensitivityLabels() - .updateWithResponse( - "yvdgxlyzk", - "itdshezsvkolru", - "jovmozsaye", - new SensitivityLabelUpdateList() - .withOperations( - Arrays - .asList( - new SensitivityLabelUpdateInner(), - new SensitivityLabelUpdateInner(), - new SensitivityLabelUpdateInner(), - new SensitivityLabelUpdateInner())), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolTableColumnsListByTableNameMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolTableColumnsListByTableNameMockTests.java deleted file mode 100644 index 771b376a93fec..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolTableColumnsListByTableNameMockTests.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.ColumnDataType; -import com.azure.resourcemanager.synapse.models.SqlPoolColumn; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolTableColumnsListByTableNameMockTests { - @Test - public void testListByTableName() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"columnType\":\"timestamp\",\"isComputed\":false},\"id\":\"cxq\",\"name\":\"whscozawmv\",\"type\":\"xsm\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .sqlPoolTableColumns() - .listByTableName( - "gwi", - "aaneakhtmhobcya", - "rfvqtvkhgvo", - "gxkfnaoaqymhccto", - "uowyrnskbyhqu", - "czygxv", - com.azure.core.util.Context.NONE); - - Assertions.assertEquals(ColumnDataType.TIMESTAMP, response.iterator().next().columnType()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolTableInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolTableInnerTests.java deleted file mode 100644 index aeef4bbbedc67..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolTableInnerTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.SqlPoolTableInner; - -public final class SqlPoolTableInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SqlPoolTableInner model = - BinaryData - .fromString("{\"id\":\"pdrhne\",\"name\":\"yowqkdwytisibir\",\"type\":\"gpikpzimejza\"}") - .toObject(SqlPoolTableInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SqlPoolTableInner model = new SqlPoolTableInner(); - model = BinaryData.fromObject(model).toObject(SqlPoolTableInner.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolTableListResultTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolTableListResultTests.java deleted file mode 100644 index 78ee119c6b612..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolTableListResultTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.SqlPoolTableListResult; - -public final class SqlPoolTableListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SqlPoolTableListResult model = - BinaryData - .fromString( - "{\"value\":[{\"id\":\"durgkakmokz\",\"name\":\"jjklff\",\"type\":\"mouwqlgzrfzeey\"},{\"id\":\"bizikayuhq\",\"name\":\"bjbsybb\",\"type\":\"wrv\"},{\"id\":\"ldgmfpgvmpip\",\"name\":\"slthaq\",\"type\":\"x\"}],\"nextLink\":\"mwutwbdsre\"}") - .toObject(SqlPoolTableListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SqlPoolTableListResult model = new SqlPoolTableListResult(); - model = BinaryData.fromObject(model).toObject(SqlPoolTableListResult.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolTablesGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolTablesGetWithResponseMockTests.java deleted file mode 100644 index 64da5cb6eb71f..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolTablesGetWithResponseMockTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.SqlPoolTable; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolTablesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"id\":\"atuwqkokbc\",\"name\":\"othymgobl\",\"type\":\"msn\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SqlPoolTable response = - manager - .sqlPoolTables() - .getWithResponse("ag", "qfqqdlcvmyolc", "ymjc", "tvsnvl", "qdnzyza", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolTablesListBySchemaMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolTablesListBySchemaMockTests.java deleted file mode 100644 index 8969e193598f4..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolTablesListBySchemaMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.SqlPoolTable; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolTablesListBySchemaMockTests { - @Test - public void testListBySchema() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"value\":[{\"id\":\"sjmrkkhm\",\"name\":\"dmdlgyqixokw\",\"type\":\"jawh\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .sqlPoolTables() - .listBySchema( - "iddhlrufzc", "yjmqrf", "iocuselqkr", "azrhxudd", "mdtff", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolTransparentDataEncryptionsCreateOrUpdateWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolTransparentDataEncryptionsCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index bd5b0c0a9f34c..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolTransparentDataEncryptionsCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.TransparentDataEncryption; -import com.azure.resourcemanager.synapse.models.TransparentDataEncryptionName; -import com.azure.resourcemanager.synapse.models.TransparentDataEncryptionStatus; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolTransparentDataEncryptionsCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"location\":\"nbpvzlq\",\"properties\":{\"status\":\"Enabled\"},\"id\":\"y\",\"name\":\"njc\",\"type\":\"hmocgjshg\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - TransparentDataEncryption response = - manager - .sqlPoolTransparentDataEncryptions() - .define(TransparentDataEncryptionName.CURRENT) - .withExistingSqlPool("zybspijhfrzgdkk", "gv", "ukhsusmmorf") - .withStatus(TransparentDataEncryptionStatus.DISABLED) - .create(); - - Assertions.assertEquals(TransparentDataEncryptionStatus.ENABLED, response.status()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolTransparentDataEncryptionsGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolTransparentDataEncryptionsGetWithResponseMockTests.java deleted file mode 100644 index 969ffde4a401d..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolTransparentDataEncryptionsGetWithResponseMockTests.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.TransparentDataEncryption; -import com.azure.resourcemanager.synapse.models.TransparentDataEncryptionName; -import com.azure.resourcemanager.synapse.models.TransparentDataEncryptionStatus; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolTransparentDataEncryptionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"location\":\"cwmbupyvqyvli\",\"properties\":{\"status\":\"Disabled\"},\"id\":\"sejb\",\"name\":\"vsi\",\"type\":\"ieswhddzydisn\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - TransparentDataEncryption response = - manager - .sqlPoolTransparentDataEncryptions() - .getWithResponse( - "rgdtpeqnacyheqw", - "pqqncju", - "khjoz", - TransparentDataEncryptionName.CURRENT, - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(TransparentDataEncryptionStatus.DISABLED, response.status()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolTransparentDataEncryptionsListMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolTransparentDataEncryptionsListMockTests.java deleted file mode 100644 index 821179be8989e..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolTransparentDataEncryptionsListMockTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.TransparentDataEncryption; -import com.azure.resourcemanager.synapse.models.TransparentDataEncryptionStatus; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolTransparentDataEncryptionsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"location\":\"hweebiph\",\"properties\":{\"status\":\"Enabled\"},\"id\":\"jw\",\"name\":\"w\",\"type\":\"qsratjhd\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .sqlPoolTransparentDataEncryptions() - .list("epywyjlnldpxottd", "i", "ocqibz", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(TransparentDataEncryptionStatus.ENABLED, response.iterator().next().status()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolUsageInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolUsageInnerTests.java deleted file mode 100644 index bdcf0a5916474..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolUsageInnerTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.SqlPoolUsageInner; - -public final class SqlPoolUsageInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SqlPoolUsageInner model = - BinaryData - .fromString( - "{\"name\":\"lxgwimfnjhf\",\"resourceName\":\"wmszkk\",\"displayName\":\"qreyfkzi\",\"currentValue\":47.32813703422634,\"limit\":4.556100953874753,\"unit\":\"ivx\",\"nextResetTime\":\"2021-12-04T11:19:32Z\"}") - .toObject(SqlPoolUsageInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SqlPoolUsageInner model = new SqlPoolUsageInner(); - model = BinaryData.fromObject(model).toObject(SqlPoolUsageInner.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolUsageListResultTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolUsageListResultTests.java deleted file mode 100644 index ac52a4ef9b144..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolUsageListResultTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.SqlPoolUsageInner; -import com.azure.resourcemanager.synapse.models.SqlPoolUsageListResult; -import java.util.Arrays; - -public final class SqlPoolUsageListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SqlPoolUsageListResult model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"rwyhqmibzyhwitsm\",\"resourceName\":\"yynpcdpumnzgmwz\",\"displayName\":\"abikns\",\"currentValue\":6.618364675171895,\"limit\":92.09110647306585,\"unit\":\"dtlwwrlkd\",\"nextResetTime\":\"2021-01-27T13:38:37Z\"},{\"name\":\"vokotllxdyh\",\"resourceName\":\"y\",\"displayName\":\"ogjltdtbnnhad\",\"currentValue\":62.09409186801451,\"limit\":77.71998697253709,\"unit\":\"khnvpam\",\"nextResetTime\":\"2021-05-20T03:12:36Z\"},{\"name\":\"queziky\",\"resourceName\":\"gxk\",\"displayName\":\"la\",\"currentValue\":43.550551381865965,\"limit\":53.32288334528516,\"unit\":\"iccjzkzivgvvcna\",\"nextResetTime\":\"2021-09-08T02:15:33Z\"},{\"name\":\"rnxxmueed\",\"resourceName\":\"rdvstkwqqtch\",\"displayName\":\"lmfmtdaay\",\"currentValue\":1.7891473583619977,\"limit\":89.32689226569329,\"unit\":\"ohgwxrtfudxepxg\",\"nextResetTime\":\"2020-12-22T18:51:20Z\"}],\"nextLink\":\"vrvmnpkukghim\"}") - .toObject(SqlPoolUsageListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SqlPoolUsageListResult model = - new SqlPoolUsageListResult() - .withValue( - Arrays - .asList( - new SqlPoolUsageInner(), - new SqlPoolUsageInner(), - new SqlPoolUsageInner(), - new SqlPoolUsageInner())); - model = BinaryData.fromObject(model).toObject(SqlPoolUsageListResult.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolUsagesListMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolUsagesListMockTests.java deleted file mode 100644 index e05f80e0f64ed..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolUsagesListMockTests.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.SqlPoolUsage; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolUsagesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"ixdgbyfgwewqkj\",\"resourceName\":\"prwpxsoohu\",\"displayName\":\"lcsklt\",\"currentValue\":72.44728478502968,\"limit\":28.504889051615013,\"unit\":\"lfb\",\"nextResetTime\":\"2021-05-28T15:32:03Z\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.sqlPoolUsages().list("anmhkscauwazcgw", "friwgybjp", "zokscvg", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentRuleBaselineInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentRuleBaselineInnerTests.java deleted file mode 100644 index f65e063cc81cb..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentRuleBaselineInnerTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.SqlPoolVulnerabilityAssessmentRuleBaselineInner; -import com.azure.resourcemanager.synapse.models.SqlPoolVulnerabilityAssessmentRuleBaselineItem; -import java.util.Arrays; - -public final class SqlPoolVulnerabilityAssessmentRuleBaselineInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SqlPoolVulnerabilityAssessmentRuleBaselineInner model = - BinaryData - .fromString( - "{\"properties\":{\"baselineResults\":[{\"result\":[]},{\"result\":[]},{\"result\":[]},{\"result\":[]}]},\"id\":\"x\",\"name\":\"knpirgnepttwq\",\"type\":\"sniffc\"}") - .toObject(SqlPoolVulnerabilityAssessmentRuleBaselineInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SqlPoolVulnerabilityAssessmentRuleBaselineInner model = - new SqlPoolVulnerabilityAssessmentRuleBaselineInner() - .withBaselineResults( - Arrays - .asList( - new SqlPoolVulnerabilityAssessmentRuleBaselineItem().withResult(Arrays.asList()), - new SqlPoolVulnerabilityAssessmentRuleBaselineItem().withResult(Arrays.asList()), - new SqlPoolVulnerabilityAssessmentRuleBaselineItem().withResult(Arrays.asList()), - new SqlPoolVulnerabilityAssessmentRuleBaselineItem().withResult(Arrays.asList()))); - model = BinaryData.fromObject(model).toObject(SqlPoolVulnerabilityAssessmentRuleBaselineInner.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentRuleBaselineItemTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentRuleBaselineItemTests.java deleted file mode 100644 index a78592098bfa9..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentRuleBaselineItemTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.SqlPoolVulnerabilityAssessmentRuleBaselineItem; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SqlPoolVulnerabilityAssessmentRuleBaselineItemTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SqlPoolVulnerabilityAssessmentRuleBaselineItem model = - BinaryData - .fromString("{\"result\":[\"uswdv\",\"yybyc\",\"unvjsrtkfawnopq\"]}") - .toObject(SqlPoolVulnerabilityAssessmentRuleBaselineItem.class); - Assertions.assertEquals("uswdv", model.result().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SqlPoolVulnerabilityAssessmentRuleBaselineItem model = - new SqlPoolVulnerabilityAssessmentRuleBaselineItem() - .withResult(Arrays.asList("uswdv", "yybyc", "unvjsrtkfawnopq")); - model = BinaryData.fromObject(model).toObject(SqlPoolVulnerabilityAssessmentRuleBaselineItem.class); - Assertions.assertEquals("uswdv", model.result().get(0)); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentRuleBaselinePropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentRuleBaselinePropertiesTests.java deleted file mode 100644 index 7570f41220cfb..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentRuleBaselinePropertiesTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.SqlPoolVulnerabilityAssessmentRuleBaselineProperties; -import com.azure.resourcemanager.synapse.models.SqlPoolVulnerabilityAssessmentRuleBaselineItem; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SqlPoolVulnerabilityAssessmentRuleBaselinePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SqlPoolVulnerabilityAssessmentRuleBaselineProperties model = - BinaryData - .fromString( - "{\"baselineResults\":[{\"result\":[\"nrojlpijnkr\",\"frddhcrati\",\"zronasxift\",\"zq\"]},{\"result\":[\"hftwesgog\"]},{\"result\":[\"honnxkrlgnyhmos\",\"xkk\",\"thrrgh\",\"jbdhqxvc\"]},{\"result\":[\"frpdsofbshrns\"]}]}") - .toObject(SqlPoolVulnerabilityAssessmentRuleBaselineProperties.class); - Assertions.assertEquals("nrojlpijnkr", model.baselineResults().get(0).result().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SqlPoolVulnerabilityAssessmentRuleBaselineProperties model = - new SqlPoolVulnerabilityAssessmentRuleBaselineProperties() - .withBaselineResults( - Arrays - .asList( - new SqlPoolVulnerabilityAssessmentRuleBaselineItem() - .withResult(Arrays.asList("nrojlpijnkr", "frddhcrati", "zronasxift", "zq")), - new SqlPoolVulnerabilityAssessmentRuleBaselineItem().withResult(Arrays.asList("hftwesgog")), - new SqlPoolVulnerabilityAssessmentRuleBaselineItem() - .withResult(Arrays.asList("honnxkrlgnyhmos", "xkk", "thrrgh", "jbdhqxvc")), - new SqlPoolVulnerabilityAssessmentRuleBaselineItem() - .withResult(Arrays.asList("frpdsofbshrns")))); - model = BinaryData.fromObject(model).toObject(SqlPoolVulnerabilityAssessmentRuleBaselineProperties.class); - Assertions.assertEquals("nrojlpijnkr", model.baselineResults().get(0).result().get(0)); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentRuleBaselinesCreateOrUpdateWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentRuleBaselinesCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 5d390a1b0a980..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentRuleBaselinesCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.SqlPoolVulnerabilityAssessmentRuleBaseline; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentPolicyBaselineName; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolVulnerabilityAssessmentRuleBaselinesCreateOrUpdateWithResponseMockTests { - @Test - public void testCreateOrUpdateWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"baselineResults\":[]},\"id\":\"gpucdocfq\",\"name\":\"lwgofm\",\"type\":\"xwr\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SqlPoolVulnerabilityAssessmentRuleBaseline response = - manager - .sqlPoolVulnerabilityAssessmentRuleBaselines() - .define(VulnerabilityAssessmentPolicyBaselineName.DEFAULT) - .withExistingRule( - "hkahmjedbiucvkh", "wmjpjbweunxcqrr", "hu", VulnerabilityAssessmentName.DEFAULT, "ihppiyb") - .withBaselineResults(Arrays.asList()) - .create(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentRuleBaselinesDeleteWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentRuleBaselinesDeleteWithResponseMockTests.java deleted file mode 100644 index 31243a3697080..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentRuleBaselinesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentPolicyBaselineName; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolVulnerabilityAssessmentRuleBaselinesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .sqlPoolVulnerabilityAssessmentRuleBaselines() - .deleteWithResponse( - "usuaa", - "jakx", - "jnfczmnniixy", - VulnerabilityAssessmentName.DEFAULT, - "qban", - VulnerabilityAssessmentPolicyBaselineName.DEFAULT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentRuleBaselinesGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentRuleBaselinesGetWithResponseMockTests.java deleted file mode 100644 index 4571cf8cbce28..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentRuleBaselinesGetWithResponseMockTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.SqlPoolVulnerabilityAssessmentRuleBaseline; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentPolicyBaselineName; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolVulnerabilityAssessmentRuleBaselinesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"baselineResults\":[]},\"id\":\"amfdd\",\"name\":\"vlkpzwb\",\"type\":\"nrecchdidrm\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SqlPoolVulnerabilityAssessmentRuleBaseline response = - manager - .sqlPoolVulnerabilityAssessmentRuleBaselines() - .getWithResponse( - "jtgirnb", - "mgm", - "dorgmynltw", - VulnerabilityAssessmentName.DEFAULT, - "ftmfoeajogsy", - VulnerabilityAssessmentPolicyBaselineName.DEFAULT, - com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScanExportPropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScanExportPropertiesTests.java deleted file mode 100644 index a8c54fa5e1c9b..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScanExportPropertiesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.SqlPoolVulnerabilityAssessmentScanExportProperties; - -public final class SqlPoolVulnerabilityAssessmentScanExportPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SqlPoolVulnerabilityAssessmentScanExportProperties model = - BinaryData - .fromString("{\"exportedReportLocation\":\"aysjkixqtnqttez\"}") - .toObject(SqlPoolVulnerabilityAssessmentScanExportProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SqlPoolVulnerabilityAssessmentScanExportProperties model = - new SqlPoolVulnerabilityAssessmentScanExportProperties(); - model = BinaryData.fromObject(model).toObject(SqlPoolVulnerabilityAssessmentScanExportProperties.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansExportInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansExportInnerTests.java deleted file mode 100644 index 67eec7f4b3d39..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansExportInnerTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.SqlPoolVulnerabilityAssessmentScansExportInner; - -public final class SqlPoolVulnerabilityAssessmentScansExportInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SqlPoolVulnerabilityAssessmentScansExportInner model = - BinaryData - .fromString( - "{\"properties\":{\"exportedReportLocation\":\"tnkdmkqj\"},\"id\":\"lwuenvrkp\",\"name\":\"ou\",\"type\":\"ibreb\"}") - .toObject(SqlPoolVulnerabilityAssessmentScansExportInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SqlPoolVulnerabilityAssessmentScansExportInner model = new SqlPoolVulnerabilityAssessmentScansExportInner(); - model = BinaryData.fromObject(model).toObject(SqlPoolVulnerabilityAssessmentScansExportInner.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansExportWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansExportWithResponseMockTests.java deleted file mode 100644 index 6f36187a4230f..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansExportWithResponseMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.SqlPoolVulnerabilityAssessmentScansExport; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentName; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolVulnerabilityAssessmentScansExportWithResponseMockTests { - @Test - public void testExportWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"exportedReportLocation\":\"giarksykpgdqxw\"},\"id\":\"b\",\"name\":\"rwiqrxhacl\",\"type\":\"dosqkptjqg\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SqlPoolVulnerabilityAssessmentScansExport response = - manager - .sqlPoolVulnerabilityAssessmentScans() - .exportWithResponse( - "ysmvxodgwxf", - "zsifcuvbdujgcwx", - "ec", - VulnerabilityAssessmentName.DEFAULT, - "wjtrdxriza", - com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansGetWithResponseMockTests.java deleted file mode 100644 index fe83042f01f0d..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansGetWithResponseMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentScanRecord; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolVulnerabilityAssessmentScansGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"scanId\":\"elwgvydjufbnkl\",\"triggerType\":\"OnDemand\",\"state\":\"Passed\",\"startTime\":\"2021-05-19T00:09:58Z\",\"endTime\":\"2021-10-19T04:55:03Z\",\"errors\":[],\"storageContainerPath\":\"alf\",\"numberOfFailedSecurityChecks\":516055639},\"id\":\"glzfytl\",\"name\":\"tlqh\",\"type\":\"pxouvmr\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - VulnerabilityAssessmentScanRecord response = - manager - .sqlPoolVulnerabilityAssessmentScans() - .getWithResponse( - "ifmmainwh", - "d", - "kp", - VulnerabilityAssessmentName.DEFAULT, - "wuntobuiz", - com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansInitiateScanMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansInitiateScanMockTests.java deleted file mode 100644 index 6a8b9dd2ea166..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansInitiateScanMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentName; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolVulnerabilityAssessmentScansInitiateScanMockTests { - @Test - public void testInitiateScan() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .sqlPoolVulnerabilityAssessmentScans() - .initiateScan( - "dmncgbf", - "uscstunmlh", - "dfb", - VulnerabilityAssessmentName.DEFAULT, - "ciichgj", - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansListMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansListMockTests.java deleted file mode 100644 index 7cc623ec02936..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentScansListMockTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentName; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentScanRecord; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolVulnerabilityAssessmentScansListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"scanId\":\"ampqcrzgeuq\",\"triggerType\":\"Recurring\",\"state\":\"Failed\",\"startTime\":\"2021-07-26T16:48:01Z\",\"endTime\":\"2021-01-30T22:45:37Z\",\"errors\":[],\"storageContainerPath\":\"gqdtadrakg\",\"numberOfFailedSecurityChecks\":924951023},\"id\":\"jkrukizyhgsqtnqs\",\"name\":\"txqfpjbq\",\"type\":\"gweeiwd\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .sqlPoolVulnerabilityAssessmentScans() - .list( - "pmypgfq", - "mtywhla", - "xpejpewpy", - VulnerabilityAssessmentName.DEFAULT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentsDeleteWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentsDeleteWithResponseMockTests.java deleted file mode 100644 index 25b7b1740e9ca..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolVulnerabilityAssessmentsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentName; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolVulnerabilityAssessmentsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .sqlPoolVulnerabilityAssessments() - .deleteWithResponse( - "moxsa", - "uxejgwecywnfyszz", - "czs", - VulnerabilityAssessmentName.DEFAULT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadClassifiersCreateOrUpdateMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadClassifiersCreateOrUpdateMockTests.java deleted file mode 100644 index ac8303f4bb1aa..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadClassifiersCreateOrUpdateMockTests.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.WorkloadClassifier; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolWorkloadClassifiersCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"memberName\":\"ieopexelxqdwr\",\"label\":\"yil\",\"context\":\"ibkgxyxyau\",\"startTime\":\"eddobmcnltm\",\"endTime\":\"tkujsqycm\",\"importance\":\"xfabl\"},\"id\":\"gpwb\",\"name\":\"whrialiwrycgn\",\"type\":\"plrr\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkloadClassifier response = - manager - .sqlPoolWorkloadClassifiers() - .define("ubhg") - .withExistingWorkloadGroup("cmiwdw", "svnmeylajamcajy", "ftpzcrryklleyn", "anhkigglclwalh") - .withMemberName("hetxdqcmyctajqz") - .withLabel("alec") - .withContext("ibiwksdegyxsb") - .withStartTime("zvoikvntwczf") - .withEndTime("ushlcxpblalh") - .withImportance("zpfkis") - .create(); - - Assertions.assertEquals("ieopexelxqdwr", response.memberName()); - Assertions.assertEquals("yil", response.label()); - Assertions.assertEquals("ibkgxyxyau", response.context()); - Assertions.assertEquals("eddobmcnltm", response.startTime()); - Assertions.assertEquals("tkujsqycm", response.endTime()); - Assertions.assertEquals("xfabl", response.importance()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadClassifiersDeleteMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadClassifiersDeleteMockTests.java deleted file mode 100644 index d2e2f6040f7e7..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadClassifiersDeleteMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolWorkloadClassifiersDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .sqlPoolWorkloadClassifiers() - .delete("xhrptyodlh", "fktltdds", "bjop", "ouhbq", "zkqxsalu", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadClassifiersGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadClassifiersGetWithResponseMockTests.java deleted file mode 100644 index dc50f78a671cb..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadClassifiersGetWithResponseMockTests.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.WorkloadClassifier; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolWorkloadClassifiersGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"memberName\":\"samonat\",\"label\":\"zexroqsqjgh\",\"context\":\"thsplwsttxsr\",\"startTime\":\"fq\",\"endTime\":\"niceovxgzwh\",\"importance\":\"yrujm\"},\"id\":\"i\",\"name\":\"eslikyohzixyqhf\",\"type\":\"kvycqqqdseipnquw\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkloadClassifier response = - manager - .sqlPoolWorkloadClassifiers() - .getWithResponse( - "oyj", - "mfqzwqdnx", - "eedcnwmywx", - "qzkvemyzdpczaq", - "qifdbmptrwtxz", - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("samonat", response.memberName()); - Assertions.assertEquals("zexroqsqjgh", response.label()); - Assertions.assertEquals("thsplwsttxsr", response.context()); - Assertions.assertEquals("fq", response.startTime()); - Assertions.assertEquals("niceovxgzwh", response.endTime()); - Assertions.assertEquals("yrujm", response.importance()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadClassifiersListMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadClassifiersListMockTests.java deleted file mode 100644 index 7a5c79faf95e4..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadClassifiersListMockTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.WorkloadClassifier; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolWorkloadClassifiersListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"memberName\":\"yqmrejpa\",\"label\":\"pvgrszr\",\"context\":\"tdrcwgzwl\",\"startTime\":\"zlhhfix\",\"endTime\":\"fculzjrmhpfyw\",\"importance\":\"ldqpzf\"},\"id\":\"xsoxi\",\"name\":\"unjlzkdrocq\",\"type\":\"xytqq\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .sqlPoolWorkloadClassifiers() - .list("yigfcvcew", "wqhdgsjsa", "mrncmaz", "fsq", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("yqmrejpa", response.iterator().next().memberName()); - Assertions.assertEquals("pvgrszr", response.iterator().next().label()); - Assertions.assertEquals("tdrcwgzwl", response.iterator().next().context()); - Assertions.assertEquals("zlhhfix", response.iterator().next().startTime()); - Assertions.assertEquals("fculzjrmhpfyw", response.iterator().next().endTime()); - Assertions.assertEquals("ldqpzf", response.iterator().next().importance()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadGroupsCreateOrUpdateMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadGroupsCreateOrUpdateMockTests.java deleted file mode 100644 index d6f46afa5147e..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadGroupsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.WorkloadGroup; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolWorkloadGroupsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"minResourcePercent\":453404729,\"maxResourcePercent\":674809851,\"minResourcePercentPerRequest\":32.96738546288102,\"maxResourcePercentPerRequest\":30.618266500851867,\"importance\":\"oejng\",\"queryExecutionTimeout\":1730568794},\"id\":\"s\",\"name\":\"daxjsum\",\"type\":\"pezco\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkloadGroup response = - manager - .sqlPoolWorkloadGroups() - .define("qgkujds") - .withExistingSqlPool("tqm", "wz", "drpizfulgyctsdb") - .withMinResourcePercent(1079434333) - .withMaxResourcePercent(31780783) - .withMinResourcePercentPerRequest(78.9520427818557) - .withMaxResourcePercentPerRequest(89.21254465206381D) - .withImportance("btigapdyarikeejd") - .withQueryExecutionTimeout(348647398) - .create(); - - Assertions.assertEquals(453404729, response.minResourcePercent()); - Assertions.assertEquals(674809851, response.maxResourcePercent()); - Assertions.assertEquals(32.96738546288102, response.minResourcePercentPerRequest()); - Assertions.assertEquals(30.618266500851867D, response.maxResourcePercentPerRequest()); - Assertions.assertEquals("oejng", response.importance()); - Assertions.assertEquals(1730568794, response.queryExecutionTimeout()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadGroupsDeleteMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadGroupsDeleteMockTests.java deleted file mode 100644 index 75faff31a1b0b..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadGroupsDeleteMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolWorkloadGroupsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .sqlPoolWorkloadGroups() - .delete("fxlupibaq", "izxzpzweghl", "wbogvgfklqiy", "dve", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadGroupsGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadGroupsGetWithResponseMockTests.java deleted file mode 100644 index 7f5dbc857c111..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadGroupsGetWithResponseMockTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.WorkloadGroup; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolWorkloadGroupsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"minResourcePercent\":2137176136,\"maxResourcePercent\":1086346110,\"minResourcePercentPerRequest\":46.161386887148105,\"maxResourcePercentPerRequest\":75.77077117649453,\"importance\":\"xuknsykdtoi\",\"queryExecutionTimeout\":1554888273},\"id\":\"ncdrcoanvxuldx\",\"name\":\"nck\",\"type\":\"nlb\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkloadGroup response = - manager - .sqlPoolWorkloadGroups() - .getWithResponse("zidgzwd", "damisvpztdi", "ykpxkqejt", "j", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(2137176136, response.minResourcePercent()); - Assertions.assertEquals(1086346110, response.maxResourcePercent()); - Assertions.assertEquals(46.161386887148105, response.minResourcePercentPerRequest()); - Assertions.assertEquals(75.77077117649453D, response.maxResourcePercentPerRequest()); - Assertions.assertEquals("xuknsykdtoi", response.importance()); - Assertions.assertEquals(1554888273, response.queryExecutionTimeout()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadGroupsListMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadGroupsListMockTests.java deleted file mode 100644 index 71df6f70a5cff..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolWorkloadGroupsListMockTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.WorkloadGroup; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolWorkloadGroupsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"minResourcePercent\":282880446,\"maxResourcePercent\":1621480813,\"minResourcePercentPerRequest\":1.0193954701750108,\"maxResourcePercentPerRequest\":98.46606066426715,\"importance\":\"a\",\"queryExecutionTimeout\":1738475675},\"id\":\"qaqotnn\",\"name\":\"xolousdv\",\"type\":\"g\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.sqlPoolWorkloadGroups().list("elsbfvd", "trkzxsgtznsvlrds", "o", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(282880446, response.iterator().next().minResourcePercent()); - Assertions.assertEquals(1621480813, response.iterator().next().maxResourcePercent()); - Assertions.assertEquals(1.0193954701750108, response.iterator().next().minResourcePercentPerRequest()); - Assertions.assertEquals(98.46606066426715D, response.iterator().next().maxResourcePercentPerRequest()); - Assertions.assertEquals("a", response.iterator().next().importance()); - Assertions.assertEquals(1738475675, response.iterator().next().queryExecutionTimeout()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolsCreateMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolsCreateMockTests.java deleted file mode 100644 index 47fe0daaa6f6e..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolsCreateMockTests.java +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.CreateMode; -import com.azure.resourcemanager.synapse.models.Sku; -import com.azure.resourcemanager.synapse.models.SqlPool; -import com.azure.resourcemanager.synapse.models.StorageAccountType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolsCreateMockTests { - @Test - public void testCreate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"sku\":{\"tier\":\"cnadbuwqrgxf\",\"name\":\"mqiyn\",\"capacity\":1277204579},\"properties\":{\"maxSizeBytes\":8493195048582783222,\"collation\":\"kiiwvmtu\",\"sourceDatabaseId\":\"pymdjfuax\",\"recoverableDatabaseId\":\"qvqpilrg\",\"provisioningState\":\"Succeeded\",\"status\":\"x\",\"restorePointInTime\":\"2021-02-04T06:25:12Z\",\"createMode\":\"Default\",\"creationDate\":\"2021-10-19T15:40:56Z\",\"storageAccountType\":\"GRS\",\"sourceDatabaseDeletionDate\":\"2021-01-30T10:04:36Z\"},\"location\":\"fqep\",\"tags\":{\"vpjbowcpjqduq\":\"ltuubw\"},\"id\":\"ixexkydfbwljavhu\",\"name\":\"rkjd\",\"type\":\"vrg\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SqlPool response = - manager - .sqlPools() - .define("zbeqrztrxa") - .withRegion("fquwzpwiibel") - .withExistingWorkspace("yubqjr", "stvrjeqmt") - .withTags(mapOf("tbxxniuisd", "rwkwbpjxljtxbus")) - .withSku(new Sku().withTier("d").withName("bsrwrsnrhpqat").withCapacity(1985543449)) - .withMaxSizeBytes(575751252969177352L) - .withCollation("xkvvcs") - .withSourceDatabaseId("svuv") - .withRecoverableDatabaseId("kqxetqmmliv") - .withProvisioningState("jxnw") - .withRestorePointInTime(OffsetDateTime.parse("2021-07-27T18:54:55Z")) - .withCreateMode(CreateMode.DEFAULT) - .withStorageAccountType(StorageAccountType.GRS) - .withSourceDatabaseDeletionDate(OffsetDateTime.parse("2021-04-29T09:33:37Z")) - .create(); - - Assertions.assertEquals("fqep", response.location()); - Assertions.assertEquals("ltuubw", response.tags().get("vpjbowcpjqduq")); - Assertions.assertEquals("cnadbuwqrgxf", response.sku().tier()); - Assertions.assertEquals("mqiyn", response.sku().name()); - Assertions.assertEquals(1277204579, response.sku().capacity()); - Assertions.assertEquals(8493195048582783222L, response.maxSizeBytes()); - Assertions.assertEquals("kiiwvmtu", response.collation()); - Assertions.assertEquals("pymdjfuax", response.sourceDatabaseId()); - Assertions.assertEquals("qvqpilrg", response.recoverableDatabaseId()); - Assertions.assertEquals("Succeeded", response.provisioningState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-04T06:25:12Z"), response.restorePointInTime()); - Assertions.assertEquals(CreateMode.DEFAULT, response.createMode()); - Assertions.assertEquals(StorageAccountType.GRS, response.storageAccountType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-30T10:04:36Z"), response.sourceDatabaseDeletionDate()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolsDeleteMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolsDeleteMockTests.java deleted file mode 100644 index 321de8acc6ff0..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolsDeleteMockTests.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.CreateMode; -import com.azure.resourcemanager.synapse.models.SqlPool; -import com.azure.resourcemanager.synapse.models.StorageAccountType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"sku\":{\"tier\":\"gfgf\",\"name\":\"jrykwlefksxqce\",\"capacity\":119953679},\"properties\":{\"maxSizeBytes\":428961828074750240,\"collation\":\"qvzvlu\",\"sourceDatabaseId\":\"qa\",\"recoverableDatabaseId\":\"ssscyvai\",\"provisioningState\":\"Succeeded\",\"status\":\"cvfyeowpsfxtjdhs\",\"restorePointInTime\":\"2021-10-20T12:49:56Z\",\"createMode\":\"Restore\",\"creationDate\":\"2021-06-14T00:45:35Z\",\"storageAccountType\":\"LRS\",\"sourceDatabaseDeletionDate\":\"2021-11-12T07:02:25Z\"},\"location\":\"tehdpboujs\",\"tags\":{\"ygnxcgjtfrnqukt\":\"vvdshxcdedsue\",\"trwntfmtbgw\":\"fnslnlrxsmy\",\"eyz\":\"dxwnazkurrd\",\"uzu\":\"whsetwwjwzzqs\"},\"id\":\"kykcyqhyqqzz\",\"name\":\"c\",\"type\":\"keys\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SqlPool response = manager.sqlPools().delete("ljssm", "tsnld", "pwolgisubxb", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("tehdpboujs", response.location()); - Assertions.assertEquals("vvdshxcdedsue", response.tags().get("ygnxcgjtfrnqukt")); - Assertions.assertEquals("gfgf", response.sku().tier()); - Assertions.assertEquals("jrykwlefksxqce", response.sku().name()); - Assertions.assertEquals(119953679, response.sku().capacity()); - Assertions.assertEquals(428961828074750240L, response.maxSizeBytes()); - Assertions.assertEquals("qvzvlu", response.collation()); - Assertions.assertEquals("qa", response.sourceDatabaseId()); - Assertions.assertEquals("ssscyvai", response.recoverableDatabaseId()); - Assertions.assertEquals("Succeeded", response.provisioningState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-20T12:49:56Z"), response.restorePointInTime()); - Assertions.assertEquals(CreateMode.RESTORE, response.createMode()); - Assertions.assertEquals(StorageAccountType.LRS, response.storageAccountType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-12T07:02:25Z"), response.sourceDatabaseDeletionDate()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolsGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolsGetWithResponseMockTests.java deleted file mode 100644 index 0051d7b7b0ba4..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolsGetWithResponseMockTests.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.CreateMode; -import com.azure.resourcemanager.synapse.models.SqlPool; -import com.azure.resourcemanager.synapse.models.StorageAccountType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"sku\":{\"tier\":\"tkgsuxunrswgkpj\",\"name\":\"oyikebhuhks\",\"capacity\":1524104857},\"properties\":{\"maxSizeBytes\":1934129892108471165,\"collation\":\"eoijyzcqypzqzufg\",\"sourceDatabaseId\":\"fejyvdwtfxptpqa\",\"recoverableDatabaseId\":\"mkncfgybmxsnxo\",\"provisioningState\":\"ullojk\",\"status\":\"yhgww\",\"restorePointInTime\":\"2021-03-30T05:34:26Z\",\"createMode\":\"Default\",\"creationDate\":\"2021-05-01T10:12:57Z\",\"storageAccountType\":\"LRS\",\"sourceDatabaseDeletionDate\":\"2020-12-23T13:16:04Z\"},\"location\":\"yrcvuqbsgzlrq\",\"tags\":{\"gdxwbsfpyxx\":\"nq\",\"ecominxojjluxxd\":\"jlf\",\"dzzqjmu\":\"ilz\",\"ovribq\":\"za\"},\"id\":\"otokhtvwtaznk\",\"name\":\"qww\",\"type\":\"wjyofgwhnkbtl\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SqlPool response = - manager - .sqlPools() - .getWithResponse("xbibanbaupw", "zvpaklozkxbzrpej", "lssan", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("yrcvuqbsgzlrq", response.location()); - Assertions.assertEquals("nq", response.tags().get("gdxwbsfpyxx")); - Assertions.assertEquals("tkgsuxunrswgkpj", response.sku().tier()); - Assertions.assertEquals("oyikebhuhks", response.sku().name()); - Assertions.assertEquals(1524104857, response.sku().capacity()); - Assertions.assertEquals(1934129892108471165L, response.maxSizeBytes()); - Assertions.assertEquals("eoijyzcqypzqzufg", response.collation()); - Assertions.assertEquals("fejyvdwtfxptpqa", response.sourceDatabaseId()); - Assertions.assertEquals("mkncfgybmxsnxo", response.recoverableDatabaseId()); - Assertions.assertEquals("ullojk", response.provisioningState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-30T05:34:26Z"), response.restorePointInTime()); - Assertions.assertEquals(CreateMode.DEFAULT, response.createMode()); - Assertions.assertEquals(StorageAccountType.LRS, response.storageAccountType()); - Assertions.assertEquals(OffsetDateTime.parse("2020-12-23T13:16:04Z"), response.sourceDatabaseDeletionDate()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolsListByWorkspaceMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolsListByWorkspaceMockTests.java deleted file mode 100644 index 914149025d9a2..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolsListByWorkspaceMockTests.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.CreateMode; -import com.azure.resourcemanager.synapse.models.SqlPool; -import com.azure.resourcemanager.synapse.models.StorageAccountType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolsListByWorkspaceMockTests { - @Test - public void testListByWorkspace() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"sku\":{\"tier\":\"pvozglqjbknlzc\",\"name\":\"tzeyowmndcovd\",\"capacity\":1784939466},\"properties\":{\"maxSizeBytes\":7398433099501562238,\"collation\":\"nhmkvfruwku\",\"sourceDatabaseId\":\"bcpftxudqyemebun\",\"recoverableDatabaseId\":\"cmcir\",\"provisioningState\":\"eemmjauwcgx\",\"status\":\"noh\",\"restorePointInTime\":\"2021-06-10T07:29:48Z\",\"createMode\":\"Restore\",\"creationDate\":\"2021-08-02T08:56:51Z\",\"storageAccountType\":\"GRS\",\"sourceDatabaseDeletionDate\":\"2021-03-02T16:05:57Z\"},\"location\":\"gudasmxubvfb\",\"tags\":{\"hpriylfm\":\"coce\",\"vhl\":\"ztraud\",\"tmojhvrztnvgyshq\":\"dculregp\"},\"id\":\"dgrtwmew\",\"name\":\"zlpykcfazzwjcay\",\"type\":\"rzrr\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.sqlPools().listByWorkspace("ewfopazdazg", "sqgpewqcfu", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("gudasmxubvfb", response.iterator().next().location()); - Assertions.assertEquals("coce", response.iterator().next().tags().get("hpriylfm")); - Assertions.assertEquals("pvozglqjbknlzc", response.iterator().next().sku().tier()); - Assertions.assertEquals("tzeyowmndcovd", response.iterator().next().sku().name()); - Assertions.assertEquals(1784939466, response.iterator().next().sku().capacity()); - Assertions.assertEquals(7398433099501562238L, response.iterator().next().maxSizeBytes()); - Assertions.assertEquals("nhmkvfruwku", response.iterator().next().collation()); - Assertions.assertEquals("bcpftxudqyemebun", response.iterator().next().sourceDatabaseId()); - Assertions.assertEquals("cmcir", response.iterator().next().recoverableDatabaseId()); - Assertions.assertEquals("eemmjauwcgx", response.iterator().next().provisioningState()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-06-10T07:29:48Z"), response.iterator().next().restorePointInTime()); - Assertions.assertEquals(CreateMode.RESTORE, response.iterator().next().createMode()); - Assertions.assertEquals(StorageAccountType.GRS, response.iterator().next().storageAccountType()); - Assertions - .assertEquals( - OffsetDateTime.parse("2021-03-02T16:05:57Z"), response.iterator().next().sourceDatabaseDeletionDate()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolsPauseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolsPauseMockTests.java deleted file mode 100644 index 4050c1bd31583..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolsPauseMockTests.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.CreateMode; -import com.azure.resourcemanager.synapse.models.SqlPool; -import com.azure.resourcemanager.synapse.models.StorageAccountType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolsPauseMockTests { - @Test - public void testPause() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"sku\":{\"tier\":\"fqwtltngvm\",\"name\":\"uptrklz\",\"capacity\":1008629589},\"properties\":{\"maxSizeBytes\":1427322319045036829,\"collation\":\"xfsv\",\"sourceDatabaseId\":\"h\",\"recoverableDatabaseId\":\"ynwlslrcigtzjcv\",\"provisioningState\":\"Succeeded\",\"status\":\"xpavid\",\"restorePointInTime\":\"2021-01-18T02:31:50Z\",\"createMode\":\"PointInTimeRestore\",\"creationDate\":\"2021-08-20T14:25:11Z\",\"storageAccountType\":\"LRS\",\"sourceDatabaseDeletionDate\":\"2021-01-18T14:39:45Z\"},\"location\":\"ezslp\",\"tags\":{\"gpazwu\":\"cbdsvalpnptwtrk\",\"qvn\":\"x\",\"gqlmfaewzgi\":\"obfelhldiuhz\",\"qhnmhk\":\"djpxpqht\"},\"id\":\"ezsdsuxheq\",\"name\":\"gcruxspinym\",\"type\":\"qgwokmikp\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SqlPool response = - manager.sqlPools().pause("nsyby", "polwzrghsrlei", "kfscjfncjwv", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ezslp", response.location()); - Assertions.assertEquals("cbdsvalpnptwtrk", response.tags().get("gpazwu")); - Assertions.assertEquals("fqwtltngvm", response.sku().tier()); - Assertions.assertEquals("uptrklz", response.sku().name()); - Assertions.assertEquals(1008629589, response.sku().capacity()); - Assertions.assertEquals(1427322319045036829L, response.maxSizeBytes()); - Assertions.assertEquals("xfsv", response.collation()); - Assertions.assertEquals("h", response.sourceDatabaseId()); - Assertions.assertEquals("ynwlslrcigtzjcv", response.recoverableDatabaseId()); - Assertions.assertEquals("Succeeded", response.provisioningState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-18T02:31:50Z"), response.restorePointInTime()); - Assertions.assertEquals(CreateMode.POINT_IN_TIME_RESTORE, response.createMode()); - Assertions.assertEquals(StorageAccountType.LRS, response.storageAccountType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-18T14:39:45Z"), response.sourceDatabaseDeletionDate()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolsRenameWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolsRenameWithResponseMockTests.java deleted file mode 100644 index 663b740e2869d..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolsRenameWithResponseMockTests.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.ResourceMoveDefinition; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolsRenameWithResponseMockTests { - @Test - public void testRenameWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .sqlPools() - .renameWithResponse( - "sbvr", - "aqgvto", - "rulfuct", - new ResourceMoveDefinition().withId("jrthcfjzhx"), - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolsResumeMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolsResumeMockTests.java deleted file mode 100644 index 74e9014a405f8..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SqlPoolsResumeMockTests.java +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.CreateMode; -import com.azure.resourcemanager.synapse.models.SqlPool; -import com.azure.resourcemanager.synapse.models.StorageAccountType; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class SqlPoolsResumeMockTests { - @Test - public void testResume() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"sku\":{\"tier\":\"xwgiks\",\"name\":\"vtooxrpo\",\"capacity\":1965828924},\"properties\":{\"maxSizeBytes\":5459654282928424634,\"collation\":\"t\",\"sourceDatabaseId\":\"tukfacih\",\"recoverableDatabaseId\":\"fntumeezbxvqx\",\"provisioningState\":\"Succeeded\",\"status\":\"sgomtmjz\",\"restorePointInTime\":\"2021-10-20T22:57:09Z\",\"createMode\":\"Recovery\",\"creationDate\":\"2021-07-29T00:46:34Z\",\"storageAccountType\":\"GRS\",\"sourceDatabaseDeletionDate\":\"2021-07-02T06:01:53Z\"},\"location\":\"wztjfmk\",\"tags\":{\"ll\":\"gfredmlscg\",\"azhpabacoml\":\"cnaovjo\",\"nmvceb\":\"otgkwsxnsrqorcg\",\"dcqjkedwqurc\":\"eetqujxcxxq\"},\"id\":\"ojmrvvxwjongzse\",\"name\":\"qqrsil\",\"type\":\"chskxxka\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SqlPool response = - manager - .sqlPools() - .resume("zfbmjxuv", "ipfdvhaxdvwzaehp", "hthdklmvetatlakf", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("wztjfmk", response.location()); - Assertions.assertEquals("gfredmlscg", response.tags().get("ll")); - Assertions.assertEquals("xwgiks", response.sku().tier()); - Assertions.assertEquals("vtooxrpo", response.sku().name()); - Assertions.assertEquals(1965828924, response.sku().capacity()); - Assertions.assertEquals(5459654282928424634L, response.maxSizeBytes()); - Assertions.assertEquals("t", response.collation()); - Assertions.assertEquals("tukfacih", response.sourceDatabaseId()); - Assertions.assertEquals("fntumeezbxvqx", response.recoverableDatabaseId()); - Assertions.assertEquals("Succeeded", response.provisioningState()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-20T22:57:09Z"), response.restorePointInTime()); - Assertions.assertEquals(CreateMode.RECOVERY, response.createMode()); - Assertions.assertEquals(StorageAccountType.GRS, response.storageAccountType()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-02T06:01:53Z"), response.sourceDatabaseDeletionDate()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SsisEnvironmentReferenceTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SsisEnvironmentReferenceTests.java deleted file mode 100644 index 4a20b461fb963..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SsisEnvironmentReferenceTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.SsisEnvironmentReference; -import org.junit.jupiter.api.Assertions; - -public final class SsisEnvironmentReferenceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SsisEnvironmentReference model = - BinaryData - .fromString( - "{\"id\":6838146046681775912,\"environmentFolderName\":\"iqch\",\"environmentName\":\"tuicds\",\"referenceType\":\"dfmmpzhzzwvy\"}") - .toObject(SsisEnvironmentReference.class); - Assertions.assertEquals(6838146046681775912L, model.id()); - Assertions.assertEquals("iqch", model.environmentFolderName()); - Assertions.assertEquals("tuicds", model.environmentName()); - Assertions.assertEquals("dfmmpzhzzwvy", model.referenceType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SsisEnvironmentReference model = - new SsisEnvironmentReference() - .withId(6838146046681775912L) - .withEnvironmentFolderName("iqch") - .withEnvironmentName("tuicds") - .withReferenceType("dfmmpzhzzwvy"); - model = BinaryData.fromObject(model).toObject(SsisEnvironmentReference.class); - Assertions.assertEquals(6838146046681775912L, model.id()); - Assertions.assertEquals("iqch", model.environmentFolderName()); - Assertions.assertEquals("tuicds", model.environmentName()); - Assertions.assertEquals("dfmmpzhzzwvy", model.referenceType()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SsisEnvironmentTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SsisEnvironmentTests.java deleted file mode 100644 index ba0b1c4386f66..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SsisEnvironmentTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.SsisEnvironment; -import com.azure.resourcemanager.synapse.models.SsisVariable; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SsisEnvironmentTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SsisEnvironment model = - BinaryData - .fromString( - "{\"type\":\"Environment\",\"folderId\":293197962792845943,\"variables\":[{\"id\":1447837022418760517,\"name\":\"bgvopemt\",\"description\":\"qujlyegqa\",\"dataType\":\"igflqqbtnyjp\",\"sensitive\":false,\"value\":\"bf\",\"sensitiveValue\":\"bmvmsxba\"}],\"id\":484983659590178245,\"name\":\"nkottlwuhv\",\"description\":\"mailfemjj\"}") - .toObject(SsisEnvironment.class); - Assertions.assertEquals(484983659590178245L, model.id()); - Assertions.assertEquals("nkottlwuhv", model.name()); - Assertions.assertEquals("mailfemjj", model.description()); - Assertions.assertEquals(293197962792845943L, model.folderId()); - Assertions.assertEquals(1447837022418760517L, model.variables().get(0).id()); - Assertions.assertEquals("bgvopemt", model.variables().get(0).name()); - Assertions.assertEquals("qujlyegqa", model.variables().get(0).description()); - Assertions.assertEquals("igflqqbtnyjp", model.variables().get(0).dataType()); - Assertions.assertEquals(false, model.variables().get(0).sensitive()); - Assertions.assertEquals("bf", model.variables().get(0).value()); - Assertions.assertEquals("bmvmsxba", model.variables().get(0).sensitiveValue()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SsisEnvironment model = - new SsisEnvironment() - .withId(484983659590178245L) - .withName("nkottlwuhv") - .withDescription("mailfemjj") - .withFolderId(293197962792845943L) - .withVariables( - Arrays - .asList( - new SsisVariable() - .withId(1447837022418760517L) - .withName("bgvopemt") - .withDescription("qujlyegqa") - .withDataType("igflqqbtnyjp") - .withSensitive(false) - .withValue("bf") - .withSensitiveValue("bmvmsxba"))); - model = BinaryData.fromObject(model).toObject(SsisEnvironment.class); - Assertions.assertEquals(484983659590178245L, model.id()); - Assertions.assertEquals("nkottlwuhv", model.name()); - Assertions.assertEquals("mailfemjj", model.description()); - Assertions.assertEquals(293197962792845943L, model.folderId()); - Assertions.assertEquals(1447837022418760517L, model.variables().get(0).id()); - Assertions.assertEquals("bgvopemt", model.variables().get(0).name()); - Assertions.assertEquals("qujlyegqa", model.variables().get(0).description()); - Assertions.assertEquals("igflqqbtnyjp", model.variables().get(0).dataType()); - Assertions.assertEquals(false, model.variables().get(0).sensitive()); - Assertions.assertEquals("bf", model.variables().get(0).value()); - Assertions.assertEquals("bmvmsxba", model.variables().get(0).sensitiveValue()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SsisFolderTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SsisFolderTests.java deleted file mode 100644 index a144ef7bc7e7a..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SsisFolderTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.SsisFolder; -import org.junit.jupiter.api.Assertions; - -public final class SsisFolderTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SsisFolder model = - BinaryData - .fromString( - "{\"type\":\"Folder\",\"id\":9026085533674004933,\"name\":\"nl\",\"description\":\"mxcpwzvmdoks\"}") - .toObject(SsisFolder.class); - Assertions.assertEquals(9026085533674004933L, model.id()); - Assertions.assertEquals("nl", model.name()); - Assertions.assertEquals("mxcpwzvmdoks", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SsisFolder model = new SsisFolder().withId(9026085533674004933L).withName("nl").withDescription("mxcpwzvmdoks"); - model = BinaryData.fromObject(model).toObject(SsisFolder.class); - Assertions.assertEquals(9026085533674004933L, model.id()); - Assertions.assertEquals("nl", model.name()); - Assertions.assertEquals("mxcpwzvmdoks", model.description()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SsisObjectMetadataListResponseInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SsisObjectMetadataListResponseInnerTests.java deleted file mode 100644 index 420e5cc334c3c..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SsisObjectMetadataListResponseInnerTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.SsisObjectMetadataListResponseInner; -import com.azure.resourcemanager.synapse.models.SsisObjectMetadata; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SsisObjectMetadataListResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SsisObjectMetadataListResponseInner model = - BinaryData - .fromString( - "{\"value\":[{\"type\":\"SsisObjectMetadata\",\"id\":4290491258630313761,\"name\":\"qalarvlagunbtg\",\"description\":\"bwln\"},{\"type\":\"SsisObjectMetadata\",\"id\":6785534445230421786,\"name\":\"e\",\"description\":\"dzqavbpdqmjxlyyz\"},{\"type\":\"SsisObjectMetadata\",\"id\":8314033620834020740,\"name\":\"wtlmjjyuo\",\"description\":\"tob\"}],\"nextLink\":\"kjeytunl\"}") - .toObject(SsisObjectMetadataListResponseInner.class); - Assertions.assertEquals(4290491258630313761L, model.value().get(0).id()); - Assertions.assertEquals("qalarvlagunbtg", model.value().get(0).name()); - Assertions.assertEquals("bwln", model.value().get(0).description()); - Assertions.assertEquals("kjeytunl", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SsisObjectMetadataListResponseInner model = - new SsisObjectMetadataListResponseInner() - .withValue( - Arrays - .asList( - new SsisObjectMetadata() - .withId(4290491258630313761L) - .withName("qalarvlagunbtg") - .withDescription("bwln"), - new SsisObjectMetadata() - .withId(6785534445230421786L) - .withName("e") - .withDescription("dzqavbpdqmjxlyyz"), - new SsisObjectMetadata() - .withId(8314033620834020740L) - .withName("wtlmjjyuo") - .withDescription("tob"))) - .withNextLink("kjeytunl"); - model = BinaryData.fromObject(model).toObject(SsisObjectMetadataListResponseInner.class); - Assertions.assertEquals(4290491258630313761L, model.value().get(0).id()); - Assertions.assertEquals("qalarvlagunbtg", model.value().get(0).name()); - Assertions.assertEquals("bwln", model.value().get(0).description()); - Assertions.assertEquals("kjeytunl", model.nextLink()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SsisObjectMetadataStatusResponseInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SsisObjectMetadataStatusResponseInnerTests.java deleted file mode 100644 index 6c2ee9d284f3b..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SsisObjectMetadataStatusResponseInnerTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.SsisObjectMetadataStatusResponseInner; -import org.junit.jupiter.api.Assertions; - -public final class SsisObjectMetadataStatusResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SsisObjectMetadataStatusResponseInner model = - BinaryData - .fromString("{\"status\":\"rpqaf\",\"name\":\"ug\",\"properties\":\"n\",\"error\":\"yetefyp\"}") - .toObject(SsisObjectMetadataStatusResponseInner.class); - Assertions.assertEquals("rpqaf", model.status()); - Assertions.assertEquals("ug", model.name()); - Assertions.assertEquals("n", model.properties()); - Assertions.assertEquals("yetefyp", model.error()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SsisObjectMetadataStatusResponseInner model = - new SsisObjectMetadataStatusResponseInner() - .withStatus("rpqaf") - .withName("ug") - .withProperties("n") - .withError("yetefyp"); - model = BinaryData.fromObject(model).toObject(SsisObjectMetadataStatusResponseInner.class); - Assertions.assertEquals("rpqaf", model.status()); - Assertions.assertEquals("ug", model.name()); - Assertions.assertEquals("n", model.properties()); - Assertions.assertEquals("yetefyp", model.error()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SsisObjectMetadataTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SsisObjectMetadataTests.java deleted file mode 100644 index d4c45c075929c..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SsisObjectMetadataTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.SsisObjectMetadata; -import org.junit.jupiter.api.Assertions; - -public final class SsisObjectMetadataTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SsisObjectMetadata model = - BinaryData - .fromString( - "{\"type\":\"SsisObjectMetadata\",\"id\":1092833770450672714,\"name\":\"rusnk\",\"description\":\"hsyrqunj\"}") - .toObject(SsisObjectMetadata.class); - Assertions.assertEquals(1092833770450672714L, model.id()); - Assertions.assertEquals("rusnk", model.name()); - Assertions.assertEquals("hsyrqunj", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SsisObjectMetadata model = - new SsisObjectMetadata().withId(1092833770450672714L).withName("rusnk").withDescription("hsyrqunj"); - model = BinaryData.fromObject(model).toObject(SsisObjectMetadata.class); - Assertions.assertEquals(1092833770450672714L, model.id()); - Assertions.assertEquals("rusnk", model.name()); - Assertions.assertEquals("hsyrqunj", model.description()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SsisPackageTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SsisPackageTests.java deleted file mode 100644 index abd3c6012348b..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SsisPackageTests.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.SsisPackage; -import com.azure.resourcemanager.synapse.models.SsisParameter; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SsisPackageTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SsisPackage model = - BinaryData - .fromString( - "{\"type\":\"Package\",\"folderId\":6921489313242944838,\"projectVersion\":958372626502625816,\"projectId\":2450865455344885392,\"parameters\":[{\"id\":9114509081318263307,\"name\":\"ikkgqo\",\"description\":\"wpin\",\"dataType\":\"dvabbxbhmedeilb\",\"required\":true,\"sensitive\":true,\"designDefaultValue\":\"x\",\"defaultValue\":\"rzzihvwypus\",\"sensitiveDefaultValue\":\"jslczwciidj\",\"valueType\":\"lfryvdmvxadqac\",\"valueSet\":false,\"variable\":\"awba\"},{\"id\":4342234065989621574,\"name\":\"t\",\"description\":\"mfczl\",\"dataType\":\"yq\",\"required\":false,\"sensitive\":false,\"designDefaultValue\":\"owoxqmj\",\"defaultValue\":\"jcx\",\"sensitiveDefaultValue\":\"qg\",\"valueType\":\"lusrv\",\"valueSet\":true,\"variable\":\"mjceagbjqvls\"}],\"id\":6263061070290971808,\"name\":\"ashxgonoyjfqi\",\"description\":\"b\"}") - .toObject(SsisPackage.class); - Assertions.assertEquals(6263061070290971808L, model.id()); - Assertions.assertEquals("ashxgonoyjfqi", model.name()); - Assertions.assertEquals("b", model.description()); - Assertions.assertEquals(6921489313242944838L, model.folderId()); - Assertions.assertEquals(958372626502625816L, model.projectVersion()); - Assertions.assertEquals(2450865455344885392L, model.projectId()); - Assertions.assertEquals(9114509081318263307L, model.parameters().get(0).id()); - Assertions.assertEquals("ikkgqo", model.parameters().get(0).name()); - Assertions.assertEquals("wpin", model.parameters().get(0).description()); - Assertions.assertEquals("dvabbxbhmedeilb", model.parameters().get(0).dataType()); - Assertions.assertEquals(true, model.parameters().get(0).required()); - Assertions.assertEquals(true, model.parameters().get(0).sensitive()); - Assertions.assertEquals("x", model.parameters().get(0).designDefaultValue()); - Assertions.assertEquals("rzzihvwypus", model.parameters().get(0).defaultValue()); - Assertions.assertEquals("jslczwciidj", model.parameters().get(0).sensitiveDefaultValue()); - Assertions.assertEquals("lfryvdmvxadqac", model.parameters().get(0).valueType()); - Assertions.assertEquals(false, model.parameters().get(0).valueSet()); - Assertions.assertEquals("awba", model.parameters().get(0).variable()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SsisPackage model = - new SsisPackage() - .withId(6263061070290971808L) - .withName("ashxgonoyjfqi") - .withDescription("b") - .withFolderId(6921489313242944838L) - .withProjectVersion(958372626502625816L) - .withProjectId(2450865455344885392L) - .withParameters( - Arrays - .asList( - new SsisParameter() - .withId(9114509081318263307L) - .withName("ikkgqo") - .withDescription("wpin") - .withDataType("dvabbxbhmedeilb") - .withRequired(true) - .withSensitive(true) - .withDesignDefaultValue("x") - .withDefaultValue("rzzihvwypus") - .withSensitiveDefaultValue("jslczwciidj") - .withValueType("lfryvdmvxadqac") - .withValueSet(false) - .withVariable("awba"), - new SsisParameter() - .withId(4342234065989621574L) - .withName("t") - .withDescription("mfczl") - .withDataType("yq") - .withRequired(false) - .withSensitive(false) - .withDesignDefaultValue("owoxqmj") - .withDefaultValue("jcx") - .withSensitiveDefaultValue("qg") - .withValueType("lusrv") - .withValueSet(true) - .withVariable("mjceagbjqvls"))); - model = BinaryData.fromObject(model).toObject(SsisPackage.class); - Assertions.assertEquals(6263061070290971808L, model.id()); - Assertions.assertEquals("ashxgonoyjfqi", model.name()); - Assertions.assertEquals("b", model.description()); - Assertions.assertEquals(6921489313242944838L, model.folderId()); - Assertions.assertEquals(958372626502625816L, model.projectVersion()); - Assertions.assertEquals(2450865455344885392L, model.projectId()); - Assertions.assertEquals(9114509081318263307L, model.parameters().get(0).id()); - Assertions.assertEquals("ikkgqo", model.parameters().get(0).name()); - Assertions.assertEquals("wpin", model.parameters().get(0).description()); - Assertions.assertEquals("dvabbxbhmedeilb", model.parameters().get(0).dataType()); - Assertions.assertEquals(true, model.parameters().get(0).required()); - Assertions.assertEquals(true, model.parameters().get(0).sensitive()); - Assertions.assertEquals("x", model.parameters().get(0).designDefaultValue()); - Assertions.assertEquals("rzzihvwypus", model.parameters().get(0).defaultValue()); - Assertions.assertEquals("jslczwciidj", model.parameters().get(0).sensitiveDefaultValue()); - Assertions.assertEquals("lfryvdmvxadqac", model.parameters().get(0).valueType()); - Assertions.assertEquals(false, model.parameters().get(0).valueSet()); - Assertions.assertEquals("awba", model.parameters().get(0).variable()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SsisParameterTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SsisParameterTests.java deleted file mode 100644 index e3e61c66ae54e..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SsisParameterTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.SsisParameter; -import org.junit.jupiter.api.Assertions; - -public final class SsisParameterTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SsisParameter model = - BinaryData - .fromString( - "{\"id\":5832025018417417844,\"name\":\"gydgrpxncakiq\",\"description\":\"ndjrkclamggl\",\"dataType\":\"mfejdoqeykglty\",\"required\":true,\"sensitive\":false,\"designDefaultValue\":\"qkaye\",\"defaultValue\":\"xtlgflwfg\",\"sensitiveDefaultValue\":\"iucijjcea\",\"valueType\":\"ijjj\",\"valueSet\":false,\"variable\":\"mcaszknxkv\"}") - .toObject(SsisParameter.class); - Assertions.assertEquals(5832025018417417844L, model.id()); - Assertions.assertEquals("gydgrpxncakiq", model.name()); - Assertions.assertEquals("ndjrkclamggl", model.description()); - Assertions.assertEquals("mfejdoqeykglty", model.dataType()); - Assertions.assertEquals(true, model.required()); - Assertions.assertEquals(false, model.sensitive()); - Assertions.assertEquals("qkaye", model.designDefaultValue()); - Assertions.assertEquals("xtlgflwfg", model.defaultValue()); - Assertions.assertEquals("iucijjcea", model.sensitiveDefaultValue()); - Assertions.assertEquals("ijjj", model.valueType()); - Assertions.assertEquals(false, model.valueSet()); - Assertions.assertEquals("mcaszknxkv", model.variable()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SsisParameter model = - new SsisParameter() - .withId(5832025018417417844L) - .withName("gydgrpxncakiq") - .withDescription("ndjrkclamggl") - .withDataType("mfejdoqeykglty") - .withRequired(true) - .withSensitive(false) - .withDesignDefaultValue("qkaye") - .withDefaultValue("xtlgflwfg") - .withSensitiveDefaultValue("iucijjcea") - .withValueType("ijjj") - .withValueSet(false) - .withVariable("mcaszknxkv"); - model = BinaryData.fromObject(model).toObject(SsisParameter.class); - Assertions.assertEquals(5832025018417417844L, model.id()); - Assertions.assertEquals("gydgrpxncakiq", model.name()); - Assertions.assertEquals("ndjrkclamggl", model.description()); - Assertions.assertEquals("mfejdoqeykglty", model.dataType()); - Assertions.assertEquals(true, model.required()); - Assertions.assertEquals(false, model.sensitive()); - Assertions.assertEquals("qkaye", model.designDefaultValue()); - Assertions.assertEquals("xtlgflwfg", model.defaultValue()); - Assertions.assertEquals("iucijjcea", model.sensitiveDefaultValue()); - Assertions.assertEquals("ijjj", model.valueType()); - Assertions.assertEquals(false, model.valueSet()); - Assertions.assertEquals("mcaszknxkv", model.variable()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SsisProjectTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SsisProjectTests.java deleted file mode 100644 index 6200279b2a22b..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SsisProjectTests.java +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.SsisEnvironmentReference; -import com.azure.resourcemanager.synapse.models.SsisParameter; -import com.azure.resourcemanager.synapse.models.SsisProject; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SsisProjectTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SsisProject model = - BinaryData - .fromString( - "{\"type\":\"Project\",\"folderId\":5740210743517169719,\"version\":5762565506238596014,\"environmentRefs\":[{\"id\":5678973155741934160,\"environmentFolderName\":\"qba\",\"environmentName\":\"icqchygtv\",\"referenceType\":\"yjanepubdp\"},{\"id\":7570580498222762249,\"environmentFolderName\":\"gx\",\"environmentName\":\"od\",\"referenceType\":\"vohkxdxuws\"},{\"id\":8618235098095691375,\"environmentFolderName\":\"wnosbzlehgcvkbck\",\"environmentName\":\"olg\",\"referenceType\":\"yxpvelszerqze\"},{\"id\":301493278477517465,\"environmentFolderName\":\"intxwa\",\"environmentName\":\"glzoblqwa\",\"referenceType\":\"r\"}],\"parameters\":[{\"id\":2044046453123145189,\"name\":\"qb\",\"description\":\"vafjrqpjiyrqj\",\"dataType\":\"gaxwmzwdfkbnrzo\",\"required\":false,\"sensitive\":true,\"designDefaultValue\":\"qctqjfg\",\"defaultValue\":\"saetgzdgvpyig\",\"sensitiveDefaultValue\":\"qqil\",\"valueType\":\"cduwjoedx\",\"valueSet\":true,\"variable\":\"aifpaurwwgil\"}],\"id\":3426400212722100237,\"name\":\"cdmkxwxdcvjw\",\"description\":\"z\"}") - .toObject(SsisProject.class); - Assertions.assertEquals(3426400212722100237L, model.id()); - Assertions.assertEquals("cdmkxwxdcvjw", model.name()); - Assertions.assertEquals("z", model.description()); - Assertions.assertEquals(5740210743517169719L, model.folderId()); - Assertions.assertEquals(5762565506238596014L, model.version()); - Assertions.assertEquals(5678973155741934160L, model.environmentRefs().get(0).id()); - Assertions.assertEquals("qba", model.environmentRefs().get(0).environmentFolderName()); - Assertions.assertEquals("icqchygtv", model.environmentRefs().get(0).environmentName()); - Assertions.assertEquals("yjanepubdp", model.environmentRefs().get(0).referenceType()); - Assertions.assertEquals(2044046453123145189L, model.parameters().get(0).id()); - Assertions.assertEquals("qb", model.parameters().get(0).name()); - Assertions.assertEquals("vafjrqpjiyrqj", model.parameters().get(0).description()); - Assertions.assertEquals("gaxwmzwdfkbnrzo", model.parameters().get(0).dataType()); - Assertions.assertEquals(false, model.parameters().get(0).required()); - Assertions.assertEquals(true, model.parameters().get(0).sensitive()); - Assertions.assertEquals("qctqjfg", model.parameters().get(0).designDefaultValue()); - Assertions.assertEquals("saetgzdgvpyig", model.parameters().get(0).defaultValue()); - Assertions.assertEquals("qqil", model.parameters().get(0).sensitiveDefaultValue()); - Assertions.assertEquals("cduwjoedx", model.parameters().get(0).valueType()); - Assertions.assertEquals(true, model.parameters().get(0).valueSet()); - Assertions.assertEquals("aifpaurwwgil", model.parameters().get(0).variable()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SsisProject model = - new SsisProject() - .withId(3426400212722100237L) - .withName("cdmkxwxdcvjw") - .withDescription("z") - .withFolderId(5740210743517169719L) - .withVersion(5762565506238596014L) - .withEnvironmentRefs( - Arrays - .asList( - new SsisEnvironmentReference() - .withId(5678973155741934160L) - .withEnvironmentFolderName("qba") - .withEnvironmentName("icqchygtv") - .withReferenceType("yjanepubdp"), - new SsisEnvironmentReference() - .withId(7570580498222762249L) - .withEnvironmentFolderName("gx") - .withEnvironmentName("od") - .withReferenceType("vohkxdxuws"), - new SsisEnvironmentReference() - .withId(8618235098095691375L) - .withEnvironmentFolderName("wnosbzlehgcvkbck") - .withEnvironmentName("olg") - .withReferenceType("yxpvelszerqze"), - new SsisEnvironmentReference() - .withId(301493278477517465L) - .withEnvironmentFolderName("intxwa") - .withEnvironmentName("glzoblqwa") - .withReferenceType("r"))) - .withParameters( - Arrays - .asList( - new SsisParameter() - .withId(2044046453123145189L) - .withName("qb") - .withDescription("vafjrqpjiyrqj") - .withDataType("gaxwmzwdfkbnrzo") - .withRequired(false) - .withSensitive(true) - .withDesignDefaultValue("qctqjfg") - .withDefaultValue("saetgzdgvpyig") - .withSensitiveDefaultValue("qqil") - .withValueType("cduwjoedx") - .withValueSet(true) - .withVariable("aifpaurwwgil"))); - model = BinaryData.fromObject(model).toObject(SsisProject.class); - Assertions.assertEquals(3426400212722100237L, model.id()); - Assertions.assertEquals("cdmkxwxdcvjw", model.name()); - Assertions.assertEquals("z", model.description()); - Assertions.assertEquals(5740210743517169719L, model.folderId()); - Assertions.assertEquals(5762565506238596014L, model.version()); - Assertions.assertEquals(5678973155741934160L, model.environmentRefs().get(0).id()); - Assertions.assertEquals("qba", model.environmentRefs().get(0).environmentFolderName()); - Assertions.assertEquals("icqchygtv", model.environmentRefs().get(0).environmentName()); - Assertions.assertEquals("yjanepubdp", model.environmentRefs().get(0).referenceType()); - Assertions.assertEquals(2044046453123145189L, model.parameters().get(0).id()); - Assertions.assertEquals("qb", model.parameters().get(0).name()); - Assertions.assertEquals("vafjrqpjiyrqj", model.parameters().get(0).description()); - Assertions.assertEquals("gaxwmzwdfkbnrzo", model.parameters().get(0).dataType()); - Assertions.assertEquals(false, model.parameters().get(0).required()); - Assertions.assertEquals(true, model.parameters().get(0).sensitive()); - Assertions.assertEquals("qctqjfg", model.parameters().get(0).designDefaultValue()); - Assertions.assertEquals("saetgzdgvpyig", model.parameters().get(0).defaultValue()); - Assertions.assertEquals("qqil", model.parameters().get(0).sensitiveDefaultValue()); - Assertions.assertEquals("cduwjoedx", model.parameters().get(0).valueType()); - Assertions.assertEquals(true, model.parameters().get(0).valueSet()); - Assertions.assertEquals("aifpaurwwgil", model.parameters().get(0).variable()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SsisVariableTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SsisVariableTests.java deleted file mode 100644 index aedd3c8891bef..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/SsisVariableTests.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.SsisVariable; -import org.junit.jupiter.api.Assertions; - -public final class SsisVariableTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SsisVariable model = - BinaryData - .fromString( - "{\"id\":1698212736552270549,\"name\":\"jiqul\",\"description\":\"xbdmvrscmqernd\",\"dataType\":\"nyeofltfnnxrk\",\"sensitive\":true,\"value\":\"ynnfmuiii\",\"sensitiveValue\":\"pfoh\"}") - .toObject(SsisVariable.class); - Assertions.assertEquals(1698212736552270549L, model.id()); - Assertions.assertEquals("jiqul", model.name()); - Assertions.assertEquals("xbdmvrscmqernd", model.description()); - Assertions.assertEquals("nyeofltfnnxrk", model.dataType()); - Assertions.assertEquals(true, model.sensitive()); - Assertions.assertEquals("ynnfmuiii", model.value()); - Assertions.assertEquals("pfoh", model.sensitiveValue()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SsisVariable model = - new SsisVariable() - .withId(1698212736552270549L) - .withName("jiqul") - .withDescription("xbdmvrscmqernd") - .withDataType("nyeofltfnnxrk") - .withSensitive(true) - .withValue("ynnfmuiii") - .withSensitiveValue("pfoh"); - model = BinaryData.fromObject(model).toObject(SsisVariable.class); - Assertions.assertEquals(1698212736552270549L, model.id()); - Assertions.assertEquals("jiqul", model.name()); - Assertions.assertEquals("xbdmvrscmqernd", model.description()); - Assertions.assertEquals("nyeofltfnnxrk", model.dataType()); - Assertions.assertEquals(true, model.sensitive()); - Assertions.assertEquals("ynnfmuiii", model.value()); - Assertions.assertEquals("pfoh", model.sensitiveValue()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/TableLevelSharingPropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/TableLevelSharingPropertiesTests.java deleted file mode 100644 index 5b2123e05cf5d..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/TableLevelSharingPropertiesTests.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.TableLevelSharingProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class TableLevelSharingPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TableLevelSharingProperties model = - BinaryData - .fromString( - "{\"tablesToInclude\":[\"zgwldoychillcec\",\"ehuwaoa\",\"uhicqllizstacsjv\"],\"tablesToExclude\":[\"eftkwqe\",\"pmvssehaep\"],\"externalTablesToInclude\":[\"cxtczhupeukn\",\"jduyyespydjfb\"],\"externalTablesToExclude\":[\"v\"],\"materializedViewsToInclude\":[\"lrtywikdmhlakuf\",\"gbhgau\",\"cdixmx\"],\"materializedViewsToExclude\":[\"sryjqgdkfno\"]}") - .toObject(TableLevelSharingProperties.class); - Assertions.assertEquals("zgwldoychillcec", model.tablesToInclude().get(0)); - Assertions.assertEquals("eftkwqe", model.tablesToExclude().get(0)); - Assertions.assertEquals("cxtczhupeukn", model.externalTablesToInclude().get(0)); - Assertions.assertEquals("v", model.externalTablesToExclude().get(0)); - Assertions.assertEquals("lrtywikdmhlakuf", model.materializedViewsToInclude().get(0)); - Assertions.assertEquals("sryjqgdkfno", model.materializedViewsToExclude().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TableLevelSharingProperties model = - new TableLevelSharingProperties() - .withTablesToInclude(Arrays.asList("zgwldoychillcec", "ehuwaoa", "uhicqllizstacsjv")) - .withTablesToExclude(Arrays.asList("eftkwqe", "pmvssehaep")) - .withExternalTablesToInclude(Arrays.asList("cxtczhupeukn", "jduyyespydjfb")) - .withExternalTablesToExclude(Arrays.asList("v")) - .withMaterializedViewsToInclude(Arrays.asList("lrtywikdmhlakuf", "gbhgau", "cdixmx")) - .withMaterializedViewsToExclude(Arrays.asList("sryjqgdkfno")); - model = BinaryData.fromObject(model).toObject(TableLevelSharingProperties.class); - Assertions.assertEquals("zgwldoychillcec", model.tablesToInclude().get(0)); - Assertions.assertEquals("eftkwqe", model.tablesToExclude().get(0)); - Assertions.assertEquals("cxtczhupeukn", model.externalTablesToInclude().get(0)); - Assertions.assertEquals("v", model.externalTablesToExclude().get(0)); - Assertions.assertEquals("lrtywikdmhlakuf", model.materializedViewsToInclude().get(0)); - Assertions.assertEquals("sryjqgdkfno", model.materializedViewsToExclude().get(0)); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/TransparentDataEncryptionInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/TransparentDataEncryptionInnerTests.java deleted file mode 100644 index 55deaca01f2e9..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/TransparentDataEncryptionInnerTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.TransparentDataEncryptionInner; -import com.azure.resourcemanager.synapse.models.TransparentDataEncryptionStatus; -import org.junit.jupiter.api.Assertions; - -public final class TransparentDataEncryptionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TransparentDataEncryptionInner model = - BinaryData - .fromString( - "{\"location\":\"whojvp\",\"properties\":{\"status\":\"Disabled\"},\"id\":\"xysmoc\",\"name\":\"bq\",\"type\":\"qvmkcxo\"}") - .toObject(TransparentDataEncryptionInner.class); - Assertions.assertEquals(TransparentDataEncryptionStatus.DISABLED, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TransparentDataEncryptionInner model = - new TransparentDataEncryptionInner().withStatus(TransparentDataEncryptionStatus.DISABLED); - model = BinaryData.fromObject(model).toObject(TransparentDataEncryptionInner.class); - Assertions.assertEquals(TransparentDataEncryptionStatus.DISABLED, model.status()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/TransparentDataEncryptionListResultTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/TransparentDataEncryptionListResultTests.java deleted file mode 100644 index 67a9730269948..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/TransparentDataEncryptionListResultTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.TransparentDataEncryptionListResult; - -public final class TransparentDataEncryptionListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TransparentDataEncryptionListResult model = - BinaryData - .fromString( - "{\"value\":[{\"location\":\"lxprglyatddckcbc\",\"properties\":{\"status\":\"Disabled\"},\"id\":\"jxgciqibrh\",\"name\":\"sxsdqrhzoymibm\",\"type\":\"qyib\"},{\"location\":\"wfluszdt\",\"properties\":{\"status\":\"Disabled\"},\"id\":\"wofyyvoqacpiexp\",\"name\":\"tg\",\"type\":\"wbwo\"},{\"location\":\"washr\",\"properties\":{\"status\":\"Disabled\"},\"id\":\"cnqxwbpokulpi\",\"name\":\"jwaa\",\"type\":\"ipqiiobyuqerpq\"}],\"nextLink\":\"qwcciuqg\"}") - .toObject(TransparentDataEncryptionListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TransparentDataEncryptionListResult model = new TransparentDataEncryptionListResult(); - model = BinaryData.fromObject(model).toObject(TransparentDataEncryptionListResult.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/TransparentDataEncryptionPropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/TransparentDataEncryptionPropertiesTests.java deleted file mode 100644 index 5fcb3441b1039..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/TransparentDataEncryptionPropertiesTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.TransparentDataEncryptionProperties; -import com.azure.resourcemanager.synapse.models.TransparentDataEncryptionStatus; -import org.junit.jupiter.api.Assertions; - -public final class TransparentDataEncryptionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TransparentDataEncryptionProperties model = - BinaryData.fromString("{\"status\":\"Disabled\"}").toObject(TransparentDataEncryptionProperties.class); - Assertions.assertEquals(TransparentDataEncryptionStatus.DISABLED, model.status()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TransparentDataEncryptionProperties model = - new TransparentDataEncryptionProperties().withStatus(TransparentDataEncryptionStatus.DISABLED); - model = BinaryData.fromObject(model).toObject(TransparentDataEncryptionProperties.class); - Assertions.assertEquals(TransparentDataEncryptionStatus.DISABLED, model.status()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/UpdateIntegrationRuntimeNodeRequestTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/UpdateIntegrationRuntimeNodeRequestTests.java deleted file mode 100644 index fccf7946dbe04..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/UpdateIntegrationRuntimeNodeRequestTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.UpdateIntegrationRuntimeNodeRequest; -import org.junit.jupiter.api.Assertions; - -public final class UpdateIntegrationRuntimeNodeRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateIntegrationRuntimeNodeRequest model = - BinaryData - .fromString("{\"concurrentJobsLimit\":1685978755}") - .toObject(UpdateIntegrationRuntimeNodeRequest.class); - Assertions.assertEquals(1685978755, model.concurrentJobsLimit()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateIntegrationRuntimeNodeRequest model = - new UpdateIntegrationRuntimeNodeRequest().withConcurrentJobsLimit(1685978755); - model = BinaryData.fromObject(model).toObject(UpdateIntegrationRuntimeNodeRequest.class); - Assertions.assertEquals(1685978755, model.concurrentJobsLimit()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/UpdateIntegrationRuntimeRequestTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/UpdateIntegrationRuntimeRequestTests.java deleted file mode 100644 index eae209e9310d2..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/UpdateIntegrationRuntimeRequestTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.IntegrationRuntimeAutoUpdate; -import com.azure.resourcemanager.synapse.models.UpdateIntegrationRuntimeRequest; -import org.junit.jupiter.api.Assertions; - -public final class UpdateIntegrationRuntimeRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UpdateIntegrationRuntimeRequest model = - BinaryData - .fromString("{\"autoUpdate\":\"Off\",\"updateDelayOffset\":\"bxqmu\"}") - .toObject(UpdateIntegrationRuntimeRequest.class); - Assertions.assertEquals(IntegrationRuntimeAutoUpdate.OFF, model.autoUpdate()); - Assertions.assertEquals("bxqmu", model.updateDelayOffset()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UpdateIntegrationRuntimeRequest model = - new UpdateIntegrationRuntimeRequest() - .withAutoUpdate(IntegrationRuntimeAutoUpdate.OFF) - .withUpdateDelayOffset("bxqmu"); - model = BinaryData.fromObject(model).toObject(UpdateIntegrationRuntimeRequest.class); - Assertions.assertEquals(IntegrationRuntimeAutoUpdate.OFF, model.autoUpdate()); - Assertions.assertEquals("bxqmu", model.updateDelayOffset()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/UserAssignedManagedIdentityTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/UserAssignedManagedIdentityTests.java deleted file mode 100644 index b940e838211ff..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/UserAssignedManagedIdentityTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.UserAssignedManagedIdentity; - -public final class UserAssignedManagedIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserAssignedManagedIdentity model = - BinaryData - .fromString( - "{\"clientId\":\"b48130cf-4590-48e3-9818-43aa682948d9\",\"principalId\":\"fd70b50b-b90c-4dcd-9c53-d06fda045691\"}") - .toObject(UserAssignedManagedIdentity.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserAssignedManagedIdentity model = new UserAssignedManagedIdentity(); - model = BinaryData.fromObject(model).toObject(UserAssignedManagedIdentity.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/VirtualNetworkProfileTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/VirtualNetworkProfileTests.java deleted file mode 100644 index 970708f7da16d..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/VirtualNetworkProfileTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.VirtualNetworkProfile; -import org.junit.jupiter.api.Assertions; - -public final class VirtualNetworkProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VirtualNetworkProfile model = - BinaryData.fromString("{\"computeSubnetId\":\"jyihsasbhudypo\"}").toObject(VirtualNetworkProfile.class); - Assertions.assertEquals("jyihsasbhudypo", model.computeSubnetId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VirtualNetworkProfile model = new VirtualNetworkProfile().withComputeSubnetId("jyihsasbhudypo"); - model = BinaryData.fromObject(model).toObject(VirtualNetworkProfile.class); - Assertions.assertEquals("jyihsasbhudypo", model.computeSubnetId()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/VulnerabilityAssessmentRecurringScansPropertiesAutoGeneratedTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/VulnerabilityAssessmentRecurringScansPropertiesAutoGeneratedTests.java deleted file mode 100644 index 96f0d42d20a24..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/VulnerabilityAssessmentRecurringScansPropertiesAutoGeneratedTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class VulnerabilityAssessmentRecurringScansPropertiesAutoGeneratedTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated model = - BinaryData - .fromString( - "{\"isEnabled\":false,\"emailSubscriptionAdmins\":false,\"emails\":[\"ykhyawfvjlboxqvk\",\"lmxhomdyn\"]}") - .toObject(VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated.class); - Assertions.assertEquals(false, model.isEnabled()); - Assertions.assertEquals(false, model.emailSubscriptionAdmins()); - Assertions.assertEquals("ykhyawfvjlboxqvk", model.emails().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated model = - new VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated() - .withIsEnabled(false) - .withEmailSubscriptionAdmins(false) - .withEmails(Arrays.asList("ykhyawfvjlboxqvk", "lmxhomdyn")); - model = - BinaryData.fromObject(model).toObject(VulnerabilityAssessmentRecurringScansPropertiesAutoGenerated.class); - Assertions.assertEquals(false, model.isEnabled()); - Assertions.assertEquals(false, model.emailSubscriptionAdmins()); - Assertions.assertEquals("ykhyawfvjlboxqvk", model.emails().get(0)); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/VulnerabilityAssessmentRecurringScansPropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/VulnerabilityAssessmentRecurringScansPropertiesTests.java deleted file mode 100644 index a273cdd4b7340..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/VulnerabilityAssessmentRecurringScansPropertiesTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentRecurringScansProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class VulnerabilityAssessmentRecurringScansPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VulnerabilityAssessmentRecurringScansProperties model = - BinaryData - .fromString( - "{\"isEnabled\":false,\"emailSubscriptionAdmins\":true,\"emails\":[\"pmfi\",\"bfggjioolvr\",\"x\"]}") - .toObject(VulnerabilityAssessmentRecurringScansProperties.class); - Assertions.assertEquals(false, model.isEnabled()); - Assertions.assertEquals(true, model.emailSubscriptionAdmins()); - Assertions.assertEquals("pmfi", model.emails().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VulnerabilityAssessmentRecurringScansProperties model = - new VulnerabilityAssessmentRecurringScansProperties() - .withIsEnabled(false) - .withEmailSubscriptionAdmins(true) - .withEmails(Arrays.asList("pmfi", "bfggjioolvr", "x")); - model = BinaryData.fromObject(model).toObject(VulnerabilityAssessmentRecurringScansProperties.class); - Assertions.assertEquals(false, model.isEnabled()); - Assertions.assertEquals(true, model.emailSubscriptionAdmins()); - Assertions.assertEquals("pmfi", model.emails().get(0)); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/VulnerabilityAssessmentScanRecordListResultTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/VulnerabilityAssessmentScanRecordListResultTests.java deleted file mode 100644 index 0c6f3417b2751..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/VulnerabilityAssessmentScanRecordListResultTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentScanRecordListResult; - -public final class VulnerabilityAssessmentScanRecordListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VulnerabilityAssessmentScanRecordListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"scanId\":\"gllqwjy\",\"triggerType\":\"Recurring\",\"state\":\"FailedToRun\",\"startTime\":\"2021-05-06T19:16:01Z\",\"endTime\":\"2021-08-10T18:33:43Z\",\"errors\":[],\"storageContainerPath\":\"k\",\"numberOfFailedSecurityChecks\":2100624724},\"id\":\"bxvvyhg\",\"name\":\"opbyrqufegxu\",\"type\":\"wz\"},{\"properties\":{\"scanId\":\"hlmctlpdngitvgb\",\"triggerType\":\"Recurring\",\"state\":\"Passed\",\"startTime\":\"2021-08-25T00:52:30Z\",\"endTime\":\"2021-01-21T03:55:34Z\",\"errors\":[],\"storageContainerPath\":\"ejvegrhbpnaixex\",\"numberOfFailedSecurityChecks\":69108212},\"id\":\"dreaxh\",\"name\":\"exdrrvqahqkg\",\"type\":\"tpwijnh\"},{\"properties\":{\"scanId\":\"vfycxzb\",\"triggerType\":\"OnDemand\",\"state\":\"Failed\",\"startTime\":\"2021-12-07T13:01:59Z\",\"endTime\":\"2021-02-04T20:53:33Z\",\"errors\":[],\"storageContainerPath\":\"jqppyostronzmy\",\"numberOfFailedSecurityChecks\":1320458581},\"id\":\"ipn\",\"name\":\"xkmcwaekrrjre\",\"type\":\"fxtsgum\"}],\"nextLink\":\"glikkxwslolb\"}") - .toObject(VulnerabilityAssessmentScanRecordListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VulnerabilityAssessmentScanRecordListResult model = new VulnerabilityAssessmentScanRecordListResult(); - model = BinaryData.fromObject(model).toObject(VulnerabilityAssessmentScanRecordListResult.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkloadClassifierInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkloadClassifierInnerTests.java deleted file mode 100644 index 6fb5efba831a0..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkloadClassifierInnerTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.WorkloadClassifierInner; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadClassifierInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadClassifierInner model = - BinaryData - .fromString( - "{\"properties\":{\"memberName\":\"vokqdzfv\",\"label\":\"ivjlfrqttbajlka\",\"context\":\"wxyiopidkqq\",\"startTime\":\"uvscxkdmligov\",\"endTime\":\"rxkpmloazuruoc\",\"importance\":\"oorb\"},\"id\":\"eoybfhjxakvvjgs\",\"name\":\"ordilmywwtkgkxny\",\"type\":\"dabg\"}") - .toObject(WorkloadClassifierInner.class); - Assertions.assertEquals("vokqdzfv", model.memberName()); - Assertions.assertEquals("ivjlfrqttbajlka", model.label()); - Assertions.assertEquals("wxyiopidkqq", model.context()); - Assertions.assertEquals("uvscxkdmligov", model.startTime()); - Assertions.assertEquals("rxkpmloazuruoc", model.endTime()); - Assertions.assertEquals("oorb", model.importance()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadClassifierInner model = - new WorkloadClassifierInner() - .withMemberName("vokqdzfv") - .withLabel("ivjlfrqttbajlka") - .withContext("wxyiopidkqq") - .withStartTime("uvscxkdmligov") - .withEndTime("rxkpmloazuruoc") - .withImportance("oorb"); - model = BinaryData.fromObject(model).toObject(WorkloadClassifierInner.class); - Assertions.assertEquals("vokqdzfv", model.memberName()); - Assertions.assertEquals("ivjlfrqttbajlka", model.label()); - Assertions.assertEquals("wxyiopidkqq", model.context()); - Assertions.assertEquals("uvscxkdmligov", model.startTime()); - Assertions.assertEquals("rxkpmloazuruoc", model.endTime()); - Assertions.assertEquals("oorb", model.importance()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkloadClassifierListResultTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkloadClassifierListResultTests.java deleted file mode 100644 index 8ca20561cffeb..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkloadClassifierListResultTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.WorkloadClassifierListResult; - -public final class WorkloadClassifierListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadClassifierListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"memberName\":\"d\",\"label\":\"acegfnmntf\",\"context\":\"vm\",\"startTime\":\"fnczdwvvbalx\",\"endTime\":\"lchpodbzevwrdn\",\"importance\":\"ukuv\"},\"id\":\"jcswsmys\",\"name\":\"uluqypfc\",\"type\":\"lerchpq\"}],\"nextLink\":\"f\"}") - .toObject(WorkloadClassifierListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadClassifierListResult model = new WorkloadClassifierListResult(); - model = BinaryData.fromObject(model).toObject(WorkloadClassifierListResult.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkloadClassifierPropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkloadClassifierPropertiesTests.java deleted file mode 100644 index b3d9e3837149b..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkloadClassifierPropertiesTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.WorkloadClassifierProperties; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadClassifierPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadClassifierProperties model = - BinaryData - .fromString( - "{\"memberName\":\"vudtjuewbcihx\",\"label\":\"whcjyxcc\",\"context\":\"vpayakkudzpx\",\"startTime\":\"jplmagstcy\",\"endTime\":\"pfkyrkdbdgiogsj\",\"importance\":\"nwqjnoba\"}") - .toObject(WorkloadClassifierProperties.class); - Assertions.assertEquals("vudtjuewbcihx", model.memberName()); - Assertions.assertEquals("whcjyxcc", model.label()); - Assertions.assertEquals("vpayakkudzpx", model.context()); - Assertions.assertEquals("jplmagstcy", model.startTime()); - Assertions.assertEquals("pfkyrkdbdgiogsj", model.endTime()); - Assertions.assertEquals("nwqjnoba", model.importance()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadClassifierProperties model = - new WorkloadClassifierProperties() - .withMemberName("vudtjuewbcihx") - .withLabel("whcjyxcc") - .withContext("vpayakkudzpx") - .withStartTime("jplmagstcy") - .withEndTime("pfkyrkdbdgiogsj") - .withImportance("nwqjnoba"); - model = BinaryData.fromObject(model).toObject(WorkloadClassifierProperties.class); - Assertions.assertEquals("vudtjuewbcihx", model.memberName()); - Assertions.assertEquals("whcjyxcc", model.label()); - Assertions.assertEquals("vpayakkudzpx", model.context()); - Assertions.assertEquals("jplmagstcy", model.startTime()); - Assertions.assertEquals("pfkyrkdbdgiogsj", model.endTime()); - Assertions.assertEquals("nwqjnoba", model.importance()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkloadGroupInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkloadGroupInnerTests.java deleted file mode 100644 index 4cbb0c8841d1f..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkloadGroupInnerTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.WorkloadGroupInner; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadGroupInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadGroupInner model = - BinaryData - .fromString( - "{\"properties\":{\"minResourcePercent\":1591499316,\"maxResourcePercent\":122803528,\"minResourcePercentPerRequest\":21.702799317843912,\"maxResourcePercentPerRequest\":97.4438256079908,\"importance\":\"b\",\"queryExecutionTimeout\":1947593422},\"id\":\"ilbywdxsm\",\"name\":\"ccwr\",\"type\":\"fscjfnynszquji\"}") - .toObject(WorkloadGroupInner.class); - Assertions.assertEquals(1591499316, model.minResourcePercent()); - Assertions.assertEquals(122803528, model.maxResourcePercent()); - Assertions.assertEquals(21.702799317843912, model.minResourcePercentPerRequest()); - Assertions.assertEquals(97.4438256079908D, model.maxResourcePercentPerRequest()); - Assertions.assertEquals("b", model.importance()); - Assertions.assertEquals(1947593422, model.queryExecutionTimeout()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadGroupInner model = - new WorkloadGroupInner() - .withMinResourcePercent(1591499316) - .withMaxResourcePercent(122803528) - .withMinResourcePercentPerRequest(21.702799317843912) - .withMaxResourcePercentPerRequest(97.4438256079908D) - .withImportance("b") - .withQueryExecutionTimeout(1947593422); - model = BinaryData.fromObject(model).toObject(WorkloadGroupInner.class); - Assertions.assertEquals(1591499316, model.minResourcePercent()); - Assertions.assertEquals(122803528, model.maxResourcePercent()); - Assertions.assertEquals(21.702799317843912, model.minResourcePercentPerRequest()); - Assertions.assertEquals(97.4438256079908D, model.maxResourcePercentPerRequest()); - Assertions.assertEquals("b", model.importance()); - Assertions.assertEquals(1947593422, model.queryExecutionTimeout()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkloadGroupListResultTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkloadGroupListResultTests.java deleted file mode 100644 index dd5f341ef50eb..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkloadGroupListResultTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.WorkloadGroupListResult; - -public final class WorkloadGroupListResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadGroupListResult model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"minResourcePercent\":629393280,\"maxResourcePercent\":384824052,\"minResourcePercentPerRequest\":16.797453313308843,\"maxResourcePercentPerRequest\":54.3681983767773,\"importance\":\"oxoismsksbpim\",\"queryExecutionTimeout\":2072188488},\"id\":\"ljxkcgxxlx\",\"name\":\"ffgcvizqz\",\"type\":\"wlvwlyoupf\"},{\"properties\":{\"minResourcePercent\":1825475274,\"maxResourcePercent\":11112663,\"minResourcePercentPerRequest\":15.658754728553815,\"maxResourcePercentPerRequest\":65.38612430460616,\"importance\":\"gkfmins\",\"queryExecutionTimeout\":760014296},\"id\":\"zfttsttktlahb\",\"name\":\"actxtgzukxitm\",\"type\":\"qtgqqqxhrnxr\"}],\"nextLink\":\"pjui\"}") - .toObject(WorkloadGroupListResult.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadGroupListResult model = new WorkloadGroupListResult(); - model = BinaryData.fromObject(model).toObject(WorkloadGroupListResult.class); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkloadGroupPropertiesTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkloadGroupPropertiesTests.java deleted file mode 100644 index 80e4e9d1dd3f7..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkloadGroupPropertiesTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.WorkloadGroupProperties; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadGroupPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadGroupProperties model = - BinaryData - .fromString( - "{\"minResourcePercent\":1527085818,\"maxResourcePercent\":1296747978,\"minResourcePercentPerRequest\":84.31488864287606,\"maxResourcePercentPerRequest\":21.38076853827919,\"importance\":\"yo\",\"queryExecutionTimeout\":853520386}") - .toObject(WorkloadGroupProperties.class); - Assertions.assertEquals(1527085818, model.minResourcePercent()); - Assertions.assertEquals(1296747978, model.maxResourcePercent()); - Assertions.assertEquals(84.31488864287606, model.minResourcePercentPerRequest()); - Assertions.assertEquals(21.38076853827919D, model.maxResourcePercentPerRequest()); - Assertions.assertEquals("yo", model.importance()); - Assertions.assertEquals(853520386, model.queryExecutionTimeout()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadGroupProperties model = - new WorkloadGroupProperties() - .withMinResourcePercent(1527085818) - .withMaxResourcePercent(1296747978) - .withMinResourcePercentPerRequest(84.31488864287606) - .withMaxResourcePercentPerRequest(21.38076853827919D) - .withImportance("yo") - .withQueryExecutionTimeout(853520386); - model = BinaryData.fromObject(model).toObject(WorkloadGroupProperties.class); - Assertions.assertEquals(1527085818, model.minResourcePercent()); - Assertions.assertEquals(1296747978, model.maxResourcePercent()); - Assertions.assertEquals(84.31488864287606, model.minResourcePercentPerRequest()); - Assertions.assertEquals(21.38076853827919D, model.maxResourcePercentPerRequest()); - Assertions.assertEquals("yo", model.importance()); - Assertions.assertEquals(853520386, model.queryExecutionTimeout()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceAadAdminInfoInnerTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceAadAdminInfoInnerTests.java deleted file mode 100644 index 0371c35f84b10..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceAadAdminInfoInnerTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.fluent.models.WorkspaceAadAdminInfoInner; -import org.junit.jupiter.api.Assertions; - -public final class WorkspaceAadAdminInfoInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkspaceAadAdminInfoInner model = - BinaryData - .fromString( - "{\"properties\":{\"tenantId\":\"efdeesve\",\"login\":\"ijpxtx\",\"administratorType\":\"wprtu\",\"sid\":\"sawddjibabxvi\"},\"id\":\"itvtzeexavo\",\"name\":\"tfgle\",\"type\":\"dmdqb\"}") - .toObject(WorkspaceAadAdminInfoInner.class); - Assertions.assertEquals("efdeesve", model.tenantId()); - Assertions.assertEquals("ijpxtx", model.login()); - Assertions.assertEquals("wprtu", model.administratorType()); - Assertions.assertEquals("sawddjibabxvi", model.sid()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspaceAadAdminInfoInner model = - new WorkspaceAadAdminInfoInner() - .withTenantId("efdeesve") - .withLogin("ijpxtx") - .withAdministratorType("wprtu") - .withSid("sawddjibabxvi"); - model = BinaryData.fromObject(model).toObject(WorkspaceAadAdminInfoInner.class); - Assertions.assertEquals("efdeesve", model.tenantId()); - Assertions.assertEquals("ijpxtx", model.login()); - Assertions.assertEquals("wprtu", model.administratorType()); - Assertions.assertEquals("sawddjibabxvi", model.sid()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceAadAdminsCreateOrUpdateMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceAadAdminsCreateOrUpdateMockTests.java deleted file mode 100644 index d6ce0532dd9e8..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceAadAdminsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.fluent.models.WorkspaceAadAdminInfoInner; -import com.azure.resourcemanager.synapse.models.WorkspaceAadAdminInfo; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkspaceAadAdminsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"tenantId\":\"exzvdube\",\"login\":\"zygba\",\"administratorType\":\"vecovsdqhzr\",\"sid\":\"bakrli\"},\"id\":\"zfvppkeq\",\"name\":\"ifjmclngygnh\",\"type\":\"kombcdtaj\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkspaceAadAdminInfo response = - manager - .workspaceAadAdmins() - .createOrUpdate( - "ecvztsc", - "gmusaictdscnkzzo", - new WorkspaceAadAdminInfoInner() - .withTenantId("ddclzeqozr") - .withLogin("lbz") - .withAdministratorType("xbnjrqvzyuexoz") - .withSid("ynp"), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("exzvdube", response.tenantId()); - Assertions.assertEquals("zygba", response.login()); - Assertions.assertEquals("vecovsdqhzr", response.administratorType()); - Assertions.assertEquals("bakrli", response.sid()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceAadAdminsDeleteMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceAadAdminsDeleteMockTests.java deleted file mode 100644 index 4a93bf5576c6b..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceAadAdminsDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkspaceAadAdminsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.workspaceAadAdmins().delete("opggorwjoqtrotp", "clpofyrlmwkp", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceAadAdminsGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceAadAdminsGetWithResponseMockTests.java deleted file mode 100644 index a02571ae9667f..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceAadAdminsGetWithResponseMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.WorkspaceAadAdminInfo; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkspaceAadAdminsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"tenantId\":\"zcntogffjwajnrtw\",\"login\":\"aqkifmxawostfz\",\"administratorType\":\"hrkmjqncfv\",\"sid\":\"cnhemvwfnq\"},\"id\":\"wypvndrwbgo\",\"name\":\"tggrss\",\"type\":\"wjfkainjmuym\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkspaceAadAdminInfo response = - manager.workspaceAadAdmins().getWithResponse("wqlepjj", "kca", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("zcntogffjwajnrtw", response.tenantId()); - Assertions.assertEquals("aqkifmxawostfz", response.login()); - Assertions.assertEquals("hrkmjqncfv", response.administratorType()); - Assertions.assertEquals("cnhemvwfnq", response.sid()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedIdentitySqlControlSettingsCreateOrUpdateMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedIdentitySqlControlSettingsCreateOrUpdateMockTests.java deleted file mode 100644 index 7c73e9d89d640..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedIdentitySqlControlSettingsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.fluent.models.ManagedIdentitySqlControlSettingsModelInner; -import com.azure.resourcemanager.synapse.models.DesiredState; -import com.azure.resourcemanager.synapse.models.ManagedIdentitySqlControlSettingsModel; -import com.azure.resourcemanager.synapse.models.ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkspaceManagedIdentitySqlControlSettingsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"grantSqlControlToManagedIdentity\":{\"desiredState\":\"Enabled\",\"actualState\":\"Enabling\"}},\"id\":\"bnvt\",\"name\":\"o\",\"type\":\"walzyxwhoeamoeo\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ManagedIdentitySqlControlSettingsModel response = - manager - .workspaceManagedIdentitySqlControlSettings() - .createOrUpdate( - "qttbspvkhgla", - "jsgyzstujrzxrk", - new ManagedIdentitySqlControlSettingsModelInner() - .withGrantSqlControlToManagedIdentity( - new ManagedIdentitySqlControlSettingsModelPropertiesGrantSqlControlToManagedIdentity() - .withDesiredState(DesiredState.DISABLED)), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals(DesiredState.ENABLED, response.grantSqlControlToManagedIdentity().desiredState()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedIdentitySqlControlSettingsGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedIdentitySqlControlSettingsGetWithResponseMockTests.java deleted file mode 100644 index b97e329a4d40c..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedIdentitySqlControlSettingsGetWithResponseMockTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.DesiredState; -import com.azure.resourcemanager.synapse.models.ManagedIdentitySqlControlSettingsModel; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkspaceManagedIdentitySqlControlSettingsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"grantSqlControlToManagedIdentity\":{\"desiredState\":\"Disabled\",\"actualState\":\"Enabled\"}},\"id\":\"bvn\",\"name\":\"rgekzyq\",\"type\":\"adyfhbmwkho\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ManagedIdentitySqlControlSettingsModel response = - manager - .workspaceManagedIdentitySqlControlSettings() - .getWithResponse("cgjtirjwayhicqq", "wvgwkslvli", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(DesiredState.DISABLED, response.grantSqlControlToManagedIdentity().desiredState()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerDedicatedSqlMinimalTlsSettingsGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerDedicatedSqlMinimalTlsSettingsGetWithResponseMockTests.java deleted file mode 100644 index eff8a13664b78..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerDedicatedSqlMinimalTlsSettingsGetWithResponseMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.DedicatedSQLminimalTlsSettings; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkspaceManagedSqlServerDedicatedSqlMinimalTlsSettingsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"location\":\"aehtd\",\"properties\":{\"minimalTlsVersion\":\"bnvynfaooea\"},\"id\":\"tedcglsk\",\"name\":\"k\",\"type\":\"didahzl\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DedicatedSQLminimalTlsSettings response = - manager - .workspaceManagedSqlServerDedicatedSqlMinimalTlsSettings() - .getWithResponse("awsxmrszbknimxlp", "erxrzutylcurza", "mnb", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("bnvynfaooea", response.minimalTlsVersion()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerDedicatedSqlMinimalTlsSettingsListMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerDedicatedSqlMinimalTlsSettingsListMockTests.java deleted file mode 100644 index fd79b191d5bf3..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerDedicatedSqlMinimalTlsSettingsListMockTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.DedicatedSQLminimalTlsSettings; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkspaceManagedSqlServerDedicatedSqlMinimalTlsSettingsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"location\":\"ffmnoiics\",\"properties\":{\"minimalTlsVersion\":\"hbrj\"},\"id\":\"talxrdsj\",\"name\":\"h\",\"type\":\"luqwgusxxhd\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .workspaceManagedSqlServerDedicatedSqlMinimalTlsSettings() - .list("rqm", "lpbyxroiduyq", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("hbrj", response.iterator().next().minimalTlsVersion()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerDedicatedSqlMinimalTlsSettingsUpdateMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerDedicatedSqlMinimalTlsSettingsUpdateMockTests.java deleted file mode 100644 index 86e3dc830be6d..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerDedicatedSqlMinimalTlsSettingsUpdateMockTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.fluent.models.DedicatedSQLminimalTlsSettingsInner; -import com.azure.resourcemanager.synapse.models.DedicatedSQLminimalTlsSettings; -import com.azure.resourcemanager.synapse.models.DedicatedSqlMinimalTlsSettingsName; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkspaceManagedSqlServerDedicatedSqlMinimalTlsSettingsUpdateMockTests { - @Test - public void testUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"location\":\"rxdhgv\",\"properties\":{\"minimalTlsVersion\":\"bxaot\"},\"id\":\"gbzxmbtplefoioy\",\"name\":\"doxzn\",\"type\":\"gvdtmuuv\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DedicatedSQLminimalTlsSettings response = - manager - .workspaceManagedSqlServerDedicatedSqlMinimalTlsSettings() - .update( - "pyvaosdkluwzx", - "ygz", - DedicatedSqlMinimalTlsSettingsName.DEFAULT, - new DedicatedSQLminimalTlsSettingsInner().withMinimalTlsVersion("qsq"), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("bxaot", response.minimalTlsVersion()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerEncryptionProtectorsRevalidateMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerEncryptionProtectorsRevalidateMockTests.java deleted file mode 100644 index 8dd9cbd0d6226..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerEncryptionProtectorsRevalidateMockTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.EncryptionProtectorName; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkspaceManagedSqlServerEncryptionProtectorsRevalidateMockTests { - @Test - public void testRevalidate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .workspaceManagedSqlServerEncryptionProtectors() - .revalidate("oizwxvs", "ksgfyyskyekg", EncryptionProtectorName.CURRENT, com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerRecoverableSqlPoolsGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerRecoverableSqlPoolsGetWithResponseMockTests.java deleted file mode 100644 index ef8dd10f50216..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerRecoverableSqlPoolsGetWithResponseMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.RecoverableSqlPool; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkspaceManagedSqlServerRecoverableSqlPoolsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"edition\":\"zyohxpthc\",\"serviceLevelObjective\":\"pvkvtwf\",\"elasticPoolName\":\"sobpbo\",\"lastAvailableBackupDate\":\"2021-04-13T06:45:03Z\"},\"id\":\"mlcdyarnggcjfwbl\",\"name\":\"hxkasmc\",\"type\":\"lmu\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - RecoverableSqlPool response = - manager - .workspaceManagedSqlServerRecoverableSqlPools() - .getWithResponse("q", "on", "gnwxl", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerRecoverableSqlPoolsListMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerRecoverableSqlPoolsListMockTests.java deleted file mode 100644 index 5791a9761e270..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerRecoverableSqlPoolsListMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.RecoverableSqlPool; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkspaceManagedSqlServerRecoverableSqlPoolsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"edition\":\"pkshlojermhzic\",\"serviceLevelObjective\":\"fdjhyaaknyukibxi\",\"elasticPoolName\":\"hphzwxqt\",\"lastAvailableBackupDate\":\"2021-03-03T09:40:39Z\"},\"id\":\"iilhvtozyagj\",\"name\":\"nxkbylhyyxgf\",\"type\":\"klvqzrwtrdgscn\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .workspaceManagedSqlServerRecoverableSqlPools() - .list("hzqjjtsmuydqfttk", "cybdueurgm", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerUsagesListMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerUsagesListMockTests.java deleted file mode 100644 index cde3cca44961d..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerUsagesListMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.ServerUsage; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkspaceManagedSqlServerUsagesListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"bu\",\"resourceName\":\"vqdorbccqcd\",\"displayName\":\"hojvlirkn\",\"currentValue\":12.500824662912958,\"limit\":69.68454789294407,\"unit\":\"tnagzlgpya\",\"nextResetTime\":\"2021-08-26T03:13:43Z\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .workspaceManagedSqlServerUsages() - .list("lsmnihqlcoqksyi", "bhyxw", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerVulnerabilityAssessmentsDeleteWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerVulnerabilityAssessmentsDeleteWithResponseMockTests.java deleted file mode 100644 index f214d1075b9c2..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceManagedSqlServerVulnerabilityAssessmentsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.VulnerabilityAssessmentName; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkspaceManagedSqlServerVulnerabilityAssessmentsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .workspaceManagedSqlServerVulnerabilityAssessments() - .deleteWithResponse( - "soauoorssatfyb", - "pufdmxuqbdqn", - VulnerabilityAssessmentName.DEFAULT, - com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceRepositoryConfigurationTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceRepositoryConfigurationTests.java deleted file mode 100644 index 7074b2269efc1..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceRepositoryConfigurationTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.synapse.models.WorkspaceRepositoryConfiguration; -import java.util.UUID; -import org.junit.jupiter.api.Assertions; - -public final class WorkspaceRepositoryConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkspaceRepositoryConfiguration model = - BinaryData - .fromString( - "{\"type\":\"pqfrtqlkz\",\"hostName\":\"gnitgvkxlzyq\",\"accountName\":\"fegcea\",\"projectName\":\"xwh\",\"repositoryName\":\"nsymoyqhlwigd\",\"collaborationBranch\":\"bkbxgomfa\",\"rootFolder\":\"wasqvdaeyyg\",\"lastCommitId\":\"akjsqz\",\"tenantId\":\"3702a1d4-9dbe-4cc4-9101-bcd4a55fa392\"}") - .toObject(WorkspaceRepositoryConfiguration.class); - Assertions.assertEquals("pqfrtqlkz", model.type()); - Assertions.assertEquals("gnitgvkxlzyq", model.hostname()); - Assertions.assertEquals("fegcea", model.accountName()); - Assertions.assertEquals("xwh", model.projectName()); - Assertions.assertEquals("nsymoyqhlwigd", model.repositoryName()); - Assertions.assertEquals("bkbxgomfa", model.collaborationBranch()); - Assertions.assertEquals("wasqvdaeyyg", model.rootFolder()); - Assertions.assertEquals("akjsqz", model.lastCommitId()); - Assertions.assertEquals(UUID.fromString("3702a1d4-9dbe-4cc4-9101-bcd4a55fa392"), model.tenantId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkspaceRepositoryConfiguration model = - new WorkspaceRepositoryConfiguration() - .withType("pqfrtqlkz") - .withHostname("gnitgvkxlzyq") - .withAccountName("fegcea") - .withProjectName("xwh") - .withRepositoryName("nsymoyqhlwigd") - .withCollaborationBranch("bkbxgomfa") - .withRootFolder("wasqvdaeyyg") - .withLastCommitId("akjsqz") - .withTenantId(UUID.fromString("3702a1d4-9dbe-4cc4-9101-bcd4a55fa392")); - model = BinaryData.fromObject(model).toObject(WorkspaceRepositoryConfiguration.class); - Assertions.assertEquals("pqfrtqlkz", model.type()); - Assertions.assertEquals("gnitgvkxlzyq", model.hostname()); - Assertions.assertEquals("fegcea", model.accountName()); - Assertions.assertEquals("xwh", model.projectName()); - Assertions.assertEquals("nsymoyqhlwigd", model.repositoryName()); - Assertions.assertEquals("bkbxgomfa", model.collaborationBranch()); - Assertions.assertEquals("wasqvdaeyyg", model.rootFolder()); - Assertions.assertEquals("akjsqz", model.lastCommitId()); - Assertions.assertEquals(UUID.fromString("3702a1d4-9dbe-4cc4-9101-bcd4a55fa392"), model.tenantId()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceSqlAadAdminsCreateOrUpdateMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceSqlAadAdminsCreateOrUpdateMockTests.java deleted file mode 100644 index 22892833c58f8..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceSqlAadAdminsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.fluent.models.WorkspaceAadAdminInfoInner; -import com.azure.resourcemanager.synapse.models.WorkspaceAadAdminInfo; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkspaceSqlAadAdminsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"tenantId\":\"czd\",\"login\":\"wnhkgq\",\"administratorType\":\"oxsstc\",\"sid\":\"rak\"},\"id\":\"rrynjcwmhly\",\"name\":\"gnukxrkemjpe\",\"type\":\"ulrlzaudgjtfbcl\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkspaceAadAdminInfo response = - manager - .workspaceSqlAadAdmins() - .createOrUpdate( - "yzivrm", - "tcdqlh", - new WorkspaceAadAdminInfoInner() - .withTenantId("hrktjleifibfiplh") - .withLogin("nsmy") - .withAdministratorType("owly") - .withSid("zmudsqcm"), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("czd", response.tenantId()); - Assertions.assertEquals("wnhkgq", response.login()); - Assertions.assertEquals("oxsstc", response.administratorType()); - Assertions.assertEquals("rak", response.sid()); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceSqlAadAdminsDeleteMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceSqlAadAdminsDeleteMockTests.java deleted file mode 100644 index 84f0da2a78059..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceSqlAadAdminsDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkspaceSqlAadAdminsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.workspaceSqlAadAdmins().delete("kkucddwnh", "zbuto", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceSqlAadAdminsGetWithResponseMockTests.java b/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceSqlAadAdminsGetWithResponseMockTests.java deleted file mode 100644 index cc00974b587f6..0000000000000 --- a/sdk/synapse/azure-resourcemanager-synapse/src/test/java/com/azure/resourcemanager/synapse/generated/WorkspaceSqlAadAdminsGetWithResponseMockTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.synapse.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.synapse.SynapseManager; -import com.azure.resourcemanager.synapse.models.WorkspaceAadAdminInfo; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class WorkspaceSqlAadAdminsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"tenantId\":\"utmgvmuyak\",\"login\":\"wk\",\"administratorType\":\"ow\",\"sid\":\"royrdurxf\"},\"id\":\"zqjim\",\"name\":\"jtgzj\",\"type\":\"xlfejlzuqloiwya\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - SynapseManager manager = - SynapseManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - WorkspaceAadAdminInfo response = - manager - .workspaceSqlAadAdmins() - .getWithResponse("skwxj", "vhxccbmkakmkoo", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("utmgvmuyak", response.tenantId()); - Assertions.assertEquals("wk", response.login()); - Assertions.assertEquals("ow", response.administratorType()); - Assertions.assertEquals("royrdurxf", response.sid()); - } -}