Skip to content

Commit 13e3396

Browse files
authored
fix (#2953)
1 parent 4ad7a83 commit 13e3396

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

fluent-tests/Initialize-Tests.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ $job = @(
114114
# resource with writable name
115115
"--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"
116116

117+
# non-string expandable enum
118+
"--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"
119+
117120
# fluent lite
118121
"--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",
119122
"--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",

fluent-tests/src/test/java/com/azure/mgmttest/CompilationTests.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
import com.azure.mgmttest.network.fluent.models.NetworkInterfaceInner;
2727
import com.azure.mgmttest.network.fluent.models.NetworkSecurityGroupInner;
2828
import com.azure.mgmttest.networkwatcher.fluent.models.PacketCaptureResultInner;
29+
import com.azure.mgmttest.nonstringexpandableenum.fluent.models.ScheduledQueryRuleProperties;
30+
import com.azure.mgmttest.nonstringexpandableenum.models.AlertSeverity;
2931
import com.azure.mgmttest.postgresqlhsc.fluent.models.ServerConfigurationInner;
3032
import com.azure.mgmttest.resources.fluent.DeploymentsClient;
3133
import com.azure.mgmttest.resources.fluent.models.DeploymentExtendedInner;
@@ -38,6 +40,8 @@
3840
import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsGet;
3941
import com.azure.resourcemanager.resources.fluentcore.collection.InnerSupportsListing;
4042

43+
import java.io.IOException;
44+
4145
import static org.mockito.ArgumentMatchers.any;
4246
import static org.mockito.ArgumentMatchers.anyInt;
4347
import static org.mockito.Mockito.anyString;
@@ -175,4 +179,9 @@ public void testSchemaCleanup() {
175179
public void testResourceWithWritableName() {
176180
FirewallRuleInner firewallRuleInner = new FirewallRuleInner();
177181
}
182+
183+
public void testNonStringExpandableEnum() throws IOException {
184+
ScheduledQueryRuleProperties properties = new ScheduledQueryRuleProperties();
185+
String jsonString = properties.toJsonString();
186+
}
178187
}

0 commit comments

Comments
 (0)