Skip to content

Commit

Permalink
fix (#2953)
Browse files Browse the repository at this point in the history
  • Loading branch information
XiaofeiCao authored Oct 12, 2024
1 parent 4ad7a83 commit 13e3396
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fluent-tests/Initialize-Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ $job = @(
# resource with writable name
"--version=$AUTOREST_CORE_VERSION $FLUENT_ARGUMENTS --input-file=https://raw.githubusercontent.com/Azure/azure-rest-api-specs/2548fe40102c9b5aa27a75a126c8367f55cb9e7d/specification/sql/resource-manager/Microsoft.Sql/stable/2021-11-01/FirewallRules.json --java.namespace=com.azure.mgmttest.resourcewithwritablename"

# non-string expandable enum
"--version=$AUTOREST_CORE_VERSION $FLUENT_ARGUMENTS --regenerate-pom=false --input-file=https://github.com/Azure/azure-rest-api-specs/blob/926540515b9d8059904f023d38c45dda8ba87c9f/specification/monitor/resource-manager/Microsoft.Insights/stable/2023-12-01/scheduledQueryRule_API.json --java.namespace=com.azure.mgmttest.nonstringexpandableenum"

# fluent lite
"--version=$AUTOREST_CORE_VERSION $FLUENTLITE_ARGUMENTS --pom-file=pom_generated_resources.xml https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/resources/resource-manager/readme.md --tag=package-resources-2021-01 --java.namespace=com.azure.mgmtlitetest.resources",
"--version=$AUTOREST_CORE_VERSION $FLUENTLITE_ARGUMENTS --regenerate-pom=false https://raw.githubusercontent.com/Azure/azure-rest-api-specs/da0cfefaa0e6c237e1e3819f1cb2e11d7606878d/specification/storage/resource-manager/readme.md --tag=package-2021-01 --java.namespace=com.azure.mgmtlitetest.storage",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
import com.azure.mgmttest.network.fluent.models.NetworkInterfaceInner;
import com.azure.mgmttest.network.fluent.models.NetworkSecurityGroupInner;
import com.azure.mgmttest.networkwatcher.fluent.models.PacketCaptureResultInner;
import com.azure.mgmttest.nonstringexpandableenum.fluent.models.ScheduledQueryRuleProperties;
import com.azure.mgmttest.nonstringexpandableenum.models.AlertSeverity;
import com.azure.mgmttest.postgresqlhsc.fluent.models.ServerConfigurationInner;
import com.azure.mgmttest.resources.fluent.DeploymentsClient;
import com.azure.mgmttest.resources.fluent.models.DeploymentExtendedInner;
Expand All @@ -38,6 +40,8 @@
import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet;
import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing;

import java.io.IOException;

import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.Mockito.anyString;
Expand Down Expand Up @@ -175,4 +179,9 @@ public void testSchemaCleanup() {
public void testResourceWithWritableName() {
FirewallRuleInner firewallRuleInner = new FirewallRuleInner();
}

public void testNonStringExpandableEnum() throws IOException {
ScheduledQueryRuleProperties properties = new ScheduledQueryRuleProperties();
String jsonString = properties.toJsonString();
}
}

0 comments on commit 13e3396

Please sign in to comment.