diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/CHANGELOG.md b/sdk/servicefabric/azure-resourcemanager-servicefabric/CHANGELOG.md
index 190c75f581f1..122a4d724d9c 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/CHANGELOG.md
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/CHANGELOG.md
@@ -1,6 +1,8 @@
# Release History
-## 1.0.0-beta.5 (Unreleased)
+## 1.0.0-beta.1 (2024-02-01)
+
+- Azure Resource Manager ServiceFabric client library for Java. This package contains Microsoft Azure SDK for ServiceFabric Management SDK. Service Fabric Management Client. Package tag package-2021-06. 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/servicefabric/azure-resourcemanager-servicefabric/README.md b/sdk/servicefabric/azure-resourcemanager-servicefabric/README.md
index 3e4b23292306..3d3b4a802837 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/README.md
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/README.md
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-servicefabric
- 1.0.0-beta.4
+ 1.0.0-beta.5
```
[//]: # ({x-version-update-end})
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/SAMPLE.md b/sdk/servicefabric/azure-resourcemanager-servicefabric/SAMPLE.md
index 49c3a6ef308f..44064d9c3e78 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/SAMPLE.md
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/SAMPLE.md
@@ -532,6 +532,7 @@ import com.azure.resourcemanager.servicefabric.models.StoreName;
import com.azure.resourcemanager.servicefabric.models.UpgradeMode;
import com.azure.resourcemanager.servicefabric.models.VmssZonalUpgradeMode;
import java.time.OffsetDateTime;
+import java.time.format.DateTimeFormatter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
@@ -709,6 +710,7 @@ import com.azure.resourcemanager.servicefabric.models.NodeTypeDescription;
import com.azure.resourcemanager.servicefabric.models.ReliabilityLevel;
import com.azure.resourcemanager.servicefabric.models.UpgradeMode;
import java.time.OffsetDateTime;
+import java.time.format.DateTimeFormatter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/pom.xml b/sdk/servicefabric/azure-resourcemanager-servicefabric/pom.xml
index e8ce5218ea57..7891058376b7 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/pom.xml
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/pom.xml
@@ -88,8 +88,6 @@
4.11.0
test
-
-
net.bytebuddy
byte-buddy
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/ServiceFabricManager.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/ServiceFabricManager.java
index 06e99bac8d47..da8d13e9af05 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/ServiceFabricManager.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/ServiceFabricManager.java
@@ -224,7 +224,7 @@ public ServiceFabricManager authenticate(TokenCredential credential, AzureProfil
StringBuilder userAgentBuilder = new StringBuilder();
userAgentBuilder.append("azsdk-java").append("-").append("com.azure.resourcemanager.servicefabric")
- .append("/").append("1.0.0-beta.4");
+ .append("/").append("1.0.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder.append(" (").append(Configuration.getGlobalConfiguration().get("java.version"))
.append("; ").append(Configuration.getGlobalConfiguration().get("os.name")).append("; ")
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationResourceImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationResourceImpl.java
index d51de00ee4bb..225ec6ffbb44 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationResourceImpl.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationResourceImpl.java
@@ -189,9 +189,9 @@ public ApplicationResource apply(Context context) {
com.azure.resourcemanager.servicefabric.ServiceFabricManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
- this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
- this.clusterName = Utils.getValueFromIdByName(innerObject.id(), "clusters");
- this.applicationName = Utils.getValueFromIdByName(innerObject.id(), "applications");
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.clusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "clusters");
+ this.applicationName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "applications");
}
public ApplicationResource refresh() {
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypeResourceImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypeResourceImpl.java
index 958bcab2f4b0..73e30baf84db 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypeResourceImpl.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypeResourceImpl.java
@@ -130,9 +130,9 @@ public ApplicationTypeResource apply(Context context) {
com.azure.resourcemanager.servicefabric.ServiceFabricManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
- this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
- this.clusterName = Utils.getValueFromIdByName(innerObject.id(), "clusters");
- this.applicationTypeName = Utils.getValueFromIdByName(innerObject.id(), "applicationTypes");
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.clusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "clusters");
+ this.applicationTypeName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "applicationTypes");
}
public ApplicationTypeResource refresh() {
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypeVersionResourceImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypeVersionResourceImpl.java
index a0bed96d43eb..926439d4075c 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypeVersionResourceImpl.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypeVersionResourceImpl.java
@@ -143,10 +143,10 @@ public ApplicationTypeVersionResource apply(Context context) {
com.azure.resourcemanager.servicefabric.ServiceFabricManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
- this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
- this.clusterName = Utils.getValueFromIdByName(innerObject.id(), "clusters");
- this.applicationTypeName = Utils.getValueFromIdByName(innerObject.id(), "applicationTypes");
- this.version = Utils.getValueFromIdByName(innerObject.id(), "versions");
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.clusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "clusters");
+ this.applicationTypeName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "applicationTypes");
+ this.version = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "versions");
}
public ApplicationTypeVersionResource refresh() {
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypeVersionsImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypeVersionsImpl.java
index d15464174189..e1f34a9c64ff 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypeVersionsImpl.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypeVersionsImpl.java
@@ -63,33 +63,35 @@ public PagedIterable list(String resourceGroupNa
String applicationTypeName) {
PagedIterable inner
= this.serviceClient().list(resourceGroupName, clusterName, applicationTypeName);
- return Utils.mapPage(inner, inner1 -> new ApplicationTypeVersionResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner,
+ inner1 -> new ApplicationTypeVersionResourceImpl(inner1, this.manager()));
}
public PagedIterable list(String resourceGroupName, String clusterName,
String applicationTypeName, Context context) {
PagedIterable inner
= this.serviceClient().list(resourceGroupName, clusterName, applicationTypeName, context);
- return Utils.mapPage(inner, inner1 -> new ApplicationTypeVersionResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner,
+ inner1 -> new ApplicationTypeVersionResourceImpl(inner1, this.manager()));
}
public ApplicationTypeVersionResource getById(String id) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String clusterName = Utils.getValueFromIdByName(id, "clusters");
+ String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters");
if (clusterName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id)));
}
- String applicationTypeName = Utils.getValueFromIdByName(id, "applicationTypes");
+ String applicationTypeName = ResourceManagerUtils.getValueFromIdByName(id, "applicationTypes");
if (applicationTypeName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'applicationTypes'.", id)));
}
- String version = Utils.getValueFromIdByName(id, "versions");
+ String version = ResourceManagerUtils.getValueFromIdByName(id, "versions");
if (version == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id)));
@@ -99,22 +101,22 @@ public ApplicationTypeVersionResource getById(String id) {
}
public Response getByIdWithResponse(String id, Context context) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String clusterName = Utils.getValueFromIdByName(id, "clusters");
+ String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters");
if (clusterName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id)));
}
- String applicationTypeName = Utils.getValueFromIdByName(id, "applicationTypes");
+ String applicationTypeName = ResourceManagerUtils.getValueFromIdByName(id, "applicationTypes");
if (applicationTypeName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'applicationTypes'.", id)));
}
- String version = Utils.getValueFromIdByName(id, "versions");
+ String version = ResourceManagerUtils.getValueFromIdByName(id, "versions");
if (version == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id)));
@@ -123,22 +125,22 @@ public Response getByIdWithResponse(String id, C
}
public void deleteById(String id) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String clusterName = Utils.getValueFromIdByName(id, "clusters");
+ String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters");
if (clusterName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id)));
}
- String applicationTypeName = Utils.getValueFromIdByName(id, "applicationTypes");
+ String applicationTypeName = ResourceManagerUtils.getValueFromIdByName(id, "applicationTypes");
if (applicationTypeName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'applicationTypes'.", id)));
}
- String version = Utils.getValueFromIdByName(id, "versions");
+ String version = ResourceManagerUtils.getValueFromIdByName(id, "versions");
if (version == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id)));
@@ -147,22 +149,22 @@ public void deleteById(String id) {
}
public void deleteByIdWithResponse(String id, Context context) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String clusterName = Utils.getValueFromIdByName(id, "clusters");
+ String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters");
if (clusterName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id)));
}
- String applicationTypeName = Utils.getValueFromIdByName(id, "applicationTypes");
+ String applicationTypeName = ResourceManagerUtils.getValueFromIdByName(id, "applicationTypes");
if (applicationTypeName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'applicationTypes'.", id)));
}
- String version = Utils.getValueFromIdByName(id, "versions");
+ String version = ResourceManagerUtils.getValueFromIdByName(id, "versions");
if (version == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'versions'.", id)));
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypesImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypesImpl.java
index 706602bde77e..22975cd44748 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypesImpl.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationTypesImpl.java
@@ -59,27 +59,27 @@ public void delete(String resourceGroupName, String clusterName, String applicat
public PagedIterable list(String resourceGroupName, String clusterName) {
PagedIterable inner = this.serviceClient().list(resourceGroupName, clusterName);
- return Utils.mapPage(inner, inner1 -> new ApplicationTypeResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new ApplicationTypeResourceImpl(inner1, this.manager()));
}
public PagedIterable list(String resourceGroupName, String clusterName, Context context) {
PagedIterable inner
= this.serviceClient().list(resourceGroupName, clusterName, context);
- return Utils.mapPage(inner, inner1 -> new ApplicationTypeResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new ApplicationTypeResourceImpl(inner1, this.manager()));
}
public ApplicationTypeResource getById(String id) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String clusterName = Utils.getValueFromIdByName(id, "clusters");
+ String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters");
if (clusterName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id)));
}
- String applicationTypeName = Utils.getValueFromIdByName(id, "applicationTypes");
+ String applicationTypeName = ResourceManagerUtils.getValueFromIdByName(id, "applicationTypes");
if (applicationTypeName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'applicationTypes'.", id)));
@@ -88,17 +88,17 @@ public ApplicationTypeResource getById(String id) {
}
public Response getByIdWithResponse(String id, Context context) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String clusterName = Utils.getValueFromIdByName(id, "clusters");
+ String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters");
if (clusterName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id)));
}
- String applicationTypeName = Utils.getValueFromIdByName(id, "applicationTypes");
+ String applicationTypeName = ResourceManagerUtils.getValueFromIdByName(id, "applicationTypes");
if (applicationTypeName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'applicationTypes'.", id)));
@@ -107,17 +107,17 @@ public Response getByIdWithResponse(String id, Context
}
public void deleteById(String id) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String clusterName = Utils.getValueFromIdByName(id, "clusters");
+ String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters");
if (clusterName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id)));
}
- String applicationTypeName = Utils.getValueFromIdByName(id, "applicationTypes");
+ String applicationTypeName = ResourceManagerUtils.getValueFromIdByName(id, "applicationTypes");
if (applicationTypeName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'applicationTypes'.", id)));
@@ -126,17 +126,17 @@ public void deleteById(String id) {
}
public void deleteByIdWithResponse(String id, Context context) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String clusterName = Utils.getValueFromIdByName(id, "clusters");
+ String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters");
if (clusterName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id)));
}
- String applicationTypeName = Utils.getValueFromIdByName(id, "applicationTypes");
+ String applicationTypeName = ResourceManagerUtils.getValueFromIdByName(id, "applicationTypes");
if (applicationTypeName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'applicationTypes'.", id)));
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationsImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationsImpl.java
index c1f623e6c1f5..ec8dd8b24ab4 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationsImpl.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ApplicationsImpl.java
@@ -58,27 +58,27 @@ public void delete(String resourceGroupName, String clusterName, String applicat
public PagedIterable list(String resourceGroupName, String clusterName) {
PagedIterable inner = this.serviceClient().list(resourceGroupName, clusterName);
- return Utils.mapPage(inner, inner1 -> new ApplicationResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new ApplicationResourceImpl(inner1, this.manager()));
}
public PagedIterable list(String resourceGroupName, String clusterName, Context context) {
PagedIterable inner
= this.serviceClient().list(resourceGroupName, clusterName, context);
- return Utils.mapPage(inner, inner1 -> new ApplicationResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new ApplicationResourceImpl(inner1, this.manager()));
}
public ApplicationResource getById(String id) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String clusterName = Utils.getValueFromIdByName(id, "clusters");
+ String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters");
if (clusterName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id)));
}
- String applicationName = Utils.getValueFromIdByName(id, "applications");
+ String applicationName = ResourceManagerUtils.getValueFromIdByName(id, "applications");
if (applicationName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id)));
@@ -87,17 +87,17 @@ public ApplicationResource getById(String id) {
}
public Response getByIdWithResponse(String id, Context context) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String clusterName = Utils.getValueFromIdByName(id, "clusters");
+ String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters");
if (clusterName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id)));
}
- String applicationName = Utils.getValueFromIdByName(id, "applications");
+ String applicationName = ResourceManagerUtils.getValueFromIdByName(id, "applications");
if (applicationName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id)));
@@ -106,17 +106,17 @@ public Response getByIdWithResponse(String id, Context cont
}
public void deleteById(String id) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String clusterName = Utils.getValueFromIdByName(id, "clusters");
+ String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters");
if (clusterName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id)));
}
- String applicationName = Utils.getValueFromIdByName(id, "applications");
+ String applicationName = ResourceManagerUtils.getValueFromIdByName(id, "applications");
if (applicationName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id)));
@@ -125,17 +125,17 @@ public void deleteById(String id) {
}
public void deleteByIdWithResponse(String id, Context context) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String clusterName = Utils.getValueFromIdByName(id, "clusters");
+ String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters");
if (clusterName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id)));
}
- String applicationName = Utils.getValueFromIdByName(id, "applications");
+ String applicationName = ResourceManagerUtils.getValueFromIdByName(id, "applications");
if (applicationName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id)));
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClusterImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClusterImpl.java
index 25f601de88de..23d95672e6a6 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClusterImpl.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClusterImpl.java
@@ -308,8 +308,8 @@ public Cluster apply(Context context) {
ClusterImpl(ClusterInner innerObject, com.azure.resourcemanager.servicefabric.ServiceFabricManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
- this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
- this.clusterName = Utils.getValueFromIdByName(innerObject.id(), "clusters");
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.clusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "clusters");
}
public Cluster refresh() {
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClustersImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClustersImpl.java
index 3e03fec8b7c2..75bf85d20bee 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClustersImpl.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ClustersImpl.java
@@ -62,22 +62,22 @@ public void deleteByResourceGroup(String resourceGroupName, String clusterName)
public PagedIterable listByResourceGroup(String resourceGroupName) {
PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName);
- return Utils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager()));
}
public PagedIterable listByResourceGroup(String resourceGroupName, Context context) {
PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context);
- return Utils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager()));
}
public PagedIterable list() {
PagedIterable inner = this.serviceClient().list();
- return Utils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager()));
}
public PagedIterable list(Context context) {
PagedIterable inner = this.serviceClient().list(context);
- return Utils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new ClusterImpl(inner1, this.manager()));
}
public Response listUpgradableVersionsWithResponse(String resourceGroupName,
@@ -103,12 +103,12 @@ public UpgradableVersionPathResult listUpgradableVersions(String resourceGroupNa
}
public Cluster getById(String id) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String clusterName = Utils.getValueFromIdByName(id, "clusters");
+ String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters");
if (clusterName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id)));
@@ -117,12 +117,12 @@ public Cluster getById(String id) {
}
public Response getByIdWithResponse(String id, Context context) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String clusterName = Utils.getValueFromIdByName(id, "clusters");
+ String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters");
if (clusterName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id)));
@@ -131,12 +131,12 @@ public Response getByIdWithResponse(String id, Context context) {
}
public void deleteById(String id) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String clusterName = Utils.getValueFromIdByName(id, "clusters");
+ String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters");
if (clusterName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id)));
@@ -145,12 +145,12 @@ public void deleteById(String id) {
}
public Response deleteByIdWithResponse(String id, Context context) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String clusterName = Utils.getValueFromIdByName(id, "clusters");
+ String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters");
if (clusterName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id)));
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/OperationsImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/OperationsImpl.java
index db55f27c33bc..1c91c7291890 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/OperationsImpl.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/OperationsImpl.java
@@ -27,12 +27,12 @@ public OperationsImpl(OperationsClient innerClient,
public PagedIterable list() {
PagedIterable inner = this.serviceClient().list();
- return Utils.mapPage(inner, inner1 -> new OperationResultImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationResultImpl(inner1, this.manager()));
}
public PagedIterable list(Context context) {
PagedIterable inner = this.serviceClient().list(context);
- return Utils.mapPage(inner, inner1 -> new OperationResultImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationResultImpl(inner1, this.manager()));
}
private OperationsClient serviceClient() {
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/Utils.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ResourceManagerUtils.java
similarity index 99%
rename from sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/Utils.java
rename to sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ResourceManagerUtils.java
index 25d6977a46bf..da6c74f2868c 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/Utils.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ResourceManagerUtils.java
@@ -19,8 +19,8 @@
import java.util.stream.Stream;
import reactor.core.publisher.Flux;
-final class Utils {
- private Utils() {
+final class ResourceManagerUtils {
+ private ResourceManagerUtils() {
}
static String getValueFromIdByName(String id, String name) {
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ServiceResourceImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ServiceResourceImpl.java
index da5fa388a2b4..17d9533aec20 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ServiceResourceImpl.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ServiceResourceImpl.java
@@ -134,10 +134,10 @@ public ServiceResource apply(Context context) {
com.azure.resourcemanager.servicefabric.ServiceFabricManager serviceManager) {
this.innerObject = innerObject;
this.serviceManager = serviceManager;
- this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups");
- this.clusterName = Utils.getValueFromIdByName(innerObject.id(), "clusters");
- this.applicationName = Utils.getValueFromIdByName(innerObject.id(), "applications");
- this.serviceName = Utils.getValueFromIdByName(innerObject.id(), "services");
+ this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups");
+ this.clusterName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "clusters");
+ this.applicationName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "applications");
+ this.serviceName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "services");
}
public ServiceResource refresh() {
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ServicesImpl.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ServicesImpl.java
index 70db0cd041a2..76cffe01f8d1 100644
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ServicesImpl.java
+++ b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/main/java/com/azure/resourcemanager/servicefabric/implementation/ServicesImpl.java
@@ -62,33 +62,33 @@ public void delete(String resourceGroupName, String clusterName, String applicat
public PagedIterable list(String resourceGroupName, String clusterName, String applicationName) {
PagedIterable inner
= this.serviceClient().list(resourceGroupName, clusterName, applicationName);
- return Utils.mapPage(inner, inner1 -> new ServiceResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new ServiceResourceImpl(inner1, this.manager()));
}
public PagedIterable list(String resourceGroupName, String clusterName, String applicationName,
Context context) {
PagedIterable inner
= this.serviceClient().list(resourceGroupName, clusterName, applicationName, context);
- return Utils.mapPage(inner, inner1 -> new ServiceResourceImpl(inner1, this.manager()));
+ return ResourceManagerUtils.mapPage(inner, inner1 -> new ServiceResourceImpl(inner1, this.manager()));
}
public ServiceResource getById(String id) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String clusterName = Utils.getValueFromIdByName(id, "clusters");
+ String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters");
if (clusterName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id)));
}
- String applicationName = Utils.getValueFromIdByName(id, "applications");
+ String applicationName = ResourceManagerUtils.getValueFromIdByName(id, "applications");
if (applicationName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id)));
}
- String serviceName = Utils.getValueFromIdByName(id, "services");
+ String serviceName = ResourceManagerUtils.getValueFromIdByName(id, "services");
if (serviceName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id)));
@@ -98,22 +98,22 @@ public ServiceResource getById(String id) {
}
public Response getByIdWithResponse(String id, Context context) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String clusterName = Utils.getValueFromIdByName(id, "clusters");
+ String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters");
if (clusterName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id)));
}
- String applicationName = Utils.getValueFromIdByName(id, "applications");
+ String applicationName = ResourceManagerUtils.getValueFromIdByName(id, "applications");
if (applicationName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id)));
}
- String serviceName = Utils.getValueFromIdByName(id, "services");
+ String serviceName = ResourceManagerUtils.getValueFromIdByName(id, "services");
if (serviceName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id)));
@@ -122,22 +122,22 @@ public Response getByIdWithResponse(String id, Context context)
}
public void deleteById(String id) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String clusterName = Utils.getValueFromIdByName(id, "clusters");
+ String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters");
if (clusterName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id)));
}
- String applicationName = Utils.getValueFromIdByName(id, "applications");
+ String applicationName = ResourceManagerUtils.getValueFromIdByName(id, "applications");
if (applicationName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id)));
}
- String serviceName = Utils.getValueFromIdByName(id, "services");
+ String serviceName = ResourceManagerUtils.getValueFromIdByName(id, "services");
if (serviceName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id)));
@@ -146,22 +146,22 @@ public void deleteById(String id) {
}
public void deleteByIdWithResponse(String id, Context context) {
- String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups");
+ String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups");
if (resourceGroupName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id)));
}
- String clusterName = Utils.getValueFromIdByName(id, "clusters");
+ String clusterName = ResourceManagerUtils.getValueFromIdByName(id, "clusters");
if (clusterName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'clusters'.", id)));
}
- String applicationName = Utils.getValueFromIdByName(id, "applications");
+ String applicationName = ResourceManagerUtils.getValueFromIdByName(id, "applications");
if (applicationName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'applications'.", id)));
}
- String serviceName = Utils.getValueFromIdByName(id, "services");
+ String serviceName = ResourceManagerUtils.getValueFromIdByName(id, "services");
if (serviceName == null) {
throw LOGGER.logExceptionAsError(new IllegalArgumentException(
String.format("The resource ID '%s' is not valid. Missing path segment 'services'.", id)));
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationDeltaHealthPolicyTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationDeltaHealthPolicyTests.java
deleted file mode 100644
index 36cfc902c33c..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationDeltaHealthPolicyTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.ApplicationDeltaHealthPolicy;
-import com.azure.resourcemanager.servicefabric.models.ServiceTypeDeltaHealthPolicy;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class ApplicationDeltaHealthPolicyTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ApplicationDeltaHealthPolicy model = BinaryData.fromString(
- "{\"defaultServiceTypeDeltaHealthPolicy\":{\"maxPercentDeltaUnhealthyServices\":233179905},\"serviceTypeDeltaHealthPolicies\":{\"lniwpwcukjfkgiaw\":{\"maxPercentDeltaUnhealthyServices\":900623903},\"ryplwckbasyypn\":{\"maxPercentDeltaUnhealthyServices\":1214753692}}}")
- .toObject(ApplicationDeltaHealthPolicy.class);
- Assertions.assertEquals(233179905,
- model.defaultServiceTypeDeltaHealthPolicy().maxPercentDeltaUnhealthyServices());
- Assertions.assertEquals(900623903,
- model.serviceTypeDeltaHealthPolicies().get("lniwpwcukjfkgiaw").maxPercentDeltaUnhealthyServices());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ApplicationDeltaHealthPolicy model = new ApplicationDeltaHealthPolicy()
- .withDefaultServiceTypeDeltaHealthPolicy(
- new ServiceTypeDeltaHealthPolicy().withMaxPercentDeltaUnhealthyServices(233179905))
- .withServiceTypeDeltaHealthPolicies(mapOf("lniwpwcukjfkgiaw",
- new ServiceTypeDeltaHealthPolicy().withMaxPercentDeltaUnhealthyServices(900623903), "ryplwckbasyypn",
- new ServiceTypeDeltaHealthPolicy().withMaxPercentDeltaUnhealthyServices(1214753692)));
- model = BinaryData.fromObject(model).toObject(ApplicationDeltaHealthPolicy.class);
- Assertions.assertEquals(233179905,
- model.defaultServiceTypeDeltaHealthPolicy().maxPercentDeltaUnhealthyServices());
- Assertions.assertEquals(900623903,
- model.serviceTypeDeltaHealthPolicies().get("lniwpwcukjfkgiaw").maxPercentDeltaUnhealthyServices());
- }
-
- // Use "Map.of" if available
- @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/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationHealthPolicyTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationHealthPolicyTests.java
deleted file mode 100644
index 0414a381afc4..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationHealthPolicyTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.ApplicationHealthPolicy;
-import com.azure.resourcemanager.servicefabric.models.ServiceTypeHealthPolicy;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class ApplicationHealthPolicyTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ApplicationHealthPolicy model = BinaryData.fromString(
- "{\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":186594005},\"serviceTypeHealthPolicies\":{\"bkzgcwrwclx\":{\"maxPercentUnhealthyServices\":2049117618},\"ljdousk\":{\"maxPercentUnhealthyServices\":562899344},\"kocrcjdkwtnhx\":{\"maxPercentUnhealthyServices\":874345897},\"biksq\":{\"maxPercentUnhealthyServices\":1299495603}}}")
- .toObject(ApplicationHealthPolicy.class);
- Assertions.assertEquals(186594005, model.defaultServiceTypeHealthPolicy().maxPercentUnhealthyServices());
- Assertions.assertEquals(2049117618,
- model.serviceTypeHealthPolicies().get("bkzgcwrwclx").maxPercentUnhealthyServices());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ApplicationHealthPolicy model
- = new ApplicationHealthPolicy()
- .withDefaultServiceTypeHealthPolicy(
- new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(186594005))
- .withServiceTypeHealthPolicies(
- mapOf("bkzgcwrwclx", new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(2049117618),
- "ljdousk", new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(562899344),
- "kocrcjdkwtnhx", new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(874345897),
- "biksq", new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1299495603)));
- model = BinaryData.fromObject(model).toObject(ApplicationHealthPolicy.class);
- Assertions.assertEquals(186594005, model.defaultServiceTypeHealthPolicy().maxPercentUnhealthyServices());
- Assertions.assertEquals(2049117618,
- model.serviceTypeHealthPolicies().get("bkzgcwrwclx").maxPercentUnhealthyServices());
- }
-
- // Use "Map.of" if available
- @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/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationMetricDescriptionTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationMetricDescriptionTests.java
deleted file mode 100644
index 487c33d4fa5d..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationMetricDescriptionTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.ApplicationMetricDescription;
-import org.junit.jupiter.api.Assertions;
-
-public final class ApplicationMetricDescriptionTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ApplicationMetricDescription model = BinaryData.fromString(
- "{\"name\":\"qig\",\"maximumCapacity\":1427620858530935166,\"reservationCapacity\":8642059696861181136,\"totalApplicationCapacity\":5173080348817508321}")
- .toObject(ApplicationMetricDescription.class);
- Assertions.assertEquals("qig", model.name());
- Assertions.assertEquals(1427620858530935166L, model.maximumCapacity());
- Assertions.assertEquals(8642059696861181136L, model.reservationCapacity());
- Assertions.assertEquals(5173080348817508321L, model.totalApplicationCapacity());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ApplicationMetricDescription model
- = new ApplicationMetricDescription().withName("qig").withMaximumCapacity(1427620858530935166L)
- .withReservationCapacity(8642059696861181136L).withTotalApplicationCapacity(5173080348817508321L);
- model = BinaryData.fromObject(model).toObject(ApplicationMetricDescription.class);
- Assertions.assertEquals("qig", model.name());
- Assertions.assertEquals(1427620858530935166L, model.maximumCapacity());
- Assertions.assertEquals(8642059696861181136L, model.reservationCapacity());
- Assertions.assertEquals(5173080348817508321L, model.totalApplicationCapacity());
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationResourceInnerTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationResourceInnerTests.java
deleted file mode 100644
index 624c3dc2ec43..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationResourceInnerTests.java
+++ /dev/null
@@ -1,171 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.fluent.models.ApplicationResourceInner;
-import com.azure.resourcemanager.servicefabric.models.ApplicationMetricDescription;
-import com.azure.resourcemanager.servicefabric.models.ApplicationUpgradePolicy;
-import com.azure.resourcemanager.servicefabric.models.ApplicationUserAssignedIdentity;
-import com.azure.resourcemanager.servicefabric.models.ArmApplicationHealthPolicy;
-import com.azure.resourcemanager.servicefabric.models.ArmRollingUpgradeMonitoringPolicy;
-import com.azure.resourcemanager.servicefabric.models.ArmServiceTypeHealthPolicy;
-import com.azure.resourcemanager.servicefabric.models.ArmUpgradeFailureAction;
-import com.azure.resourcemanager.servicefabric.models.ManagedIdentity;
-import com.azure.resourcemanager.servicefabric.models.ManagedIdentityType;
-import com.azure.resourcemanager.servicefabric.models.RollingUpgradeMode;
-import com.azure.resourcemanager.servicefabric.models.UserAssignedIdentity;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class ApplicationResourceInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ApplicationResourceInner model = BinaryData.fromString(
- "{\"identity\":{\"principalId\":\"tsthsucocm\",\"tenantId\":\"yazttbtwwrqpue\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"zyoxaepdkzjan\":{\"principalId\":\"biexzfeyu\",\"clientId\":\"xibxujwbhqwalm\"},\"ytxhp\":{\"principalId\":\"xrhdwbavxbniwdjs\",\"clientId\":\"tsdbpgn\"},\"wtctyqi\":{\"principalId\":\"bzpfzab\",\"clientId\":\"cuh\"},\"kfplgmgsxnk\":{\"principalId\":\"bbovplwzbhvgyugu\",\"clientId\":\"vmkfssxqu\"}}},\"properties\":{\"provisioningState\":\"deslp\",\"typeName\":\"opwi\",\"typeVersion\":\"ghxpkdw\",\"parameters\":{\"upedeojnabckhs\":\"iuebbaumny\",\"ie\":\"txp\",\"jdhtldwkyzxu\":\"tfhvpesapskrdqmh\",\"svlxotogtwrup\":\"tkncwsc\"},\"upgradePolicy\":{\"upgradeReplicaSetCheckTimeout\":\"vnm\",\"forceRestart\":true,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Manual\",\"healthCheckWaitDuration\":\"o\",\"healthCheckStableDuration\":\"ilovnot\",\"healthCheckRetryTimeout\":\"jfcn\",\"upgradeTimeout\":\"k\",\"upgradeDomainTimeout\":\"x\"},\"applicationHealthPolicy\":{\"considerWarningAsError\":true,\"maxPercentUnhealthyDeployedApplications\":657781919,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":1754671531,\"maxPercentUnhealthyPartitionsPerService\":1501927720,\"maxPercentUnhealthyReplicasPerPartition\":1284749235},\"serviceTypeHealthPolicyMap\":{\"clfp\":{\"maxPercentUnhealthyServices\":1633235296,\"maxPercentUnhealthyPartitionsPerService\":1979421186,\"maxPercentUnhealthyReplicasPerPartition\":1468269047}}},\"upgradeMode\":\"UnmonitoredAuto\",\"recreateApplication\":false},\"minimumNodes\":6303383872663340344,\"maximumNodes\":8770120849185576658,\"removeApplicationCapacity\":false,\"metrics\":[{\"name\":\"sbj\",\"maximumCapacity\":1292231161047660234,\"reservationCapacity\":8913573077828001292,\"totalApplicationCapacity\":8623440575477757964},{\"name\":\"ueefjzwfqkqu\",\"maximumCapacity\":3292485781669976103,\"reservationCapacity\":7570837536586623824,\"totalApplicationCapacity\":4310608753987324485},{\"name\":\"laocqxtccmg\",\"maximumCapacity\":4531156159452032810,\"reservationCapacity\":6928065700546189319,\"totalApplicationCapacity\":8937450445167889405}],\"managedIdentities\":[{\"name\":\"vwfudwpzntxhd\",\"principalId\":\"hl\"}]},\"location\":\"jbhckfrlhr\",\"tags\":{\"ycanuzbpzkafku\":\"kyv\",\"rnwb\":\"b\"},\"etag\":\"hhseyv\",\"id\":\"srtslhspkdeem\",\"name\":\"ofmxagkvtmelmqkr\",\"type\":\"ahvljuaha\"}")
- .toObject(ApplicationResourceInner.class);
- Assertions.assertEquals(ManagedIdentityType.USER_ASSIGNED, model.identity().type());
- Assertions.assertEquals("jbhckfrlhr", model.location());
- Assertions.assertEquals("kyv", model.tags().get("ycanuzbpzkafku"));
- Assertions.assertEquals("opwi", model.typeName());
- Assertions.assertEquals("ghxpkdw", model.typeVersion());
- Assertions.assertEquals("iuebbaumny", model.parameters().get("upedeojnabckhs"));
- Assertions.assertEquals("vnm", model.upgradePolicy().upgradeReplicaSetCheckTimeout());
- Assertions.assertEquals(true, model.upgradePolicy().forceRestart());
- Assertions.assertEquals(ArmUpgradeFailureAction.MANUAL,
- model.upgradePolicy().rollingUpgradeMonitoringPolicy().failureAction());
- Assertions.assertEquals("o", model.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckWaitDuration());
- Assertions.assertEquals("ilovnot",
- model.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckStableDuration());
- Assertions.assertEquals("jfcn",
- model.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckRetryTimeout());
- Assertions.assertEquals("k", model.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeTimeout());
- Assertions.assertEquals("x", model.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeDomainTimeout());
- Assertions.assertEquals(true, model.upgradePolicy().applicationHealthPolicy().considerWarningAsError());
- Assertions.assertEquals(657781919,
- model.upgradePolicy().applicationHealthPolicy().maxPercentUnhealthyDeployedApplications());
- Assertions.assertEquals(1754671531, model.upgradePolicy().applicationHealthPolicy()
- .defaultServiceTypeHealthPolicy().maxPercentUnhealthyServices());
- Assertions.assertEquals(1501927720, model.upgradePolicy().applicationHealthPolicy()
- .defaultServiceTypeHealthPolicy().maxPercentUnhealthyPartitionsPerService());
- Assertions.assertEquals(1284749235, model.upgradePolicy().applicationHealthPolicy()
- .defaultServiceTypeHealthPolicy().maxPercentUnhealthyReplicasPerPartition());
- Assertions.assertEquals(1633235296, model.upgradePolicy().applicationHealthPolicy().serviceTypeHealthPolicyMap()
- .get("clfp").maxPercentUnhealthyServices());
- Assertions.assertEquals(1979421186, model.upgradePolicy().applicationHealthPolicy().serviceTypeHealthPolicyMap()
- .get("clfp").maxPercentUnhealthyPartitionsPerService());
- Assertions.assertEquals(1468269047, model.upgradePolicy().applicationHealthPolicy().serviceTypeHealthPolicyMap()
- .get("clfp").maxPercentUnhealthyReplicasPerPartition());
- Assertions.assertEquals(RollingUpgradeMode.UNMONITORED_AUTO, model.upgradePolicy().upgradeMode());
- Assertions.assertEquals(false, model.upgradePolicy().recreateApplication());
- Assertions.assertEquals(6303383872663340344L, model.minimumNodes());
- Assertions.assertEquals(8770120849185576658L, model.maximumNodes());
- Assertions.assertEquals(false, model.removeApplicationCapacity());
- Assertions.assertEquals("sbj", model.metrics().get(0).name());
- Assertions.assertEquals(1292231161047660234L, model.metrics().get(0).maximumCapacity());
- Assertions.assertEquals(8913573077828001292L, model.metrics().get(0).reservationCapacity());
- Assertions.assertEquals(8623440575477757964L, model.metrics().get(0).totalApplicationCapacity());
- Assertions.assertEquals("vwfudwpzntxhd", model.managedIdentities().get(0).name());
- Assertions.assertEquals("hl", model.managedIdentities().get(0).principalId());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ApplicationResourceInner model = new ApplicationResourceInner()
- .withIdentity(new ManagedIdentity().withType(ManagedIdentityType.USER_ASSIGNED).withUserAssignedIdentities(
- mapOf("zyoxaepdkzjan", new UserAssignedIdentity(), "ytxhp", new UserAssignedIdentity(), "wtctyqi",
- new UserAssignedIdentity(), "kfplgmgsxnk", new UserAssignedIdentity())))
- .withLocation("jbhckfrlhr").withTags(mapOf("ycanuzbpzkafku", "kyv", "rnwb", "b")).withTypeName("opwi")
- .withTypeVersion("ghxpkdw")
- .withParameters(mapOf("upedeojnabckhs", "iuebbaumny", "ie", "txp", "jdhtldwkyzxu", "tfhvpesapskrdqmh",
- "svlxotogtwrup", "tkncwsc"))
- .withUpgradePolicy(
- new ApplicationUpgradePolicy().withUpgradeReplicaSetCheckTimeout("vnm").withForceRestart(true)
- .withRollingUpgradeMonitoringPolicy(
- new ArmRollingUpgradeMonitoringPolicy().withFailureAction(ArmUpgradeFailureAction.MANUAL)
- .withHealthCheckWaitDuration("o").withHealthCheckStableDuration("ilovnot")
- .withHealthCheckRetryTimeout("jfcn").withUpgradeTimeout("k").withUpgradeDomainTimeout("x"))
- .withApplicationHealthPolicy(new ArmApplicationHealthPolicy().withConsiderWarningAsError(true)
- .withMaxPercentUnhealthyDeployedApplications(657781919)
- .withDefaultServiceTypeHealthPolicy(
- new ArmServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1754671531)
- .withMaxPercentUnhealthyPartitionsPerService(1501927720)
- .withMaxPercentUnhealthyReplicasPerPartition(1284749235))
- .withServiceTypeHealthPolicyMap(mapOf("clfp",
- new ArmServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1633235296)
- .withMaxPercentUnhealthyPartitionsPerService(1979421186)
- .withMaxPercentUnhealthyReplicasPerPartition(1468269047))))
- .withUpgradeMode(RollingUpgradeMode.UNMONITORED_AUTO).withRecreateApplication(false))
- .withMinimumNodes(6303383872663340344L).withMaximumNodes(8770120849185576658L)
- .withRemoveApplicationCapacity(false)
- .withMetrics(Arrays.asList(
- new ApplicationMetricDescription().withName("sbj").withMaximumCapacity(1292231161047660234L)
- .withReservationCapacity(8913573077828001292L).withTotalApplicationCapacity(8623440575477757964L),
- new ApplicationMetricDescription().withName("ueefjzwfqkqu").withMaximumCapacity(3292485781669976103L)
- .withReservationCapacity(7570837536586623824L).withTotalApplicationCapacity(4310608753987324485L),
- new ApplicationMetricDescription().withName("laocqxtccmg").withMaximumCapacity(4531156159452032810L)
- .withReservationCapacity(6928065700546189319L).withTotalApplicationCapacity(8937450445167889405L)))
- .withManagedIdentities(
- Arrays.asList(new ApplicationUserAssignedIdentity().withName("vwfudwpzntxhd").withPrincipalId("hl")));
- model = BinaryData.fromObject(model).toObject(ApplicationResourceInner.class);
- Assertions.assertEquals(ManagedIdentityType.USER_ASSIGNED, model.identity().type());
- Assertions.assertEquals("jbhckfrlhr", model.location());
- Assertions.assertEquals("kyv", model.tags().get("ycanuzbpzkafku"));
- Assertions.assertEquals("opwi", model.typeName());
- Assertions.assertEquals("ghxpkdw", model.typeVersion());
- Assertions.assertEquals("iuebbaumny", model.parameters().get("upedeojnabckhs"));
- Assertions.assertEquals("vnm", model.upgradePolicy().upgradeReplicaSetCheckTimeout());
- Assertions.assertEquals(true, model.upgradePolicy().forceRestart());
- Assertions.assertEquals(ArmUpgradeFailureAction.MANUAL,
- model.upgradePolicy().rollingUpgradeMonitoringPolicy().failureAction());
- Assertions.assertEquals("o", model.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckWaitDuration());
- Assertions.assertEquals("ilovnot",
- model.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckStableDuration());
- Assertions.assertEquals("jfcn",
- model.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckRetryTimeout());
- Assertions.assertEquals("k", model.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeTimeout());
- Assertions.assertEquals("x", model.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeDomainTimeout());
- Assertions.assertEquals(true, model.upgradePolicy().applicationHealthPolicy().considerWarningAsError());
- Assertions.assertEquals(657781919,
- model.upgradePolicy().applicationHealthPolicy().maxPercentUnhealthyDeployedApplications());
- Assertions.assertEquals(1754671531, model.upgradePolicy().applicationHealthPolicy()
- .defaultServiceTypeHealthPolicy().maxPercentUnhealthyServices());
- Assertions.assertEquals(1501927720, model.upgradePolicy().applicationHealthPolicy()
- .defaultServiceTypeHealthPolicy().maxPercentUnhealthyPartitionsPerService());
- Assertions.assertEquals(1284749235, model.upgradePolicy().applicationHealthPolicy()
- .defaultServiceTypeHealthPolicy().maxPercentUnhealthyReplicasPerPartition());
- Assertions.assertEquals(1633235296, model.upgradePolicy().applicationHealthPolicy().serviceTypeHealthPolicyMap()
- .get("clfp").maxPercentUnhealthyServices());
- Assertions.assertEquals(1979421186, model.upgradePolicy().applicationHealthPolicy().serviceTypeHealthPolicyMap()
- .get("clfp").maxPercentUnhealthyPartitionsPerService());
- Assertions.assertEquals(1468269047, model.upgradePolicy().applicationHealthPolicy().serviceTypeHealthPolicyMap()
- .get("clfp").maxPercentUnhealthyReplicasPerPartition());
- Assertions.assertEquals(RollingUpgradeMode.UNMONITORED_AUTO, model.upgradePolicy().upgradeMode());
- Assertions.assertEquals(false, model.upgradePolicy().recreateApplication());
- Assertions.assertEquals(6303383872663340344L, model.minimumNodes());
- Assertions.assertEquals(8770120849185576658L, model.maximumNodes());
- Assertions.assertEquals(false, model.removeApplicationCapacity());
- Assertions.assertEquals("sbj", model.metrics().get(0).name());
- Assertions.assertEquals(1292231161047660234L, model.metrics().get(0).maximumCapacity());
- Assertions.assertEquals(8913573077828001292L, model.metrics().get(0).reservationCapacity());
- Assertions.assertEquals(8623440575477757964L, model.metrics().get(0).totalApplicationCapacity());
- Assertions.assertEquals("vwfudwpzntxhd", model.managedIdentities().get(0).name());
- Assertions.assertEquals("hl", model.managedIdentities().get(0).principalId());
- }
-
- // Use "Map.of" if available
- @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/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationResourceListTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationResourceListTests.java
deleted file mode 100644
index 12d3b319efc9..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationResourceListTests.java
+++ /dev/null
@@ -1,214 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.fluent.models.ApplicationResourceInner;
-import com.azure.resourcemanager.servicefabric.models.ApplicationMetricDescription;
-import com.azure.resourcemanager.servicefabric.models.ApplicationResourceList;
-import com.azure.resourcemanager.servicefabric.models.ApplicationUpgradePolicy;
-import com.azure.resourcemanager.servicefabric.models.ApplicationUserAssignedIdentity;
-import com.azure.resourcemanager.servicefabric.models.ArmApplicationHealthPolicy;
-import com.azure.resourcemanager.servicefabric.models.ArmRollingUpgradeMonitoringPolicy;
-import com.azure.resourcemanager.servicefabric.models.ArmServiceTypeHealthPolicy;
-import com.azure.resourcemanager.servicefabric.models.ArmUpgradeFailureAction;
-import com.azure.resourcemanager.servicefabric.models.ManagedIdentity;
-import com.azure.resourcemanager.servicefabric.models.ManagedIdentityType;
-import com.azure.resourcemanager.servicefabric.models.RollingUpgradeMode;
-import com.azure.resourcemanager.servicefabric.models.UserAssignedIdentity;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class ApplicationResourceListTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ApplicationResourceList model = BinaryData.fromString(
- "{\"value\":[{\"identity\":{\"principalId\":\"tiiswacffg\",\"tenantId\":\"zzewkfvhqcrai\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"nedgfbc\":{\"principalId\":\"fuflrwdmhdlx\",\"clientId\":\"rxsagafcnihgwqa\"},\"pcjwv\":{\"principalId\":\"cvqvpkeqdcv\",\"clientId\":\"hvoodsotbobzd\"}}},\"properties\":{\"provisioningState\":\"ld\",\"typeName\":\"gx\",\"typeVersion\":\"rslpmutwuoeg\",\"parameters\":{\"dggkzzlvmbmpa\":\"hjwniyqsluic\",\"yhrfouyftaakcpw\":\"modfvuefywsbpfvm\"},\"upgradePolicy\":{\"upgradeReplicaSetCheckTimeout\":\"vqtmnub\",\"forceRestart\":true,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Rollback\",\"healthCheckWaitDuration\":\"mond\",\"healthCheckStableDuration\":\"quxvypomgkop\",\"healthCheckRetryTimeout\":\"hojvpajqgxysmocm\",\"upgradeTimeout\":\"fqvm\",\"upgradeDomainTimeout\":\"xozap\"},\"applicationHealthPolicy\":{\"considerWarningAsError\":true,\"maxPercentUnhealthyDeployedApplications\":1480663750,\"defaultServiceTypeHealthPolicy\":{},\"serviceTypeHealthPolicyMap\":{\"yat\":{}}},\"upgradeMode\":\"Invalid\",\"recreateApplication\":true},\"minimumNodes\":1605920653761823709,\"maximumNodes\":7850386713816708447,\"removeApplicationCapacity\":false,\"metrics\":[{\"name\":\"qibrhosxsdqrhzoy\",\"maximumCapacity\":3759620620672585271,\"reservationCapacity\":4538636180382407268,\"totalApplicationCapacity\":5977240495404401854},{\"name\":\"wfluszdt\",\"maximumCapacity\":2447311563304363726,\"reservationCapacity\":2614637191948743156,\"totalApplicationCapacity\":5459563894986340273},{\"name\":\"qacpiex\",\"maximumCapacity\":1588065972663705215,\"reservationCapacity\":4540666018291396484,\"totalApplicationCapacity\":8211205854755134512}],\"managedIdentities\":[{\"name\":\"ashrt\",\"principalId\":\"tkcnqxwb\"},{\"name\":\"okulpiujwa\",\"principalId\":\"sipqii\"}]},\"location\":\"yuq\",\"tags\":{\"bdbutauvf\":\"qlpqwcciuq\",\"afnn\":\"tkuwhhmhykojo\"},\"etag\":\"pichkoymkcdy\",\"id\":\"pkkpw\",\"name\":\"reqnovvqfov\",\"type\":\"jxywsuws\"},{\"identity\":{\"principalId\":\"ndsytgadg\",\"tenantId\":\"aeaeneqnzarrw\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"ibwwiftohqkv\":{\"principalId\":\"fqka\",\"clientId\":\"wiipfpub\"},\"ntorzihleosjswsr\":{\"principalId\":\"vksgplsaknynfsy\",\"clientId\":\"jphuopxodlqi\"},\"zynkedya\":{\"principalId\":\"lyzrpzbchckqqzqi\",\"clientId\":\"iysui\"},\"pcdpumnz\":{\"principalId\":\"wyhqmibzyhwits\",\"clientId\":\"pyy\"}}},\"properties\":{\"provisioningState\":\"z\",\"typeName\":\"abikns\",\"typeVersion\":\"gj\",\"parameters\":{\"kdmtncvokotll\":\"ldtlwwr\",\"h\":\"d\"},\"upgradePolicy\":{\"upgradeReplicaSetCheckTimeout\":\"ocogj\",\"forceRestart\":false,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Rollback\",\"healthCheckWaitDuration\":\"hadoocrk\",\"healthCheckStableDuration\":\"ikhnvpamqgxqq\",\"healthCheckRetryTimeout\":\"zikywgg\",\"upgradeTimeout\":\"allatmelwuipic\",\"upgradeDomainTimeout\":\"zkzivgvvcnay\"},\"applicationHealthPolicy\":{\"considerWarningAsError\":true,\"maxPercentUnhealthyDeployedApplications\":1925040131,\"defaultServiceTypeHealthPolicy\":{},\"serviceTypeHealthPolicyMap\":{\"eedndrdvstkwqqtc\":{},\"ealmfmtdaaygdvwv\":{},\"piohgwxrtfu\":{}}},\"upgradeMode\":\"UnmonitoredManual\",\"recreateApplication\":false},\"minimumNodes\":8172843567981740181,\"maximumNodes\":2498438211029299669,\"removeApplicationCapacity\":true,\"metrics\":[{\"name\":\"k\",\"maximumCapacity\":8969085063650197756,\"reservationCapacity\":3507174744748509441,\"totalApplicationCapacity\":2732082136167741922},{\"name\":\"wi\",\"maximumCapacity\":4495232285451293451,\"reservationCapacity\":7729076180734759194,\"totalApplicationCapacity\":6240929679987561692},{\"name\":\"zk\",\"maximumCapacity\":7589435135200737860,\"reservationCapacity\":1171909706909522221,\"totalApplicationCapacity\":8338807266312513089},{\"name\":\"kf\",\"maximumCapacity\":6566365320530486008,\"reservationCapacity\":488040231209258224,\"totalApplicationCapacity\":2753110503115800438}],\"managedIdentities\":[{\"name\":\"elpcirelsfeaenwa\",\"principalId\":\"fatkld\"}]},\"location\":\"bjhwuaan\",\"tags\":{\"jrvxaglrv\":\"osphyoul\"},\"etag\":\"jwosytxitcskfck\",\"id\":\"umiekkezzi\",\"name\":\"hlyfjhdgqgg\",\"type\":\"bdunygaeqid\"}],\"nextLink\":\"fatpxllrxcyjmoa\"}")
- .toObject(ApplicationResourceList.class);
- Assertions.assertEquals(ManagedIdentityType.USER_ASSIGNED, model.value().get(0).identity().type());
- Assertions.assertEquals("yuq", model.value().get(0).location());
- Assertions.assertEquals("qlpqwcciuq", model.value().get(0).tags().get("bdbutauvf"));
- Assertions.assertEquals("gx", model.value().get(0).typeName());
- Assertions.assertEquals("rslpmutwuoeg", model.value().get(0).typeVersion());
- Assertions.assertEquals("hjwniyqsluic", model.value().get(0).parameters().get("dggkzzlvmbmpa"));
- Assertions.assertEquals("vqtmnub", model.value().get(0).upgradePolicy().upgradeReplicaSetCheckTimeout());
- Assertions.assertEquals(true, model.value().get(0).upgradePolicy().forceRestart());
- Assertions.assertEquals(ArmUpgradeFailureAction.ROLLBACK,
- model.value().get(0).upgradePolicy().rollingUpgradeMonitoringPolicy().failureAction());
- Assertions.assertEquals("mond",
- model.value().get(0).upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckWaitDuration());
- Assertions.assertEquals("quxvypomgkop",
- model.value().get(0).upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckStableDuration());
- Assertions.assertEquals("hojvpajqgxysmocm",
- model.value().get(0).upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckRetryTimeout());
- Assertions.assertEquals("fqvm",
- model.value().get(0).upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeTimeout());
- Assertions.assertEquals("xozap",
- model.value().get(0).upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeDomainTimeout());
- Assertions.assertEquals(true,
- model.value().get(0).upgradePolicy().applicationHealthPolicy().considerWarningAsError());
- Assertions.assertEquals(1480663750,
- model.value().get(0).upgradePolicy().applicationHealthPolicy().maxPercentUnhealthyDeployedApplications());
- Assertions.assertEquals(RollingUpgradeMode.INVALID, model.value().get(0).upgradePolicy().upgradeMode());
- Assertions.assertEquals(true, model.value().get(0).upgradePolicy().recreateApplication());
- Assertions.assertEquals(1605920653761823709L, model.value().get(0).minimumNodes());
- Assertions.assertEquals(7850386713816708447L, model.value().get(0).maximumNodes());
- Assertions.assertEquals(false, model.value().get(0).removeApplicationCapacity());
- Assertions.assertEquals("qibrhosxsdqrhzoy", model.value().get(0).metrics().get(0).name());
- Assertions.assertEquals(3759620620672585271L, model.value().get(0).metrics().get(0).maximumCapacity());
- Assertions.assertEquals(4538636180382407268L, model.value().get(0).metrics().get(0).reservationCapacity());
- Assertions.assertEquals(5977240495404401854L, model.value().get(0).metrics().get(0).totalApplicationCapacity());
- Assertions.assertEquals("ashrt", model.value().get(0).managedIdentities().get(0).name());
- Assertions.assertEquals("tkcnqxwb", model.value().get(0).managedIdentities().get(0).principalId());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ApplicationResourceList model
- = new ApplicationResourceList()
- .withValue(
- Arrays
- .asList(
- new ApplicationResourceInner()
- .withIdentity(new ManagedIdentity().withType(ManagedIdentityType.USER_ASSIGNED)
- .withUserAssignedIdentities(mapOf("nedgfbc", new UserAssignedIdentity(), "pcjwv",
- new UserAssignedIdentity())))
- .withLocation("yuq").withTags(
- mapOf("bdbutauvf", "qlpqwcciuq", "afnn", "tkuwhhmhykojo"))
- .withTypeName("gx").withTypeVersion("rslpmutwuoeg")
- .withParameters(
- mapOf("dggkzzlvmbmpa", "hjwniyqsluic", "yhrfouyftaakcpw", "modfvuefywsbpfvm"))
- .withUpgradePolicy(new ApplicationUpgradePolicy()
- .withUpgradeReplicaSetCheckTimeout("vqtmnub").withForceRestart(true)
- .withRollingUpgradeMonitoringPolicy(new ArmRollingUpgradeMonitoringPolicy()
- .withFailureAction(ArmUpgradeFailureAction.ROLLBACK)
- .withHealthCheckWaitDuration("mond")
- .withHealthCheckStableDuration("quxvypomgkop")
- .withHealthCheckRetryTimeout("hojvpajqgxysmocm").withUpgradeTimeout("fqvm")
- .withUpgradeDomainTimeout("xozap"))
- .withApplicationHealthPolicy(new ArmApplicationHealthPolicy()
- .withConsiderWarningAsError(true)
- .withMaxPercentUnhealthyDeployedApplications(1480663750)
- .withDefaultServiceTypeHealthPolicy(new ArmServiceTypeHealthPolicy())
- .withServiceTypeHealthPolicyMap(mapOf("yat", new ArmServiceTypeHealthPolicy())))
- .withUpgradeMode(RollingUpgradeMode.INVALID).withRecreateApplication(true))
- .withMinimumNodes(1605920653761823709L).withMaximumNodes(7850386713816708447L)
- .withRemoveApplicationCapacity(false)
- .withMetrics(Arrays.asList(
- new ApplicationMetricDescription().withName("qibrhosxsdqrhzoy")
- .withMaximumCapacity(3759620620672585271L)
- .withReservationCapacity(4538636180382407268L)
- .withTotalApplicationCapacity(5977240495404401854L),
- new ApplicationMetricDescription().withName("wfluszdt")
- .withMaximumCapacity(2447311563304363726L)
- .withReservationCapacity(2614637191948743156L)
- .withTotalApplicationCapacity(5459563894986340273L),
- new ApplicationMetricDescription().withName("qacpiex")
- .withMaximumCapacity(1588065972663705215L)
- .withReservationCapacity(4540666018291396484L)
- .withTotalApplicationCapacity(8211205854755134512L)))
- .withManagedIdentities(Arrays.asList(
- new ApplicationUserAssignedIdentity().withName("ashrt").withPrincipalId("tkcnqxwb"),
- new ApplicationUserAssignedIdentity().withName("okulpiujwa")
- .withPrincipalId("sipqii"))),
- new ApplicationResourceInner()
- .withIdentity(new ManagedIdentity().withType(ManagedIdentityType.SYSTEM_ASSIGNED)
- .withUserAssignedIdentities(mapOf("ibwwiftohqkv", new UserAssignedIdentity(),
- "ntorzihleosjswsr", new UserAssignedIdentity(), "zynkedya",
- new UserAssignedIdentity(), "pcdpumnz", new UserAssignedIdentity())))
- .withLocation("bjhwuaan").withTags(mapOf("jrvxaglrv", "osphyoul"))
- .withTypeName("abikns").withTypeVersion("gj")
- .withParameters(mapOf("kdmtncvokotll", "ldtlwwr", "h", "d"))
- .withUpgradePolicy(new ApplicationUpgradePolicy()
- .withUpgradeReplicaSetCheckTimeout("ocogj").withForceRestart(false)
- .withRollingUpgradeMonitoringPolicy(new ArmRollingUpgradeMonitoringPolicy()
- .withFailureAction(ArmUpgradeFailureAction.ROLLBACK)
- .withHealthCheckWaitDuration("hadoocrk")
- .withHealthCheckStableDuration("ikhnvpamqgxqq")
- .withHealthCheckRetryTimeout("zikywgg").withUpgradeTimeout("allatmelwuipic")
- .withUpgradeDomainTimeout("zkzivgvvcnay"))
- .withApplicationHealthPolicy(
- new ArmApplicationHealthPolicy().withConsiderWarningAsError(true)
- .withMaxPercentUnhealthyDeployedApplications(1925040131)
- .withDefaultServiceTypeHealthPolicy(new ArmServiceTypeHealthPolicy())
- .withServiceTypeHealthPolicyMap(
- mapOf("eedndrdvstkwqqtc", new ArmServiceTypeHealthPolicy(),
- "ealmfmtdaaygdvwv", new ArmServiceTypeHealthPolicy(), "piohgwxrtfu",
- new ArmServiceTypeHealthPolicy())))
- .withUpgradeMode(RollingUpgradeMode.UNMONITORED_MANUAL)
- .withRecreateApplication(false))
- .withMinimumNodes(8172843567981740181L).withMaximumNodes(2498438211029299669L)
- .withRemoveApplicationCapacity(true)
- .withMetrics(Arrays.asList(
- new ApplicationMetricDescription().withName("k")
- .withMaximumCapacity(8969085063650197756L)
- .withReservationCapacity(3507174744748509441L)
- .withTotalApplicationCapacity(2732082136167741922L),
- new ApplicationMetricDescription().withName("wi")
- .withMaximumCapacity(4495232285451293451L)
- .withReservationCapacity(7729076180734759194L)
- .withTotalApplicationCapacity(6240929679987561692L),
- new ApplicationMetricDescription().withName("zk")
- .withMaximumCapacity(7589435135200737860L)
- .withReservationCapacity(1171909706909522221L)
- .withTotalApplicationCapacity(8338807266312513089L),
- new ApplicationMetricDescription().withName("kf")
- .withMaximumCapacity(6566365320530486008L)
- .withReservationCapacity(488040231209258224L)
- .withTotalApplicationCapacity(2753110503115800438L)))
- .withManagedIdentities(Arrays.asList(new ApplicationUserAssignedIdentity()
- .withName("elpcirelsfeaenwa").withPrincipalId("fatkld")))));
- model = BinaryData.fromObject(model).toObject(ApplicationResourceList.class);
- Assertions.assertEquals(ManagedIdentityType.USER_ASSIGNED, model.value().get(0).identity().type());
- Assertions.assertEquals("yuq", model.value().get(0).location());
- Assertions.assertEquals("qlpqwcciuq", model.value().get(0).tags().get("bdbutauvf"));
- Assertions.assertEquals("gx", model.value().get(0).typeName());
- Assertions.assertEquals("rslpmutwuoeg", model.value().get(0).typeVersion());
- Assertions.assertEquals("hjwniyqsluic", model.value().get(0).parameters().get("dggkzzlvmbmpa"));
- Assertions.assertEquals("vqtmnub", model.value().get(0).upgradePolicy().upgradeReplicaSetCheckTimeout());
- Assertions.assertEquals(true, model.value().get(0).upgradePolicy().forceRestart());
- Assertions.assertEquals(ArmUpgradeFailureAction.ROLLBACK,
- model.value().get(0).upgradePolicy().rollingUpgradeMonitoringPolicy().failureAction());
- Assertions.assertEquals("mond",
- model.value().get(0).upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckWaitDuration());
- Assertions.assertEquals("quxvypomgkop",
- model.value().get(0).upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckStableDuration());
- Assertions.assertEquals("hojvpajqgxysmocm",
- model.value().get(0).upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckRetryTimeout());
- Assertions.assertEquals("fqvm",
- model.value().get(0).upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeTimeout());
- Assertions.assertEquals("xozap",
- model.value().get(0).upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeDomainTimeout());
- Assertions.assertEquals(true,
- model.value().get(0).upgradePolicy().applicationHealthPolicy().considerWarningAsError());
- Assertions.assertEquals(1480663750,
- model.value().get(0).upgradePolicy().applicationHealthPolicy().maxPercentUnhealthyDeployedApplications());
- Assertions.assertEquals(RollingUpgradeMode.INVALID, model.value().get(0).upgradePolicy().upgradeMode());
- Assertions.assertEquals(true, model.value().get(0).upgradePolicy().recreateApplication());
- Assertions.assertEquals(1605920653761823709L, model.value().get(0).minimumNodes());
- Assertions.assertEquals(7850386713816708447L, model.value().get(0).maximumNodes());
- Assertions.assertEquals(false, model.value().get(0).removeApplicationCapacity());
- Assertions.assertEquals("qibrhosxsdqrhzoy", model.value().get(0).metrics().get(0).name());
- Assertions.assertEquals(3759620620672585271L, model.value().get(0).metrics().get(0).maximumCapacity());
- Assertions.assertEquals(4538636180382407268L, model.value().get(0).metrics().get(0).reservationCapacity());
- Assertions.assertEquals(5977240495404401854L, model.value().get(0).metrics().get(0).totalApplicationCapacity());
- Assertions.assertEquals("ashrt", model.value().get(0).managedIdentities().get(0).name());
- Assertions.assertEquals("tkcnqxwb", model.value().get(0).managedIdentities().get(0).principalId());
- }
-
- // Use "Map.of" if available
- @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/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationResourcePropertiesTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationResourcePropertiesTests.java
deleted file mode 100644
index 40538a244961..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationResourcePropertiesTests.java
+++ /dev/null
@@ -1,162 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.fluent.models.ApplicationResourceProperties;
-import com.azure.resourcemanager.servicefabric.models.ApplicationMetricDescription;
-import com.azure.resourcemanager.servicefabric.models.ApplicationUpgradePolicy;
-import com.azure.resourcemanager.servicefabric.models.ApplicationUserAssignedIdentity;
-import com.azure.resourcemanager.servicefabric.models.ArmApplicationHealthPolicy;
-import com.azure.resourcemanager.servicefabric.models.ArmRollingUpgradeMonitoringPolicy;
-import com.azure.resourcemanager.servicefabric.models.ArmServiceTypeHealthPolicy;
-import com.azure.resourcemanager.servicefabric.models.ArmUpgradeFailureAction;
-import com.azure.resourcemanager.servicefabric.models.RollingUpgradeMode;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class ApplicationResourcePropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ApplicationResourceProperties model = BinaryData.fromString(
- "{\"provisioningState\":\"cugicjoox\",\"typeName\":\"ebwpucwwfvo\",\"typeVersion\":\"vmeueci\",\"parameters\":{\"ueiotwmcdyt\":\"zceuojgjrw\",\"it\":\"x\",\"hniskxfbkpyc\":\"nrjawgqwg\",\"l\":\"klwndnhjdauwhv\"},\"upgradePolicy\":{\"upgradeReplicaSetCheckTimeout\":\"tdhxujznbmpowuwp\",\"forceRestart\":true,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Manual\",\"healthCheckWaitDuration\":\"alupjm\",\"healthCheckStableDuration\":\"fxobbcsws\",\"healthCheckRetryTimeout\":\"jriplrbpbewtghf\",\"upgradeTimeout\":\"lcgwxzvlvqh\",\"upgradeDomainTimeout\":\"begibtnmxiebwwa\"},\"applicationHealthPolicy\":{\"considerWarningAsError\":true,\"maxPercentUnhealthyDeployedApplications\":193613480,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":1214313613,\"maxPercentUnhealthyPartitionsPerService\":1999029226,\"maxPercentUnhealthyReplicasPerPartition\":350152394},\"serviceTypeHealthPolicyMap\":{\"xongmtsavjcbpwxq\":{\"maxPercentUnhealthyServices\":580617744,\"maxPercentUnhealthyPartitionsPerService\":1773507503,\"maxPercentUnhealthyReplicasPerPartition\":957944639},\"guvriuhprwmd\":{\"maxPercentUnhealthyServices\":2036529105,\"maxPercentUnhealthyPartitionsPerService\":899256068,\"maxPercentUnhealthyReplicasPerPartition\":168456950}}},\"upgradeMode\":\"UnmonitoredManual\",\"recreateApplication\":true},\"minimumNodes\":2034996394765032908,\"maximumNodes\":1536045625796396557,\"removeApplicationCapacity\":false,\"metrics\":[{\"name\":\"exrmcqibycnojvk\",\"maximumCapacity\":35726863806871709,\"reservationCapacity\":5974438687973844921,\"totalApplicationCapacity\":2641489064592308886}],\"managedIdentities\":[{\"name\":\"pjyzhpv\",\"principalId\":\"qzcjrvxdj\"}]}")
- .toObject(ApplicationResourceProperties.class);
- Assertions.assertEquals("vmeueci", model.typeVersion());
- Assertions.assertEquals("zceuojgjrw", model.parameters().get("ueiotwmcdyt"));
- Assertions.assertEquals("tdhxujznbmpowuwp", model.upgradePolicy().upgradeReplicaSetCheckTimeout());
- Assertions.assertEquals(true, model.upgradePolicy().forceRestart());
- Assertions.assertEquals(ArmUpgradeFailureAction.MANUAL,
- model.upgradePolicy().rollingUpgradeMonitoringPolicy().failureAction());
- Assertions.assertEquals("alupjm",
- model.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckWaitDuration());
- Assertions.assertEquals("fxobbcsws",
- model.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckStableDuration());
- Assertions.assertEquals("jriplrbpbewtghf",
- model.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckRetryTimeout());
- Assertions.assertEquals("lcgwxzvlvqh", model.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeTimeout());
- Assertions.assertEquals("begibtnmxiebwwa",
- model.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeDomainTimeout());
- Assertions.assertEquals(true, model.upgradePolicy().applicationHealthPolicy().considerWarningAsError());
- Assertions.assertEquals(193613480,
- model.upgradePolicy().applicationHealthPolicy().maxPercentUnhealthyDeployedApplications());
- Assertions.assertEquals(1214313613, model.upgradePolicy().applicationHealthPolicy()
- .defaultServiceTypeHealthPolicy().maxPercentUnhealthyServices());
- Assertions.assertEquals(1999029226, model.upgradePolicy().applicationHealthPolicy()
- .defaultServiceTypeHealthPolicy().maxPercentUnhealthyPartitionsPerService());
- Assertions.assertEquals(350152394, model.upgradePolicy().applicationHealthPolicy()
- .defaultServiceTypeHealthPolicy().maxPercentUnhealthyReplicasPerPartition());
- Assertions.assertEquals(580617744, model.upgradePolicy().applicationHealthPolicy().serviceTypeHealthPolicyMap()
- .get("xongmtsavjcbpwxq").maxPercentUnhealthyServices());
- Assertions.assertEquals(1773507503, model.upgradePolicy().applicationHealthPolicy().serviceTypeHealthPolicyMap()
- .get("xongmtsavjcbpwxq").maxPercentUnhealthyPartitionsPerService());
- Assertions.assertEquals(957944639, model.upgradePolicy().applicationHealthPolicy().serviceTypeHealthPolicyMap()
- .get("xongmtsavjcbpwxq").maxPercentUnhealthyReplicasPerPartition());
- Assertions.assertEquals(RollingUpgradeMode.UNMONITORED_MANUAL, model.upgradePolicy().upgradeMode());
- Assertions.assertEquals(true, model.upgradePolicy().recreateApplication());
- Assertions.assertEquals(2034996394765032908L, model.minimumNodes());
- Assertions.assertEquals(1536045625796396557L, model.maximumNodes());
- Assertions.assertEquals(false, model.removeApplicationCapacity());
- Assertions.assertEquals("exrmcqibycnojvk", model.metrics().get(0).name());
- Assertions.assertEquals(35726863806871709L, model.metrics().get(0).maximumCapacity());
- Assertions.assertEquals(5974438687973844921L, model.metrics().get(0).reservationCapacity());
- Assertions.assertEquals(2641489064592308886L, model.metrics().get(0).totalApplicationCapacity());
- Assertions.assertEquals("pjyzhpv", model.managedIdentities().get(0).name());
- Assertions.assertEquals("qzcjrvxdj", model.managedIdentities().get(0).principalId());
- Assertions.assertEquals("ebwpucwwfvo", model.typeName());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ApplicationResourceProperties model = new ApplicationResourceProperties().withTypeVersion("vmeueci")
- .withParameters(
- mapOf("ueiotwmcdyt", "zceuojgjrw", "it", "x", "hniskxfbkpyc", "nrjawgqwg", "l", "klwndnhjdauwhv"))
- .withUpgradePolicy(new ApplicationUpgradePolicy().withUpgradeReplicaSetCheckTimeout("tdhxujznbmpowuwp")
- .withForceRestart(true)
- .withRollingUpgradeMonitoringPolicy(new ArmRollingUpgradeMonitoringPolicy()
- .withFailureAction(ArmUpgradeFailureAction.MANUAL).withHealthCheckWaitDuration("alupjm")
- .withHealthCheckStableDuration("fxobbcsws").withHealthCheckRetryTimeout("jriplrbpbewtghf")
- .withUpgradeTimeout("lcgwxzvlvqh").withUpgradeDomainTimeout("begibtnmxiebwwa"))
- .withApplicationHealthPolicy(new ArmApplicationHealthPolicy().withConsiderWarningAsError(true)
- .withMaxPercentUnhealthyDeployedApplications(193613480)
- .withDefaultServiceTypeHealthPolicy(
- new ArmServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1214313613)
- .withMaxPercentUnhealthyPartitionsPerService(1999029226)
- .withMaxPercentUnhealthyReplicasPerPartition(350152394))
- .withServiceTypeHealthPolicyMap(mapOf("xongmtsavjcbpwxq",
- new ArmServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(580617744)
- .withMaxPercentUnhealthyPartitionsPerService(1773507503)
- .withMaxPercentUnhealthyReplicasPerPartition(957944639),
- "guvriuhprwmd",
- new ArmServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(2036529105)
- .withMaxPercentUnhealthyPartitionsPerService(899256068)
- .withMaxPercentUnhealthyReplicasPerPartition(168456950))))
- .withUpgradeMode(RollingUpgradeMode.UNMONITORED_MANUAL).withRecreateApplication(true))
- .withMinimumNodes(2034996394765032908L).withMaximumNodes(1536045625796396557L)
- .withRemoveApplicationCapacity(false)
- .withMetrics(Arrays.asList(
- new ApplicationMetricDescription().withName("exrmcqibycnojvk").withMaximumCapacity(35726863806871709L)
- .withReservationCapacity(5974438687973844921L).withTotalApplicationCapacity(2641489064592308886L)))
- .withManagedIdentities(
- Arrays.asList(new ApplicationUserAssignedIdentity().withName("pjyzhpv").withPrincipalId("qzcjrvxdj")))
- .withTypeName("ebwpucwwfvo");
- model = BinaryData.fromObject(model).toObject(ApplicationResourceProperties.class);
- Assertions.assertEquals("vmeueci", model.typeVersion());
- Assertions.assertEquals("zceuojgjrw", model.parameters().get("ueiotwmcdyt"));
- Assertions.assertEquals("tdhxujznbmpowuwp", model.upgradePolicy().upgradeReplicaSetCheckTimeout());
- Assertions.assertEquals(true, model.upgradePolicy().forceRestart());
- Assertions.assertEquals(ArmUpgradeFailureAction.MANUAL,
- model.upgradePolicy().rollingUpgradeMonitoringPolicy().failureAction());
- Assertions.assertEquals("alupjm",
- model.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckWaitDuration());
- Assertions.assertEquals("fxobbcsws",
- model.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckStableDuration());
- Assertions.assertEquals("jriplrbpbewtghf",
- model.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckRetryTimeout());
- Assertions.assertEquals("lcgwxzvlvqh", model.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeTimeout());
- Assertions.assertEquals("begibtnmxiebwwa",
- model.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeDomainTimeout());
- Assertions.assertEquals(true, model.upgradePolicy().applicationHealthPolicy().considerWarningAsError());
- Assertions.assertEquals(193613480,
- model.upgradePolicy().applicationHealthPolicy().maxPercentUnhealthyDeployedApplications());
- Assertions.assertEquals(1214313613, model.upgradePolicy().applicationHealthPolicy()
- .defaultServiceTypeHealthPolicy().maxPercentUnhealthyServices());
- Assertions.assertEquals(1999029226, model.upgradePolicy().applicationHealthPolicy()
- .defaultServiceTypeHealthPolicy().maxPercentUnhealthyPartitionsPerService());
- Assertions.assertEquals(350152394, model.upgradePolicy().applicationHealthPolicy()
- .defaultServiceTypeHealthPolicy().maxPercentUnhealthyReplicasPerPartition());
- Assertions.assertEquals(580617744, model.upgradePolicy().applicationHealthPolicy().serviceTypeHealthPolicyMap()
- .get("xongmtsavjcbpwxq").maxPercentUnhealthyServices());
- Assertions.assertEquals(1773507503, model.upgradePolicy().applicationHealthPolicy().serviceTypeHealthPolicyMap()
- .get("xongmtsavjcbpwxq").maxPercentUnhealthyPartitionsPerService());
- Assertions.assertEquals(957944639, model.upgradePolicy().applicationHealthPolicy().serviceTypeHealthPolicyMap()
- .get("xongmtsavjcbpwxq").maxPercentUnhealthyReplicasPerPartition());
- Assertions.assertEquals(RollingUpgradeMode.UNMONITORED_MANUAL, model.upgradePolicy().upgradeMode());
- Assertions.assertEquals(true, model.upgradePolicy().recreateApplication());
- Assertions.assertEquals(2034996394765032908L, model.minimumNodes());
- Assertions.assertEquals(1536045625796396557L, model.maximumNodes());
- Assertions.assertEquals(false, model.removeApplicationCapacity());
- Assertions.assertEquals("exrmcqibycnojvk", model.metrics().get(0).name());
- Assertions.assertEquals(35726863806871709L, model.metrics().get(0).maximumCapacity());
- Assertions.assertEquals(5974438687973844921L, model.metrics().get(0).reservationCapacity());
- Assertions.assertEquals(2641489064592308886L, model.metrics().get(0).totalApplicationCapacity());
- Assertions.assertEquals("pjyzhpv", model.managedIdentities().get(0).name());
- Assertions.assertEquals("qzcjrvxdj", model.managedIdentities().get(0).principalId());
- Assertions.assertEquals("ebwpucwwfvo", model.typeName());
- }
-
- // Use "Map.of" if available
- @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/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationResourceUpdatePropertiesTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationResourceUpdatePropertiesTests.java
deleted file mode 100644
index 121bf8667541..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationResourceUpdatePropertiesTests.java
+++ /dev/null
@@ -1,170 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.fluent.models.ApplicationResourceUpdateProperties;
-import com.azure.resourcemanager.servicefabric.models.ApplicationMetricDescription;
-import com.azure.resourcemanager.servicefabric.models.ApplicationUpgradePolicy;
-import com.azure.resourcemanager.servicefabric.models.ApplicationUserAssignedIdentity;
-import com.azure.resourcemanager.servicefabric.models.ArmApplicationHealthPolicy;
-import com.azure.resourcemanager.servicefabric.models.ArmRollingUpgradeMonitoringPolicy;
-import com.azure.resourcemanager.servicefabric.models.ArmServiceTypeHealthPolicy;
-import com.azure.resourcemanager.servicefabric.models.ArmUpgradeFailureAction;
-import com.azure.resourcemanager.servicefabric.models.RollingUpgradeMode;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class ApplicationResourceUpdatePropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ApplicationResourceUpdateProperties model = BinaryData.fromString(
- "{\"typeVersion\":\"mwlxk\",\"parameters\":{\"n\":\"fhzovawjvzunluth\",\"pjzu\":\"rnxipei\",\"xdult\":\"e\",\"umveekgpwozuhkf\":\"kzbbtd\"},\"upgradePolicy\":{\"upgradeReplicaSetCheckTimeout\":\"jyofdxluusdtto\",\"forceRestart\":false,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Rollback\",\"healthCheckWaitDuration\":\"qvkelnsm\",\"healthCheckStableDuration\":\"xwyjsflhhc\",\"healthCheckRetryTimeout\":\"lnjixisxya\",\"upgradeTimeout\":\"oyaqcslyjpkiid\",\"upgradeDomainTimeout\":\"exznelixhnr\"},\"applicationHealthPolicy\":{\"considerWarningAsError\":false,\"maxPercentUnhealthyDeployedApplications\":434458515,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":681203122,\"maxPercentUnhealthyPartitionsPerService\":245214837,\"maxPercentUnhealthyReplicasPerPartition\":1615716441},\"serviceTypeHealthPolicyMap\":{\"tpnapnyiropuhpig\":{\"maxPercentUnhealthyServices\":703973266,\"maxPercentUnhealthyPartitionsPerService\":1181953038,\"maxPercentUnhealthyReplicasPerPartition\":1784168921},\"git\":{\"maxPercentUnhealthyServices\":2140009722,\"maxPercentUnhealthyPartitionsPerService\":882329549,\"maxPercentUnhealthyReplicasPerPartition\":2050375248},\"slynqwwnc\":{\"maxPercentUnhealthyServices\":613009021,\"maxPercentUnhealthyPartitionsPerService\":793940530,\"maxPercentUnhealthyReplicasPerPartition\":119641642},\"trmgucnapkte\":{\"maxPercentUnhealthyServices\":960001198,\"maxPercentUnhealthyPartitionsPerService\":668336306,\"maxPercentUnhealthyReplicasPerPartition\":953152084}}},\"upgradeMode\":\"UnmonitoredAuto\",\"recreateApplication\":false},\"minimumNodes\":890292148209334382,\"maximumNodes\":6017861895471041953,\"removeApplicationCapacity\":true,\"metrics\":[{\"name\":\"ac\",\"maximumCapacity\":5643404182194544806,\"reservationCapacity\":5106866103000080845,\"totalApplicationCapacity\":8003552029695467607}],\"managedIdentities\":[{\"name\":\"pppcqeqxo\",\"principalId\":\"z\"},{\"name\":\"ahzxctobgbk\",\"principalId\":\"moizpos\"}]}")
- .toObject(ApplicationResourceUpdateProperties.class);
- Assertions.assertEquals("mwlxk", model.typeVersion());
- Assertions.assertEquals("fhzovawjvzunluth", model.parameters().get("n"));
- Assertions.assertEquals("jyofdxluusdtto", model.upgradePolicy().upgradeReplicaSetCheckTimeout());
- Assertions.assertEquals(false, model.upgradePolicy().forceRestart());
- Assertions.assertEquals(ArmUpgradeFailureAction.ROLLBACK,
- model.upgradePolicy().rollingUpgradeMonitoringPolicy().failureAction());
- Assertions.assertEquals("qvkelnsm",
- model.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckWaitDuration());
- Assertions.assertEquals("xwyjsflhhc",
- model.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckStableDuration());
- Assertions.assertEquals("lnjixisxya",
- model.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckRetryTimeout());
- Assertions.assertEquals("oyaqcslyjpkiid",
- model.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeTimeout());
- Assertions.assertEquals("exznelixhnr",
- model.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeDomainTimeout());
- Assertions.assertEquals(false, model.upgradePolicy().applicationHealthPolicy().considerWarningAsError());
- Assertions.assertEquals(434458515,
- model.upgradePolicy().applicationHealthPolicy().maxPercentUnhealthyDeployedApplications());
- Assertions.assertEquals(681203122, model.upgradePolicy().applicationHealthPolicy()
- .defaultServiceTypeHealthPolicy().maxPercentUnhealthyServices());
- Assertions.assertEquals(245214837, model.upgradePolicy().applicationHealthPolicy()
- .defaultServiceTypeHealthPolicy().maxPercentUnhealthyPartitionsPerService());
- Assertions.assertEquals(1615716441, model.upgradePolicy().applicationHealthPolicy()
- .defaultServiceTypeHealthPolicy().maxPercentUnhealthyReplicasPerPartition());
- Assertions.assertEquals(703973266, model.upgradePolicy().applicationHealthPolicy().serviceTypeHealthPolicyMap()
- .get("tpnapnyiropuhpig").maxPercentUnhealthyServices());
- Assertions.assertEquals(1181953038, model.upgradePolicy().applicationHealthPolicy().serviceTypeHealthPolicyMap()
- .get("tpnapnyiropuhpig").maxPercentUnhealthyPartitionsPerService());
- Assertions.assertEquals(1784168921, model.upgradePolicy().applicationHealthPolicy().serviceTypeHealthPolicyMap()
- .get("tpnapnyiropuhpig").maxPercentUnhealthyReplicasPerPartition());
- Assertions.assertEquals(RollingUpgradeMode.UNMONITORED_AUTO, model.upgradePolicy().upgradeMode());
- Assertions.assertEquals(false, model.upgradePolicy().recreateApplication());
- Assertions.assertEquals(890292148209334382L, model.minimumNodes());
- Assertions.assertEquals(6017861895471041953L, model.maximumNodes());
- Assertions.assertEquals(true, model.removeApplicationCapacity());
- Assertions.assertEquals("ac", model.metrics().get(0).name());
- Assertions.assertEquals(5643404182194544806L, model.metrics().get(0).maximumCapacity());
- Assertions.assertEquals(5106866103000080845L, model.metrics().get(0).reservationCapacity());
- Assertions.assertEquals(8003552029695467607L, model.metrics().get(0).totalApplicationCapacity());
- Assertions.assertEquals("pppcqeqxo", model.managedIdentities().get(0).name());
- Assertions.assertEquals("z", model.managedIdentities().get(0).principalId());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ApplicationResourceUpdateProperties model = new ApplicationResourceUpdateProperties().withTypeVersion("mwlxk")
- .withParameters(
- mapOf("n", "fhzovawjvzunluth", "pjzu", "rnxipei", "xdult", "e", "umveekgpwozuhkf", "kzbbtd"))
- .withUpgradePolicy(new ApplicationUpgradePolicy().withUpgradeReplicaSetCheckTimeout("jyofdxluusdtto")
- .withForceRestart(false)
- .withRollingUpgradeMonitoringPolicy(new ArmRollingUpgradeMonitoringPolicy()
- .withFailureAction(ArmUpgradeFailureAction.ROLLBACK).withHealthCheckWaitDuration("qvkelnsm")
- .withHealthCheckStableDuration("xwyjsflhhc").withHealthCheckRetryTimeout("lnjixisxya")
- .withUpgradeTimeout("oyaqcslyjpkiid").withUpgradeDomainTimeout("exznelixhnr"))
- .withApplicationHealthPolicy(new ArmApplicationHealthPolicy().withConsiderWarningAsError(false)
- .withMaxPercentUnhealthyDeployedApplications(434458515)
- .withDefaultServiceTypeHealthPolicy(
- new ArmServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(681203122)
- .withMaxPercentUnhealthyPartitionsPerService(245214837)
- .withMaxPercentUnhealthyReplicasPerPartition(1615716441))
- .withServiceTypeHealthPolicyMap(mapOf("tpnapnyiropuhpig",
- new ArmServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(703973266)
- .withMaxPercentUnhealthyPartitionsPerService(1181953038)
- .withMaxPercentUnhealthyReplicasPerPartition(1784168921),
- "git",
- new ArmServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(2140009722)
- .withMaxPercentUnhealthyPartitionsPerService(882329549)
- .withMaxPercentUnhealthyReplicasPerPartition(2050375248),
- "slynqwwnc",
- new ArmServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(613009021)
- .withMaxPercentUnhealthyPartitionsPerService(793940530)
- .withMaxPercentUnhealthyReplicasPerPartition(119641642),
- "trmgucnapkte",
- new ArmServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(960001198)
- .withMaxPercentUnhealthyPartitionsPerService(668336306)
- .withMaxPercentUnhealthyReplicasPerPartition(953152084))))
- .withUpgradeMode(RollingUpgradeMode.UNMONITORED_AUTO).withRecreateApplication(false))
- .withMinimumNodes(890292148209334382L).withMaximumNodes(6017861895471041953L)
- .withRemoveApplicationCapacity(true)
- .withMetrics(Arrays
- .asList(new ApplicationMetricDescription().withName("ac").withMaximumCapacity(5643404182194544806L)
- .withReservationCapacity(5106866103000080845L).withTotalApplicationCapacity(8003552029695467607L)))
- .withManagedIdentities(
- Arrays.asList(new ApplicationUserAssignedIdentity().withName("pppcqeqxo").withPrincipalId("z"),
- new ApplicationUserAssignedIdentity().withName("ahzxctobgbk").withPrincipalId("moizpos")));
- model = BinaryData.fromObject(model).toObject(ApplicationResourceUpdateProperties.class);
- Assertions.assertEquals("mwlxk", model.typeVersion());
- Assertions.assertEquals("fhzovawjvzunluth", model.parameters().get("n"));
- Assertions.assertEquals("jyofdxluusdtto", model.upgradePolicy().upgradeReplicaSetCheckTimeout());
- Assertions.assertEquals(false, model.upgradePolicy().forceRestart());
- Assertions.assertEquals(ArmUpgradeFailureAction.ROLLBACK,
- model.upgradePolicy().rollingUpgradeMonitoringPolicy().failureAction());
- Assertions.assertEquals("qvkelnsm",
- model.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckWaitDuration());
- Assertions.assertEquals("xwyjsflhhc",
- model.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckStableDuration());
- Assertions.assertEquals("lnjixisxya",
- model.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckRetryTimeout());
- Assertions.assertEquals("oyaqcslyjpkiid",
- model.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeTimeout());
- Assertions.assertEquals("exznelixhnr",
- model.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeDomainTimeout());
- Assertions.assertEquals(false, model.upgradePolicy().applicationHealthPolicy().considerWarningAsError());
- Assertions.assertEquals(434458515,
- model.upgradePolicy().applicationHealthPolicy().maxPercentUnhealthyDeployedApplications());
- Assertions.assertEquals(681203122, model.upgradePolicy().applicationHealthPolicy()
- .defaultServiceTypeHealthPolicy().maxPercentUnhealthyServices());
- Assertions.assertEquals(245214837, model.upgradePolicy().applicationHealthPolicy()
- .defaultServiceTypeHealthPolicy().maxPercentUnhealthyPartitionsPerService());
- Assertions.assertEquals(1615716441, model.upgradePolicy().applicationHealthPolicy()
- .defaultServiceTypeHealthPolicy().maxPercentUnhealthyReplicasPerPartition());
- Assertions.assertEquals(703973266, model.upgradePolicy().applicationHealthPolicy().serviceTypeHealthPolicyMap()
- .get("tpnapnyiropuhpig").maxPercentUnhealthyServices());
- Assertions.assertEquals(1181953038, model.upgradePolicy().applicationHealthPolicy().serviceTypeHealthPolicyMap()
- .get("tpnapnyiropuhpig").maxPercentUnhealthyPartitionsPerService());
- Assertions.assertEquals(1784168921, model.upgradePolicy().applicationHealthPolicy().serviceTypeHealthPolicyMap()
- .get("tpnapnyiropuhpig").maxPercentUnhealthyReplicasPerPartition());
- Assertions.assertEquals(RollingUpgradeMode.UNMONITORED_AUTO, model.upgradePolicy().upgradeMode());
- Assertions.assertEquals(false, model.upgradePolicy().recreateApplication());
- Assertions.assertEquals(890292148209334382L, model.minimumNodes());
- Assertions.assertEquals(6017861895471041953L, model.maximumNodes());
- Assertions.assertEquals(true, model.removeApplicationCapacity());
- Assertions.assertEquals("ac", model.metrics().get(0).name());
- Assertions.assertEquals(5643404182194544806L, model.metrics().get(0).maximumCapacity());
- Assertions.assertEquals(5106866103000080845L, model.metrics().get(0).reservationCapacity());
- Assertions.assertEquals(8003552029695467607L, model.metrics().get(0).totalApplicationCapacity());
- Assertions.assertEquals("pppcqeqxo", model.managedIdentities().get(0).name());
- Assertions.assertEquals("z", model.managedIdentities().get(0).principalId());
- }
-
- // Use "Map.of" if available
- @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/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationResourceUpdateTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationResourceUpdateTests.java
deleted file mode 100644
index 18ee14a51e31..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationResourceUpdateTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.ApplicationMetricDescription;
-import com.azure.resourcemanager.servicefabric.models.ApplicationResourceUpdate;
-import com.azure.resourcemanager.servicefabric.models.ApplicationUpgradePolicy;
-import com.azure.resourcemanager.servicefabric.models.ApplicationUserAssignedIdentity;
-import com.azure.resourcemanager.servicefabric.models.ArmApplicationHealthPolicy;
-import com.azure.resourcemanager.servicefabric.models.ArmRollingUpgradeMonitoringPolicy;
-import com.azure.resourcemanager.servicefabric.models.ArmServiceTypeHealthPolicy;
-import com.azure.resourcemanager.servicefabric.models.ArmUpgradeFailureAction;
-import com.azure.resourcemanager.servicefabric.models.RollingUpgradeMode;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class ApplicationResourceUpdateTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ApplicationResourceUpdate model = BinaryData.fromString(
- "{\"properties\":{\"typeVersion\":\"cym\",\"parameters\":{\"ssl\":\"l\",\"d\":\"lfmmdnbbglzpswi\",\"bzmnvdfznud\":\"cwyhzdxssa\"},\"upgradePolicy\":{\"upgradeReplicaSetCheckTimeout\":\"vxzbncb\",\"forceRestart\":true,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Manual\",\"healthCheckWaitDuration\":\"bhhxsrzdzuc\",\"healthCheckStableDuration\":\"scdntnevf\",\"healthCheckRetryTimeout\":\"jmygtdsslswtmwer\",\"upgradeTimeout\":\"fzp\",\"upgradeDomainTimeout\":\"semwabnet\"},\"applicationHealthPolicy\":{\"considerWarningAsError\":true,\"maxPercentUnhealthyDeployedApplications\":199039203,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":1422875618,\"maxPercentUnhealthyPartitionsPerService\":1522056639,\"maxPercentUnhealthyReplicasPerPartition\":1384508080},\"serviceTypeHealthPolicyMap\":{\"sldnkwwtppjflcxo\":{\"maxPercentUnhealthyServices\":1386333367,\"maxPercentUnhealthyPartitionsPerService\":1072723853,\"maxPercentUnhealthyReplicasPerPartition\":720725723},\"m\":{\"maxPercentUnhealthyServices\":1632551729,\"maxPercentUnhealthyPartitionsPerService\":584568005,\"maxPercentUnhealthyReplicasPerPartition\":204366319},\"qzeqqkdltfzxm\":{\"maxPercentUnhealthyServices\":696489313,\"maxPercentUnhealthyPartitionsPerService\":1995245792,\"maxPercentUnhealthyReplicasPerPartition\":1013346228}}},\"upgradeMode\":\"Invalid\",\"recreateApplication\":true},\"minimumNodes\":290569327537915175,\"maximumNodes\":820800207830190162,\"removeApplicationCapacity\":true,\"metrics\":[{\"name\":\"gxtibqdxbxw\",\"maximumCapacity\":5943284282565637663,\"reservationCapacity\":2666849186413454157,\"totalApplicationCapacity\":1899793527406427487},{\"name\":\"zgx\",\"maximumCapacity\":4187834271496207519,\"reservationCapacity\":822687425279743867,\"totalApplicationCapacity\":5090164062241027652},{\"name\":\"unkbebx\",\"maximumCapacity\":3111756742771823054,\"reservationCapacity\":4511639893659034587,\"totalApplicationCapacity\":3360934059996911895}],\"managedIdentities\":[{\"name\":\"tkoievseotgq\",\"principalId\":\"l\"},{\"name\":\"tmuwlauwzi\",\"principalId\":\"xbmp\"}]},\"location\":\"jefuzmuvpbttdumo\",\"tags\":{\"mnzb\":\"xe\",\"el\":\"bhjpglkfgohdne\",\"fikdowwqu\":\"phsdyhto\"},\"etag\":\"xzxcl\",\"id\":\"thhqzonosggbh\",\"name\":\"ohfwds\",\"type\":\"n\"}")
- .toObject(ApplicationResourceUpdate.class);
- Assertions.assertEquals("jefuzmuvpbttdumo", model.location());
- Assertions.assertEquals("xe", model.tags().get("mnzb"));
- Assertions.assertEquals("cym", model.typeVersion());
- Assertions.assertEquals("l", model.parameters().get("ssl"));
- Assertions.assertEquals("vxzbncb", model.upgradePolicy().upgradeReplicaSetCheckTimeout());
- Assertions.assertEquals(true, model.upgradePolicy().forceRestart());
- Assertions.assertEquals(ArmUpgradeFailureAction.MANUAL,
- model.upgradePolicy().rollingUpgradeMonitoringPolicy().failureAction());
- Assertions.assertEquals("bhhxsrzdzuc",
- model.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckWaitDuration());
- Assertions.assertEquals("scdntnevf",
- model.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckStableDuration());
- Assertions.assertEquals("jmygtdsslswtmwer",
- model.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckRetryTimeout());
- Assertions.assertEquals("fzp", model.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeTimeout());
- Assertions.assertEquals("semwabnet",
- model.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeDomainTimeout());
- Assertions.assertEquals(true, model.upgradePolicy().applicationHealthPolicy().considerWarningAsError());
- Assertions.assertEquals(199039203,
- model.upgradePolicy().applicationHealthPolicy().maxPercentUnhealthyDeployedApplications());
- Assertions.assertEquals(1422875618, model.upgradePolicy().applicationHealthPolicy()
- .defaultServiceTypeHealthPolicy().maxPercentUnhealthyServices());
- Assertions.assertEquals(1522056639, model.upgradePolicy().applicationHealthPolicy()
- .defaultServiceTypeHealthPolicy().maxPercentUnhealthyPartitionsPerService());
- Assertions.assertEquals(1384508080, model.upgradePolicy().applicationHealthPolicy()
- .defaultServiceTypeHealthPolicy().maxPercentUnhealthyReplicasPerPartition());
- Assertions.assertEquals(1386333367, model.upgradePolicy().applicationHealthPolicy().serviceTypeHealthPolicyMap()
- .get("sldnkwwtppjflcxo").maxPercentUnhealthyServices());
- Assertions.assertEquals(1072723853, model.upgradePolicy().applicationHealthPolicy().serviceTypeHealthPolicyMap()
- .get("sldnkwwtppjflcxo").maxPercentUnhealthyPartitionsPerService());
- Assertions.assertEquals(720725723, model.upgradePolicy().applicationHealthPolicy().serviceTypeHealthPolicyMap()
- .get("sldnkwwtppjflcxo").maxPercentUnhealthyReplicasPerPartition());
- Assertions.assertEquals(RollingUpgradeMode.INVALID, model.upgradePolicy().upgradeMode());
- Assertions.assertEquals(true, model.upgradePolicy().recreateApplication());
- Assertions.assertEquals(290569327537915175L, model.minimumNodes());
- Assertions.assertEquals(820800207830190162L, model.maximumNodes());
- Assertions.assertEquals(true, model.removeApplicationCapacity());
- Assertions.assertEquals("gxtibqdxbxw", model.metrics().get(0).name());
- Assertions.assertEquals(5943284282565637663L, model.metrics().get(0).maximumCapacity());
- Assertions.assertEquals(2666849186413454157L, model.metrics().get(0).reservationCapacity());
- Assertions.assertEquals(1899793527406427487L, model.metrics().get(0).totalApplicationCapacity());
- Assertions.assertEquals("tkoievseotgq", model.managedIdentities().get(0).name());
- Assertions.assertEquals("l", model.managedIdentities().get(0).principalId());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ApplicationResourceUpdate model
- = new ApplicationResourceUpdate().withLocation("jefuzmuvpbttdumo")
- .withTags(mapOf("mnzb", "xe", "el", "bhjpglkfgohdne", "fikdowwqu", "phsdyhto")).withTypeVersion("cym")
- .withParameters(
- mapOf("ssl", "l", "d", "lfmmdnbbglzpswi", "bzmnvdfznud", "cwyhzdxssa"))
- .withUpgradePolicy(
- new ApplicationUpgradePolicy().withUpgradeReplicaSetCheckTimeout("vxzbncb").withForceRestart(true)
- .withRollingUpgradeMonitoringPolicy(
- new ArmRollingUpgradeMonitoringPolicy().withFailureAction(ArmUpgradeFailureAction.MANUAL)
- .withHealthCheckWaitDuration("bhhxsrzdzuc").withHealthCheckStableDuration("scdntnevf")
- .withHealthCheckRetryTimeout("jmygtdsslswtmwer").withUpgradeTimeout("fzp")
- .withUpgradeDomainTimeout("semwabnet"))
- .withApplicationHealthPolicy(new ArmApplicationHealthPolicy().withConsiderWarningAsError(true)
- .withMaxPercentUnhealthyDeployedApplications(199039203)
- .withDefaultServiceTypeHealthPolicy(
- new ArmServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1422875618)
- .withMaxPercentUnhealthyPartitionsPerService(1522056639)
- .withMaxPercentUnhealthyReplicasPerPartition(1384508080))
- .withServiceTypeHealthPolicyMap(mapOf("sldnkwwtppjflcxo",
- new ArmServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1386333367)
- .withMaxPercentUnhealthyPartitionsPerService(1072723853)
- .withMaxPercentUnhealthyReplicasPerPartition(720725723),
- "m",
- new ArmServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1632551729)
- .withMaxPercentUnhealthyPartitionsPerService(584568005)
- .withMaxPercentUnhealthyReplicasPerPartition(204366319),
- "qzeqqkdltfzxm",
- new ArmServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(696489313)
- .withMaxPercentUnhealthyPartitionsPerService(1995245792)
- .withMaxPercentUnhealthyReplicasPerPartition(1013346228))))
- .withUpgradeMode(RollingUpgradeMode.INVALID).withRecreateApplication(true))
- .withMinimumNodes(290569327537915175L).withMaximumNodes(820800207830190162L)
- .withRemoveApplicationCapacity(true)
- .withMetrics(Arrays.asList(
- new ApplicationMetricDescription().withName("gxtibqdxbxw").withMaximumCapacity(5943284282565637663L)
- .withReservationCapacity(2666849186413454157L)
- .withTotalApplicationCapacity(1899793527406427487L),
- new ApplicationMetricDescription().withName("zgx").withMaximumCapacity(4187834271496207519L)
- .withReservationCapacity(822687425279743867L)
- .withTotalApplicationCapacity(5090164062241027652L),
- new ApplicationMetricDescription().withName("unkbebx").withMaximumCapacity(3111756742771823054L)
- .withReservationCapacity(4511639893659034587L)
- .withTotalApplicationCapacity(3360934059996911895L)))
- .withManagedIdentities(
- Arrays.asList(new ApplicationUserAssignedIdentity().withName("tkoievseotgq").withPrincipalId("l"),
- new ApplicationUserAssignedIdentity().withName("tmuwlauwzi").withPrincipalId("xbmp")));
- model = BinaryData.fromObject(model).toObject(ApplicationResourceUpdate.class);
- Assertions.assertEquals("jefuzmuvpbttdumo", model.location());
- Assertions.assertEquals("xe", model.tags().get("mnzb"));
- Assertions.assertEquals("cym", model.typeVersion());
- Assertions.assertEquals("l", model.parameters().get("ssl"));
- Assertions.assertEquals("vxzbncb", model.upgradePolicy().upgradeReplicaSetCheckTimeout());
- Assertions.assertEquals(true, model.upgradePolicy().forceRestart());
- Assertions.assertEquals(ArmUpgradeFailureAction.MANUAL,
- model.upgradePolicy().rollingUpgradeMonitoringPolicy().failureAction());
- Assertions.assertEquals("bhhxsrzdzuc",
- model.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckWaitDuration());
- Assertions.assertEquals("scdntnevf",
- model.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckStableDuration());
- Assertions.assertEquals("jmygtdsslswtmwer",
- model.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckRetryTimeout());
- Assertions.assertEquals("fzp", model.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeTimeout());
- Assertions.assertEquals("semwabnet",
- model.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeDomainTimeout());
- Assertions.assertEquals(true, model.upgradePolicy().applicationHealthPolicy().considerWarningAsError());
- Assertions.assertEquals(199039203,
- model.upgradePolicy().applicationHealthPolicy().maxPercentUnhealthyDeployedApplications());
- Assertions.assertEquals(1422875618, model.upgradePolicy().applicationHealthPolicy()
- .defaultServiceTypeHealthPolicy().maxPercentUnhealthyServices());
- Assertions.assertEquals(1522056639, model.upgradePolicy().applicationHealthPolicy()
- .defaultServiceTypeHealthPolicy().maxPercentUnhealthyPartitionsPerService());
- Assertions.assertEquals(1384508080, model.upgradePolicy().applicationHealthPolicy()
- .defaultServiceTypeHealthPolicy().maxPercentUnhealthyReplicasPerPartition());
- Assertions.assertEquals(1386333367, model.upgradePolicy().applicationHealthPolicy().serviceTypeHealthPolicyMap()
- .get("sldnkwwtppjflcxo").maxPercentUnhealthyServices());
- Assertions.assertEquals(1072723853, model.upgradePolicy().applicationHealthPolicy().serviceTypeHealthPolicyMap()
- .get("sldnkwwtppjflcxo").maxPercentUnhealthyPartitionsPerService());
- Assertions.assertEquals(720725723, model.upgradePolicy().applicationHealthPolicy().serviceTypeHealthPolicyMap()
- .get("sldnkwwtppjflcxo").maxPercentUnhealthyReplicasPerPartition());
- Assertions.assertEquals(RollingUpgradeMode.INVALID, model.upgradePolicy().upgradeMode());
- Assertions.assertEquals(true, model.upgradePolicy().recreateApplication());
- Assertions.assertEquals(290569327537915175L, model.minimumNodes());
- Assertions.assertEquals(820800207830190162L, model.maximumNodes());
- Assertions.assertEquals(true, model.removeApplicationCapacity());
- Assertions.assertEquals("gxtibqdxbxw", model.metrics().get(0).name());
- Assertions.assertEquals(5943284282565637663L, model.metrics().get(0).maximumCapacity());
- Assertions.assertEquals(2666849186413454157L, model.metrics().get(0).reservationCapacity());
- Assertions.assertEquals(1899793527406427487L, model.metrics().get(0).totalApplicationCapacity());
- Assertions.assertEquals("tkoievseotgq", model.managedIdentities().get(0).name());
- Assertions.assertEquals("l", model.managedIdentities().get(0).principalId());
- }
-
- // Use "Map.of" if available
- @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/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypeResourceInnerTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypeResourceInnerTests.java
deleted file mode 100644
index 6afba4d22806..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypeResourceInnerTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.fluent.models.ApplicationTypeResourceInner;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class ApplicationTypeResourceInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ApplicationTypeResourceInner model = BinaryData.fromString(
- "{\"properties\":{\"provisioningState\":\"dfgiot\"},\"location\":\"tutqxlngxlefgug\",\"tags\":{\"i\":\"rxdq\"},\"etag\":\"thz\",\"id\":\"qdrabhjybigehoqf\",\"name\":\"owskanyktz\",\"type\":\"cuiywgqyw\"}")
- .toObject(ApplicationTypeResourceInner.class);
- Assertions.assertEquals("tutqxlngxlefgug", model.location());
- Assertions.assertEquals("rxdq", model.tags().get("i"));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ApplicationTypeResourceInner model
- = new ApplicationTypeResourceInner().withLocation("tutqxlngxlefgug").withTags(mapOf("i", "rxdq"));
- model = BinaryData.fromObject(model).toObject(ApplicationTypeResourceInner.class);
- Assertions.assertEquals("tutqxlngxlefgug", model.location());
- Assertions.assertEquals("rxdq", model.tags().get("i"));
- }
-
- // Use "Map.of" if available
- @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/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypeResourceListTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypeResourceListTests.java
deleted file mode 100644
index 857ca546a73e..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypeResourceListTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.fluent.models.ApplicationTypeResourceInner;
-import com.azure.resourcemanager.servicefabric.models.ApplicationTypeResourceList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class ApplicationTypeResourceListTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ApplicationTypeResourceList model = BinaryData.fromString(
- "{\"value\":[{\"properties\":{\"provisioningState\":\"hrc\"},\"location\":\"nc\",\"tags\":{\"oo\":\"ecfvmm\"},\"etag\":\"xlzevgbmqjqabcy\",\"id\":\"ivkwlzuvccfwnfnb\",\"name\":\"cfionl\",\"type\":\"bxetqgtzxdpn\"},{\"properties\":{\"provisioningState\":\"qwxrjfeallnw\"},\"location\":\"bisnja\",\"tags\":{\"onq\":\"ngnzscxaqwoochc\",\"ea\":\"pkvlrxn\",\"enjbdlwtgrhp\":\"eipheoflokeyy\"},\"etag\":\"pj\",\"id\":\"asxazjpqyegualhb\",\"name\":\"xhejjzzvdud\",\"type\":\"wdslfhotwmcy\"},{\"properties\":{\"provisioningState\":\"lbjnpgacftadehx\"},\"location\":\"tyfsoppusuesn\",\"tags\":{\"avo\":\"ej\",\"vudwx\":\"xzdmohctb\"},\"etag\":\"dnvowg\",\"id\":\"jugwdkcglhsl\",\"name\":\"zj\",\"type\":\"yggdtjixh\"}],\"nextLink\":\"uofqwe\"}")
- .toObject(ApplicationTypeResourceList.class);
- Assertions.assertEquals("nc", model.value().get(0).location());
- Assertions.assertEquals("ecfvmm", model.value().get(0).tags().get("oo"));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ApplicationTypeResourceList model = new ApplicationTypeResourceList().withValue(
- Arrays.asList(new ApplicationTypeResourceInner().withLocation("nc").withTags(mapOf("oo", "ecfvmm")),
- new ApplicationTypeResourceInner().withLocation("bisnja")
- .withTags(mapOf("onq", "ngnzscxaqwoochc", "ea", "pkvlrxn", "enjbdlwtgrhp", "eipheoflokeyy")),
- new ApplicationTypeResourceInner().withLocation("tyfsoppusuesn")
- .withTags(mapOf("avo", "ej", "vudwx", "xzdmohctb"))));
- model = BinaryData.fromObject(model).toObject(ApplicationTypeResourceList.class);
- Assertions.assertEquals("nc", model.value().get(0).location());
- Assertions.assertEquals("ecfvmm", model.value().get(0).tags().get("oo"));
- }
-
- // Use "Map.of" if available
- @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/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypeResourcePropertiesTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypeResourcePropertiesTests.java
deleted file mode 100644
index 150d4af8781d..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypeResourcePropertiesTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.fluent.models.ApplicationTypeResourceProperties;
-
-public final class ApplicationTypeResourcePropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ApplicationTypeResourceProperties model = BinaryData.fromString("{\"provisioningState\":\"drvyn\"}")
- .toObject(ApplicationTypeResourceProperties.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ApplicationTypeResourceProperties model = new ApplicationTypeResourceProperties();
- model = BinaryData.fromObject(model).toObject(ApplicationTypeResourceProperties.class);
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypeVersionResourceInnerTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypeVersionResourceInnerTests.java
deleted file mode 100644
index 60442be7c0d8..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypeVersionResourceInnerTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.fluent.models.ApplicationTypeVersionResourceInner;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class ApplicationTypeVersionResourceInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ApplicationTypeVersionResourceInner model = BinaryData.fromString(
- "{\"properties\":{\"provisioningState\":\"menevfyexfwh\",\"appPackageUrl\":\"bcibvyvdcsitynn\",\"defaultParameterList\":{\"eypvhezrkg\":\"dectehfiqsc\",\"sle\":\"hcjrefovgmk\",\"cattpngjcrcczsq\":\"yvxyqjp\",\"mdajv\":\"jh\"}},\"location\":\"sounqecanoaeu\",\"tags\":{\"tuo\":\"yhltrpmopjmcm\"},\"etag\":\"hfuiuaodsfc\",\"id\":\"vxodpu\",\"name\":\"zmyzydagf\",\"type\":\"axbezyiuo\"}")
- .toObject(ApplicationTypeVersionResourceInner.class);
- Assertions.assertEquals("sounqecanoaeu", model.location());
- Assertions.assertEquals("yhltrpmopjmcm", model.tags().get("tuo"));
- Assertions.assertEquals("bcibvyvdcsitynn", model.appPackageUrl());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ApplicationTypeVersionResourceInner model = new ApplicationTypeVersionResourceInner()
- .withLocation("sounqecanoaeu").withTags(mapOf("tuo", "yhltrpmopjmcm")).withAppPackageUrl("bcibvyvdcsitynn");
- model = BinaryData.fromObject(model).toObject(ApplicationTypeVersionResourceInner.class);
- Assertions.assertEquals("sounqecanoaeu", model.location());
- Assertions.assertEquals("yhltrpmopjmcm", model.tags().get("tuo"));
- Assertions.assertEquals("bcibvyvdcsitynn", model.appPackageUrl());
- }
-
- // Use "Map.of" if available
- @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/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypeVersionResourceListTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypeVersionResourceListTests.java
deleted file mode 100644
index 283989632fe6..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypeVersionResourceListTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.fluent.models.ApplicationTypeVersionResourceInner;
-import com.azure.resourcemanager.servicefabric.models.ApplicationTypeVersionResourceList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class ApplicationTypeVersionResourceListTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ApplicationTypeVersionResourceList model = BinaryData.fromString(
- "{\"value\":[{\"properties\":{\"provisioningState\":\"nbpoczvyifqrvkdv\",\"appPackageUrl\":\"sllr\",\"defaultParameterList\":{\"watkpnpulexxb\":\"d\",\"yokacspkw\":\"zwtruwiqzbqjvsov\",\"rkcciwwzjuqk\":\"hzdobpxjmflbvvnc\"}},\"location\":\"sa\",\"tags\":{\"foskghsauuimj\":\"ku\",\"rfbyaosvexcso\":\"vxieduugidyj\",\"vleggzfbuhfmvfax\":\"pclhocohslk\",\"hl\":\"ffeii\"},\"etag\":\"ez\",\"id\":\"shxmzsbbzoggigrx\",\"name\":\"burvjxxjnspy\",\"type\":\"ptkoenkoukn\"},{\"properties\":{\"provisioningState\":\"wtiukbldn\",\"appPackageUrl\":\"kpoc\",\"defaultParameterList\":{\"xoegukgjnpiucgy\":\"z\",\"zcdrqjsdpydnfyhx\":\"evqzntypmrbp\",\"ifsjttgzfbishcb\":\"eoejzic\"}},\"location\":\"ajdeyeamdphaga\",\"tags\":{\"ow\":\"uxwgipwho\",\"injep\":\"gshwankixz\"},\"etag\":\"tmryw\",\"id\":\"zoqftiyqzrnkcqvy\",\"name\":\"lwh\",\"type\":\"lsicohoqqnwv\"},{\"properties\":{\"provisioningState\":\"avwhheunm\",\"appPackageUrl\":\"qhgyxzkonocukok\",\"defaultParameterList\":{\"szfkbe\":\"xuconu\",\"jmwvvj\":\"pewr\"}},\"location\":\"tcxsenhwlrs\",\"tags\":{\"qdqgbi\":\"zpwv\",\"fcivfsnkym\":\"ylihkaetckt\",\"jf\":\"ctq\",\"fuwutttxf\":\"ebrjcxe\"},\"etag\":\"rbirphxe\",\"id\":\"yva\",\"name\":\"fnljky\",\"type\":\"xjvuujqgidokg\"},{\"properties\":{\"provisioningState\":\"yoxgvcltbgsnc\",\"appPackageUrl\":\"hkjeszzhbi\",\"defaultParameterList\":{\"mpvecxgodebfqk\":\"xfvgxbfsmxne\",\"flz\":\"rbmpukgri\"}},\"location\":\"bxzpuzycisp\",\"tags\":{\"y\":\"ahmgkbrp\",\"rgvtqag\":\"hibnuqqkpika\",\"bfs\":\"buynhijggm\",\"rcvpnazzmhjrunmp\":\"arbu\"},\"etag\":\"tdbhrbnla\",\"id\":\"xmyskp\",\"name\":\"henbtkcxywnytn\",\"type\":\"synlqidybyxczfc\"}],\"nextLink\":\"aaxdbabphlwrq\"}")
- .toObject(ApplicationTypeVersionResourceList.class);
- Assertions.assertEquals("sa", model.value().get(0).location());
- Assertions.assertEquals("ku", model.value().get(0).tags().get("foskghsauuimj"));
- Assertions.assertEquals("sllr", model.value().get(0).appPackageUrl());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ApplicationTypeVersionResourceList model = new ApplicationTypeVersionResourceList().withValue(Arrays.asList(
- new ApplicationTypeVersionResourceInner().withLocation("sa")
- .withTags(mapOf("foskghsauuimj", "ku", "rfbyaosvexcso", "vxieduugidyj", "vleggzfbuhfmvfax",
- "pclhocohslk", "hl", "ffeii"))
- .withAppPackageUrl("sllr"),
- new ApplicationTypeVersionResourceInner().withLocation("ajdeyeamdphaga")
- .withTags(mapOf("ow", "uxwgipwho", "injep", "gshwankixz")).withAppPackageUrl("kpoc"),
- new ApplicationTypeVersionResourceInner().withLocation("tcxsenhwlrs")
- .withTags(mapOf("qdqgbi", "zpwv", "fcivfsnkym", "ylihkaetckt", "jf", "ctq", "fuwutttxf", "ebrjcxe"))
- .withAppPackageUrl("qhgyxzkonocukok"),
- new ApplicationTypeVersionResourceInner().withLocation("bxzpuzycisp")
- .withTags(
- mapOf("y", "ahmgkbrp", "rgvtqag", "hibnuqqkpika", "bfs", "buynhijggm", "rcvpnazzmhjrunmp", "arbu"))
- .withAppPackageUrl("hkjeszzhbi")));
- model = BinaryData.fromObject(model).toObject(ApplicationTypeVersionResourceList.class);
- Assertions.assertEquals("sa", model.value().get(0).location());
- Assertions.assertEquals("ku", model.value().get(0).tags().get("foskghsauuimj"));
- Assertions.assertEquals("sllr", model.value().get(0).appPackageUrl());
- }
-
- // Use "Map.of" if available
- @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/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypeVersionResourcePropertiesTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypeVersionResourcePropertiesTests.java
deleted file mode 100644
index 373b2ad4c54e..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypeVersionResourcePropertiesTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.fluent.models.ApplicationTypeVersionResourceProperties;
-import org.junit.jupiter.api.Assertions;
-
-public final class ApplicationTypeVersionResourcePropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ApplicationTypeVersionResourceProperties model = BinaryData.fromString(
- "{\"provisioningState\":\"twhrdxwzywqsm\",\"appPackageUrl\":\"surex\",\"defaultParameterList\":{\"stkiiuxhqyud\":\"ryocfsfksymdd\"}}")
- .toObject(ApplicationTypeVersionResourceProperties.class);
- Assertions.assertEquals("surex", model.appPackageUrl());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ApplicationTypeVersionResourceProperties model
- = new ApplicationTypeVersionResourceProperties().withAppPackageUrl("surex");
- model = BinaryData.fromObject(model).toObject(ApplicationTypeVersionResourceProperties.class);
- Assertions.assertEquals("surex", model.appPackageUrl());
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypeVersionsCleanupPolicyTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypeVersionsCleanupPolicyTests.java
deleted file mode 100644
index dde76300a5b8..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypeVersionsCleanupPolicyTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.ApplicationTypeVersionsCleanupPolicy;
-import org.junit.jupiter.api.Assertions;
-
-public final class ApplicationTypeVersionsCleanupPolicyTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ApplicationTypeVersionsCleanupPolicy model
- = BinaryData.fromString("{\"maxUnusedVersionsToKeep\":6101750029331136264}")
- .toObject(ApplicationTypeVersionsCleanupPolicy.class);
- Assertions.assertEquals(6101750029331136264L, model.maxUnusedVersionsToKeep());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ApplicationTypeVersionsCleanupPolicy model
- = new ApplicationTypeVersionsCleanupPolicy().withMaxUnusedVersionsToKeep(6101750029331136264L);
- model = BinaryData.fromObject(model).toObject(ApplicationTypeVersionsCleanupPolicy.class);
- Assertions.assertEquals(6101750029331136264L, model.maxUnusedVersionsToKeep());
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypeVersionsGetWithResponseMockTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypeVersionsGetWithResponseMockTests.java
deleted file mode 100644
index accc274fc798..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypeVersionsGetWithResponseMockTests.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.servicefabric.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.servicefabric.ServiceFabricManager;
-import com.azure.resourcemanager.servicefabric.models.ApplicationTypeVersionResource;
-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 ApplicationTypeVersionsGetWithResponseMockTests {
- @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\":\"ftpipiwyczu\",\"appPackageUrl\":\"xacpqjli\",\"defaultParameterList\":{\"asdvl\":\"usps\",\"mrsreuzvxurisjnh\":\"fwdgzxulucvp\"}},\"location\":\"txifqj\",\"tags\":{\"sutrgjup\":\"mrhublwpc\",\"jqgwzp\":\"uutpwoqhih\"},\"etag\":\"qntcypsxjvfoimwk\",\"id\":\"ircizjxvy\",\"name\":\"fceacvlhvygd\",\"type\":\"ftumrtwnawjslbiw\"}";
-
- 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);
- }));
-
- ServiceFabricManager manager = ServiceFabricManager.configure().withHttpClient(httpClient).authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- ApplicationTypeVersionResource response = manager.applicationTypeVersions()
- .getWithResponse("dshf", "snrbgyefrymsgao", "fmwncotmrfh", "rctym", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("txifqj", response.location());
- Assertions.assertEquals("mrhublwpc", response.tags().get("sutrgjup"));
- Assertions.assertEquals("xacpqjli", response.appPackageUrl());
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypeVersionsListMockTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypeVersionsListMockTests.java
deleted file mode 100644
index 397219d3eb19..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypeVersionsListMockTests.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.servicefabric.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.servicefabric.ServiceFabricManager;
-import com.azure.resourcemanager.servicefabric.models.ApplicationTypeVersionResource;
-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 ApplicationTypeVersionsListMockTests {
- @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\":\"qgaifmviklbydv\",\"appPackageUrl\":\"hbejdznxcvdsrhnj\",\"defaultParameterList\":{\"qfzgemjdftul\":\"lvtno\",\"tmczuomejwcwwqi\":\"ltducea\",\"vpkjpr\":\"knssxmojm\"}},\"location\":\"wcfzqljyxgt\",\"tags\":{\"hmkxmaehvbb\":\"eydbsd\"},\"etag\":\"ripltf\",\"id\":\"tbaxk\",\"name\":\"xywr\",\"type\":\"kpyklyhp\"}]}";
-
- 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);
- }));
-
- ServiceFabricManager manager = ServiceFabricManager.configure().withHttpClient(httpClient).authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response = manager.applicationTypeVersions().list("ojgcyzt",
- "fmznba", "qphchqnrnrpxehuw", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("wcfzqljyxgt", response.iterator().next().location());
- Assertions.assertEquals("eydbsd", response.iterator().next().tags().get("hmkxmaehvbb"));
- Assertions.assertEquals("hbejdznxcvdsrhnj", response.iterator().next().appPackageUrl());
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypesCreateOrUpdateWithResponseMockTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypesCreateOrUpdateWithResponseMockTests.java
deleted file mode 100644
index a0f9d6581053..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypesCreateOrUpdateWithResponseMockTests.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.servicefabric.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.servicefabric.ServiceFabricManager;
-import com.azure.resourcemanager.servicefabric.models.ApplicationTypeResource;
-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 ApplicationTypesCreateOrUpdateWithResponseMockTests {
- @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\":\"yzirtxdyuxzejn\"},\"location\":\"sewgioilqukr\",\"tags\":{\"rgguf\":\"tqmieox\",\"hhavgrvkffovjz\":\"yaomtb\",\"gjmfxumvfcl\":\"pjbi\"},\"etag\":\"ovwxnbkfezzxsc\",\"id\":\"wzdgirujbzbo\",\"name\":\"vzzbtdcq\",\"type\":\"pniyujviyl\"}";
-
- 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);
- }));
-
- ServiceFabricManager manager = ServiceFabricManager.configure().withHttpClient(httpClient).authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- ApplicationTypeResource response
- = manager.applicationTypes().define("zh").withExistingCluster("zronasxift", "zq").withRegion("onnxkrlgnyhm")
- .withTags(mapOf("thrrgh", "xkk", "gf", "jbdhqxvc")).create();
-
- Assertions.assertEquals("sewgioilqukr", response.location());
- Assertions.assertEquals("tqmieox", response.tags().get("rgguf"));
- }
-
- // Use "Map.of" if available
- @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/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypesGetWithResponseMockTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypesGetWithResponseMockTests.java
deleted file mode 100644
index 60681129f528..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypesGetWithResponseMockTests.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.servicefabric.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.servicefabric.ServiceFabricManager;
-import com.azure.resourcemanager.servicefabric.models.ApplicationTypeResource;
-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 ApplicationTypesGetWithResponseMockTests {
- @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\":\"qmt\"},\"location\":\"ltmm\",\"tags\":{\"upkvipmdsc\":\"yeozphvwauyqncy\",\"totxhojujb\":\"xqupevzhf\",\"n\":\"pelmcuvhixbjxyf\"},\"etag\":\"r\",\"id\":\"o\",\"name\":\"sttp\",\"type\":\"iwkkbn\"}";
-
- 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);
- }));
-
- ServiceFabricManager manager = ServiceFabricManager.configure().withHttpClient(httpClient).authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- ApplicationTypeResource response = manager.applicationTypes()
- .getWithResponse("pyouaibrebqaays", "kixqtnqtt", "zlwfffiakp", com.azure.core.util.Context.NONE).getValue();
-
- Assertions.assertEquals("ltmm", response.location());
- Assertions.assertEquals("yeozphvwauyqncy", response.tags().get("upkvipmdsc"));
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypesListMockTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypesListMockTests.java
deleted file mode 100644
index 3107808822e0..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationTypesListMockTests.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.servicefabric.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.servicefabric.ServiceFabricManager;
-import com.azure.resourcemanager.servicefabric.models.ApplicationTypeResource;
-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 ApplicationTypesListMockTests {
- @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\":\"iithtywu\"},\"location\":\"cbihwqk\",\"tags\":{\"dgoihxumwctondzj\":\"ntwjch\",\"fdlwg\":\"uu\",\"gseinq\":\"ytsbwtovv\"},\"etag\":\"ufxqknpirgnepttw\",\"id\":\"sniffc\",\"name\":\"mqnrojlpijnkr\",\"type\":\"frddhcrati\"}]}";
-
- 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);
- }));
-
- ServiceFabricManager manager = ServiceFabricManager.configure().withHttpClient(httpClient).authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response
- = manager.applicationTypes().list("jrywvtylbfpnc", "rd", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("cbihwqk", response.iterator().next().location());
- Assertions.assertEquals("ntwjch", response.iterator().next().tags().get("dgoihxumwctondzj"));
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationUpgradePolicyTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationUpgradePolicyTests.java
deleted file mode 100644
index 0d4d40cebd5a..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationUpgradePolicyTests.java
+++ /dev/null
@@ -1,107 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.ApplicationUpgradePolicy;
-import com.azure.resourcemanager.servicefabric.models.ArmApplicationHealthPolicy;
-import com.azure.resourcemanager.servicefabric.models.ArmRollingUpgradeMonitoringPolicy;
-import com.azure.resourcemanager.servicefabric.models.ArmServiceTypeHealthPolicy;
-import com.azure.resourcemanager.servicefabric.models.ArmUpgradeFailureAction;
-import com.azure.resourcemanager.servicefabric.models.RollingUpgradeMode;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class ApplicationUpgradePolicyTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ApplicationUpgradePolicy model = BinaryData.fromString(
- "{\"upgradeReplicaSetCheckTimeout\":\"grcfb\",\"forceRestart\":true,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Manual\",\"healthCheckWaitDuration\":\"hhkxbp\",\"healthCheckStableDuration\":\"ymjhxxjyngudivkr\",\"healthCheckRetryTimeout\":\"wbxqzvszjfau\",\"upgradeTimeout\":\"fdxxivetvtcqaqtd\",\"upgradeDomainTimeout\":\"mcbxvwvxysl\"},\"applicationHealthPolicy\":{\"considerWarningAsError\":false,\"maxPercentUnhealthyDeployedApplications\":263048903,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":693295515,\"maxPercentUnhealthyPartitionsPerService\":527643920,\"maxPercentUnhealthyReplicasPerPartition\":2053949685},\"serviceTypeHealthPolicyMap\":{\"bkrvrnsvshqj\":{\"maxPercentUnhealthyServices\":1336387683,\"maxPercentUnhealthyPartitionsPerService\":1562521656,\"maxPercentUnhealthyReplicasPerPartition\":520113589}}},\"upgradeMode\":\"Invalid\",\"recreateApplication\":true}")
- .toObject(ApplicationUpgradePolicy.class);
- Assertions.assertEquals("grcfb", model.upgradeReplicaSetCheckTimeout());
- Assertions.assertEquals(true, model.forceRestart());
- Assertions.assertEquals(ArmUpgradeFailureAction.MANUAL, model.rollingUpgradeMonitoringPolicy().failureAction());
- Assertions.assertEquals("hhkxbp", model.rollingUpgradeMonitoringPolicy().healthCheckWaitDuration());
- Assertions.assertEquals("ymjhxxjyngudivkr", model.rollingUpgradeMonitoringPolicy().healthCheckStableDuration());
- Assertions.assertEquals("wbxqzvszjfau", model.rollingUpgradeMonitoringPolicy().healthCheckRetryTimeout());
- Assertions.assertEquals("fdxxivetvtcqaqtd", model.rollingUpgradeMonitoringPolicy().upgradeTimeout());
- Assertions.assertEquals("mcbxvwvxysl", model.rollingUpgradeMonitoringPolicy().upgradeDomainTimeout());
- Assertions.assertEquals(false, model.applicationHealthPolicy().considerWarningAsError());
- Assertions.assertEquals(263048903, model.applicationHealthPolicy().maxPercentUnhealthyDeployedApplications());
- Assertions.assertEquals(693295515,
- model.applicationHealthPolicy().defaultServiceTypeHealthPolicy().maxPercentUnhealthyServices());
- Assertions.assertEquals(527643920,
- model.applicationHealthPolicy().defaultServiceTypeHealthPolicy().maxPercentUnhealthyPartitionsPerService());
- Assertions.assertEquals(2053949685,
- model.applicationHealthPolicy().defaultServiceTypeHealthPolicy().maxPercentUnhealthyReplicasPerPartition());
- Assertions.assertEquals(1336387683, model.applicationHealthPolicy().serviceTypeHealthPolicyMap()
- .get("bkrvrnsvshqj").maxPercentUnhealthyServices());
- Assertions.assertEquals(1562521656, model.applicationHealthPolicy().serviceTypeHealthPolicyMap()
- .get("bkrvrnsvshqj").maxPercentUnhealthyPartitionsPerService());
- Assertions.assertEquals(520113589, model.applicationHealthPolicy().serviceTypeHealthPolicyMap()
- .get("bkrvrnsvshqj").maxPercentUnhealthyReplicasPerPartition());
- Assertions.assertEquals(RollingUpgradeMode.INVALID, model.upgradeMode());
- Assertions.assertEquals(true, model.recreateApplication());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ApplicationUpgradePolicy model
- = new ApplicationUpgradePolicy().withUpgradeReplicaSetCheckTimeout("grcfb").withForceRestart(true)
- .withRollingUpgradeMonitoringPolicy(new ArmRollingUpgradeMonitoringPolicy()
- .withFailureAction(ArmUpgradeFailureAction.MANUAL).withHealthCheckWaitDuration("hhkxbp")
- .withHealthCheckStableDuration("ymjhxxjyngudivkr").withHealthCheckRetryTimeout("wbxqzvszjfau")
- .withUpgradeTimeout("fdxxivetvtcqaqtd").withUpgradeDomainTimeout("mcbxvwvxysl"))
- .withApplicationHealthPolicy(new ArmApplicationHealthPolicy().withConsiderWarningAsError(false)
- .withMaxPercentUnhealthyDeployedApplications(263048903)
- .withDefaultServiceTypeHealthPolicy(
- new ArmServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(693295515)
- .withMaxPercentUnhealthyPartitionsPerService(527643920)
- .withMaxPercentUnhealthyReplicasPerPartition(2053949685))
- .withServiceTypeHealthPolicyMap(mapOf("bkrvrnsvshqj",
- new ArmServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1336387683)
- .withMaxPercentUnhealthyPartitionsPerService(1562521656)
- .withMaxPercentUnhealthyReplicasPerPartition(520113589))))
- .withUpgradeMode(RollingUpgradeMode.INVALID).withRecreateApplication(true);
- model = BinaryData.fromObject(model).toObject(ApplicationUpgradePolicy.class);
- Assertions.assertEquals("grcfb", model.upgradeReplicaSetCheckTimeout());
- Assertions.assertEquals(true, model.forceRestart());
- Assertions.assertEquals(ArmUpgradeFailureAction.MANUAL, model.rollingUpgradeMonitoringPolicy().failureAction());
- Assertions.assertEquals("hhkxbp", model.rollingUpgradeMonitoringPolicy().healthCheckWaitDuration());
- Assertions.assertEquals("ymjhxxjyngudivkr", model.rollingUpgradeMonitoringPolicy().healthCheckStableDuration());
- Assertions.assertEquals("wbxqzvszjfau", model.rollingUpgradeMonitoringPolicy().healthCheckRetryTimeout());
- Assertions.assertEquals("fdxxivetvtcqaqtd", model.rollingUpgradeMonitoringPolicy().upgradeTimeout());
- Assertions.assertEquals("mcbxvwvxysl", model.rollingUpgradeMonitoringPolicy().upgradeDomainTimeout());
- Assertions.assertEquals(false, model.applicationHealthPolicy().considerWarningAsError());
- Assertions.assertEquals(263048903, model.applicationHealthPolicy().maxPercentUnhealthyDeployedApplications());
- Assertions.assertEquals(693295515,
- model.applicationHealthPolicy().defaultServiceTypeHealthPolicy().maxPercentUnhealthyServices());
- Assertions.assertEquals(527643920,
- model.applicationHealthPolicy().defaultServiceTypeHealthPolicy().maxPercentUnhealthyPartitionsPerService());
- Assertions.assertEquals(2053949685,
- model.applicationHealthPolicy().defaultServiceTypeHealthPolicy().maxPercentUnhealthyReplicasPerPartition());
- Assertions.assertEquals(1336387683, model.applicationHealthPolicy().serviceTypeHealthPolicyMap()
- .get("bkrvrnsvshqj").maxPercentUnhealthyServices());
- Assertions.assertEquals(1562521656, model.applicationHealthPolicy().serviceTypeHealthPolicyMap()
- .get("bkrvrnsvshqj").maxPercentUnhealthyPartitionsPerService());
- Assertions.assertEquals(520113589, model.applicationHealthPolicy().serviceTypeHealthPolicyMap()
- .get("bkrvrnsvshqj").maxPercentUnhealthyReplicasPerPartition());
- Assertions.assertEquals(RollingUpgradeMode.INVALID, model.upgradeMode());
- Assertions.assertEquals(true, model.recreateApplication());
- }
-
- // Use "Map.of" if available
- @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/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationUserAssignedIdentityTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationUserAssignedIdentityTests.java
deleted file mode 100644
index 4f58d08409e6..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationUserAssignedIdentityTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.ApplicationUserAssignedIdentity;
-import org.junit.jupiter.api.Assertions;
-
-public final class ApplicationUserAssignedIdentityTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ApplicationUserAssignedIdentity model
- = BinaryData.fromString("{\"name\":\"kthumaqolbgycdui\",\"principalId\":\"r\"}")
- .toObject(ApplicationUserAssignedIdentity.class);
- Assertions.assertEquals("kthumaqolbgycdui", model.name());
- Assertions.assertEquals("r", model.principalId());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ApplicationUserAssignedIdentity model
- = new ApplicationUserAssignedIdentity().withName("kthumaqolbgycdui").withPrincipalId("r");
- model = BinaryData.fromObject(model).toObject(ApplicationUserAssignedIdentity.class);
- Assertions.assertEquals("kthumaqolbgycdui", model.name());
- Assertions.assertEquals("r", model.principalId());
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationsGetWithResponseMockTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationsGetWithResponseMockTests.java
deleted file mode 100644
index 5db5f81f22b8..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationsGetWithResponseMockTests.java
+++ /dev/null
@@ -1,98 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.servicefabric.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.servicefabric.ServiceFabricManager;
-import com.azure.resourcemanager.servicefabric.models.ApplicationResource;
-import com.azure.resourcemanager.servicefabric.models.ArmUpgradeFailureAction;
-import com.azure.resourcemanager.servicefabric.models.ManagedIdentityType;
-import com.azure.resourcemanager.servicefabric.models.RollingUpgradeMode;
-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 ApplicationsGetWithResponseMockTests {
- @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
- = "{\"identity\":{\"principalId\":\"tgk\",\"tenantId\":\"tvdxeclzedqb\",\"type\":\"None\",\"userAssignedIdentities\":{\"fsmlmbtxhwgfw\":{\"principalId\":\"plodqkdlwwqfbu\",\"clientId\":\"kxtrq\"}}},\"properties\":{\"provisioningState\":\"a\",\"typeName\":\"oezbrhubsk\",\"typeVersion\":\"dyg\",\"parameters\":{\"rfmluiqtq\":\"kkqfqjbvle\",\"yvnqqybaryeuay\":\"fa\",\"bqgzslesjcbhern\":\"kq\"},\"upgradePolicy\":{\"upgradeReplicaSetCheckTimeout\":\"ewdjcvbquwrb\",\"forceRestart\":true,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Rollback\",\"healthCheckWaitDuration\":\"buffkmrqemvvhm\",\"healthCheckStableDuration\":\"drjf\",\"healthCheckRetryTimeout\":\"acoebj\",\"upgradeTimeout\":\"wzcjznmwcpmgua\",\"upgradeDomainTimeout\":\"raufactkahzova\"},\"applicationHealthPolicy\":{\"considerWarningAsError\":true,\"maxPercentUnhealthyDeployedApplications\":347971797,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":113664127,\"maxPercentUnhealthyPartitionsPerService\":1959547059,\"maxPercentUnhealthyReplicasPerPartition\":196518772},\"serviceTypeHealthPolicyMap\":{\"lfg\":{},\"lqubkwdlen\":{}}},\"upgradeMode\":\"UnmonitoredAuto\",\"recreateApplication\":true},\"minimumNodes\":5032851596424421907,\"maximumNodes\":3773912633867560647,\"removeApplicationCapacity\":false,\"metrics\":[{\"name\":\"inyflnorwmduvwp\",\"maximumCapacity\":7997351295761854478,\"reservationCapacity\":2959519988127241657,\"totalApplicationCapacity\":8236469646650196378},{\"name\":\"gpqch\",\"maximumCapacity\":4486802272843555243,\"reservationCapacity\":3778167690103643206,\"totalApplicationCapacity\":6219904994785247374},{\"name\":\"xgibbda\",\"maximumCapacity\":3690608915062764768,\"reservationCapacity\":5258496855323298629,\"totalApplicationCapacity\":4529300263395127628},{\"name\":\"sukokwbqplhl\",\"maximumCapacity\":8356054412580573793,\"reservationCapacity\":7056990023571937899,\"totalApplicationCapacity\":864057560368064195}],\"managedIdentities\":[{\"name\":\"zsoldwey\",\"principalId\":\"qdunvmnnrwrbior\"},{\"name\":\"talywjhhgdnhxms\",\"principalId\":\"v\"},{\"name\":\"omi\",\"principalId\":\"ox\"},{\"name\":\"gdufiqnd\",\"principalId\":\"euzaof\"}]},\"location\":\"hvcyyysfg\",\"tags\":{\"qonmacj\":\"cubiipuipw\",\"izsh\":\"k\",\"gmblrri\":\"vcimpev\",\"rwfscjfnynszquj\":\"bywdxsmicc\"},\"etag\":\"dvoqyt\",\"id\":\"yo\",\"name\":\"bblgyavut\",\"type\":\"thjoxoism\"}";
-
- 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);
- }));
-
- ServiceFabricManager manager = ServiceFabricManager.configure().withHttpClient(httpClient).authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- ApplicationResource response = manager.applications()
- .getWithResponse("uodpv", "uudl", "zibt", com.azure.core.util.Context.NONE).getValue();
-
- Assertions.assertEquals(ManagedIdentityType.NONE, response.identity().type());
- Assertions.assertEquals("hvcyyysfg", response.location());
- Assertions.assertEquals("cubiipuipw", response.tags().get("qonmacj"));
- Assertions.assertEquals("oezbrhubsk", response.typeName());
- Assertions.assertEquals("dyg", response.typeVersion());
- Assertions.assertEquals("kkqfqjbvle", response.parameters().get("rfmluiqtq"));
- Assertions.assertEquals("ewdjcvbquwrb", response.upgradePolicy().upgradeReplicaSetCheckTimeout());
- Assertions.assertEquals(true, response.upgradePolicy().forceRestart());
- Assertions.assertEquals(ArmUpgradeFailureAction.ROLLBACK,
- response.upgradePolicy().rollingUpgradeMonitoringPolicy().failureAction());
- Assertions.assertEquals("buffkmrqemvvhm",
- response.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckWaitDuration());
- Assertions.assertEquals("drjf",
- response.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckStableDuration());
- Assertions.assertEquals("acoebj",
- response.upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckRetryTimeout());
- Assertions.assertEquals("wzcjznmwcpmgua",
- response.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeTimeout());
- Assertions.assertEquals("raufactkahzova",
- response.upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeDomainTimeout());
- Assertions.assertEquals(true, response.upgradePolicy().applicationHealthPolicy().considerWarningAsError());
- Assertions.assertEquals(347971797,
- response.upgradePolicy().applicationHealthPolicy().maxPercentUnhealthyDeployedApplications());
- Assertions.assertEquals(113664127, response.upgradePolicy().applicationHealthPolicy()
- .defaultServiceTypeHealthPolicy().maxPercentUnhealthyServices());
- Assertions.assertEquals(1959547059, response.upgradePolicy().applicationHealthPolicy()
- .defaultServiceTypeHealthPolicy().maxPercentUnhealthyPartitionsPerService());
- Assertions.assertEquals(196518772, response.upgradePolicy().applicationHealthPolicy()
- .defaultServiceTypeHealthPolicy().maxPercentUnhealthyReplicasPerPartition());
- Assertions.assertEquals(RollingUpgradeMode.UNMONITORED_AUTO, response.upgradePolicy().upgradeMode());
- Assertions.assertEquals(true, response.upgradePolicy().recreateApplication());
- Assertions.assertEquals(5032851596424421907L, response.minimumNodes());
- Assertions.assertEquals(3773912633867560647L, response.maximumNodes());
- Assertions.assertEquals(false, response.removeApplicationCapacity());
- Assertions.assertEquals("inyflnorwmduvwp", response.metrics().get(0).name());
- Assertions.assertEquals(7997351295761854478L, response.metrics().get(0).maximumCapacity());
- Assertions.assertEquals(2959519988127241657L, response.metrics().get(0).reservationCapacity());
- Assertions.assertEquals(8236469646650196378L, response.metrics().get(0).totalApplicationCapacity());
- Assertions.assertEquals("zsoldwey", response.managedIdentities().get(0).name());
- Assertions.assertEquals("qdunvmnnrwrbior", response.managedIdentities().get(0).principalId());
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationsListMockTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationsListMockTests.java
deleted file mode 100644
index 8b1ae74bed9d..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ApplicationsListMockTests.java
+++ /dev/null
@@ -1,105 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.servicefabric.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.servicefabric.ServiceFabricManager;
-import com.azure.resourcemanager.servicefabric.models.ApplicationResource;
-import com.azure.resourcemanager.servicefabric.models.ArmUpgradeFailureAction;
-import com.azure.resourcemanager.servicefabric.models.ManagedIdentityType;
-import com.azure.resourcemanager.servicefabric.models.RollingUpgradeMode;
-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 ApplicationsListMockTests {
- @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\":[{\"identity\":{\"principalId\":\"cvizqzdwlvw\",\"tenantId\":\"oupfgfb\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"ahbqactxtgzuk\":{\"principalId\":\"hgkfmin\",\"clientId\":\"owzfttsttkt\"},\"azivjlfrqttbajl\":{\"principalId\":\"tmmqtgqqqxhrn\",\"clientId\":\"xcpjuisavokqdzf\"},\"igovi\":{\"principalId\":\"tnwxy\",\"clientId\":\"pidkqqfkuvscxkdm\"}}},\"properties\":{\"provisioningState\":\"kpmloa\",\"typeName\":\"ruocbgo\",\"typeVersion\":\"bteoybf\",\"parameters\":{\"mywwtkgkxnyed\":\"akvvjgslordi\",\"yvudtjuewbci\":\"b\",\"xccybvpa\":\"xuuwhcj\"},\"upgradePolicy\":{\"upgradeReplicaSetCheckTimeout\":\"kudzpxgwj\",\"forceRestart\":false,\"rollingUpgradeMonitoringPolicy\":{\"failureAction\":\"Manual\",\"healthCheckWaitDuration\":\"cyohpfkyrkdbd\",\"healthCheckStableDuration\":\"ogsjkmnwqjno\",\"healthCheckRetryTimeout\":\"iyhddvi\",\"upgradeTimeout\":\"egfnmntfpmvmemfn\",\"upgradeDomainTimeout\":\"dwvvba\"},\"applicationHealthPolicy\":{\"considerWarningAsError\":false,\"maxPercentUnhealthyDeployedApplications\":677641870,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":984375294,\"maxPercentUnhealthyPartitionsPerService\":1628077523,\"maxPercentUnhealthyReplicasPerPartition\":482170286},\"serviceTypeHealthPolicyMap\":{\"rdnhfuku\":{}}},\"upgradeMode\":\"UnmonitoredAuto\",\"recreateApplication\":false},\"minimumNodes\":5191466923245315601,\"maximumNodes\":4557398891396675269,\"removeApplicationCapacity\":true,\"metrics\":[{\"name\":\"pfcvlerchpqbmfp\",\"maximumCapacity\":6598038620342743533,\"reservationCapacity\":8640705401011653724,\"totalApplicationCapacity\":5480146714072551724},{\"name\":\"spuunnoxyhkxgq\",\"maximumCapacity\":8879508928062968266,\"reservationCapacity\":5499837573865267014,\"totalApplicationCapacity\":5674487456112843436}],\"managedIdentities\":[{\"name\":\"a\",\"principalId\":\"wdaomdjvlpjxxkzb\"},{\"name\":\"msgeivsiykzk\",\"principalId\":\"ncj\"},{\"name\":\"xonbzoggculapz\",\"principalId\":\"y\"}]},\"location\":\"gogtqxepnylbf\",\"tags\":{\"vofqzhvfc\":\"lyjt\",\"jpvd\":\"byfmowuxr\",\"vwzjbhyz\":\"xfzwi\"},\"etag\":\"jrkambtrnegvmnv\",\"id\":\"eqvldspast\",\"name\":\"bkkd\",\"type\":\"flvestmjlxrrilo\"}]}";
-
- 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);
- }));
-
- ServiceFabricManager manager = ServiceFabricManager.configure().withHttpClient(httpClient).authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response
- = manager.applications().list("ksbpimlqoljx", "cgxxlxs", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals(ManagedIdentityType.USER_ASSIGNED, response.iterator().next().identity().type());
- Assertions.assertEquals("gogtqxepnylbf", response.iterator().next().location());
- Assertions.assertEquals("lyjt", response.iterator().next().tags().get("vofqzhvfc"));
- Assertions.assertEquals("ruocbgo", response.iterator().next().typeName());
- Assertions.assertEquals("bteoybf", response.iterator().next().typeVersion());
- Assertions.assertEquals("akvvjgslordi", response.iterator().next().parameters().get("mywwtkgkxnyed"));
- Assertions.assertEquals("kudzpxgwj",
- response.iterator().next().upgradePolicy().upgradeReplicaSetCheckTimeout());
- Assertions.assertEquals(false, response.iterator().next().upgradePolicy().forceRestart());
- Assertions.assertEquals(ArmUpgradeFailureAction.MANUAL,
- response.iterator().next().upgradePolicy().rollingUpgradeMonitoringPolicy().failureAction());
- Assertions.assertEquals("cyohpfkyrkdbd",
- response.iterator().next().upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckWaitDuration());
- Assertions.assertEquals("ogsjkmnwqjno",
- response.iterator().next().upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckStableDuration());
- Assertions.assertEquals("iyhddvi",
- response.iterator().next().upgradePolicy().rollingUpgradeMonitoringPolicy().healthCheckRetryTimeout());
- Assertions.assertEquals("egfnmntfpmvmemfn",
- response.iterator().next().upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeTimeout());
- Assertions.assertEquals("dwvvba",
- response.iterator().next().upgradePolicy().rollingUpgradeMonitoringPolicy().upgradeDomainTimeout());
- Assertions.assertEquals(false,
- response.iterator().next().upgradePolicy().applicationHealthPolicy().considerWarningAsError());
- Assertions.assertEquals(677641870, response.iterator().next().upgradePolicy().applicationHealthPolicy()
- .maxPercentUnhealthyDeployedApplications());
- Assertions.assertEquals(984375294, response.iterator().next().upgradePolicy().applicationHealthPolicy()
- .defaultServiceTypeHealthPolicy().maxPercentUnhealthyServices());
- Assertions.assertEquals(1628077523, response.iterator().next().upgradePolicy().applicationHealthPolicy()
- .defaultServiceTypeHealthPolicy().maxPercentUnhealthyPartitionsPerService());
- Assertions.assertEquals(482170286, response.iterator().next().upgradePolicy().applicationHealthPolicy()
- .defaultServiceTypeHealthPolicy().maxPercentUnhealthyReplicasPerPartition());
- Assertions.assertEquals(RollingUpgradeMode.UNMONITORED_AUTO,
- response.iterator().next().upgradePolicy().upgradeMode());
- Assertions.assertEquals(false, response.iterator().next().upgradePolicy().recreateApplication());
- Assertions.assertEquals(5191466923245315601L, response.iterator().next().minimumNodes());
- Assertions.assertEquals(4557398891396675269L, response.iterator().next().maximumNodes());
- Assertions.assertEquals(true, response.iterator().next().removeApplicationCapacity());
- Assertions.assertEquals("pfcvlerchpqbmfp", response.iterator().next().metrics().get(0).name());
- Assertions.assertEquals(6598038620342743533L, response.iterator().next().metrics().get(0).maximumCapacity());
- Assertions.assertEquals(8640705401011653724L,
- response.iterator().next().metrics().get(0).reservationCapacity());
- Assertions.assertEquals(5480146714072551724L,
- response.iterator().next().metrics().get(0).totalApplicationCapacity());
- Assertions.assertEquals("a", response.iterator().next().managedIdentities().get(0).name());
- Assertions.assertEquals("wdaomdjvlpjxxkzb",
- response.iterator().next().managedIdentities().get(0).principalId());
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ArmApplicationHealthPolicyTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ArmApplicationHealthPolicyTests.java
deleted file mode 100644
index 924bad594269..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ArmApplicationHealthPolicyTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.ArmApplicationHealthPolicy;
-import com.azure.resourcemanager.servicefabric.models.ArmServiceTypeHealthPolicy;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class ArmApplicationHealthPolicyTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ArmApplicationHealthPolicy model = BinaryData.fromString(
- "{\"considerWarningAsError\":true,\"maxPercentUnhealthyDeployedApplications\":1553831435,\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":1616367631,\"maxPercentUnhealthyPartitionsPerService\":1933405011,\"maxPercentUnhealthyReplicasPerPartition\":1057432086},\"serviceTypeHealthPolicyMap\":{\"vwpm\":{\"maxPercentUnhealthyServices\":1948356330,\"maxPercentUnhealthyPartitionsPerService\":2126872967,\"maxPercentUnhealthyReplicasPerPartition\":1133541665},\"jmkcjhwqytj\":{\"maxPercentUnhealthyServices\":1787439694,\"maxPercentUnhealthyPartitionsPerService\":930552751,\"maxPercentUnhealthyReplicasPerPartition\":477944589},\"wgdrjervnaenqp\":{\"maxPercentUnhealthyServices\":778428037,\"maxPercentUnhealthyPartitionsPerService\":385457826,\"maxPercentUnhealthyReplicasPerPartition\":524895743},\"gmifthnzd\":{\"maxPercentUnhealthyServices\":1479768723,\"maxPercentUnhealthyPartitionsPerService\":681452902,\"maxPercentUnhealthyReplicasPerPartition\":895776000}}}")
- .toObject(ArmApplicationHealthPolicy.class);
- Assertions.assertEquals(true, model.considerWarningAsError());
- Assertions.assertEquals(1553831435, model.maxPercentUnhealthyDeployedApplications());
- Assertions.assertEquals(1616367631, model.defaultServiceTypeHealthPolicy().maxPercentUnhealthyServices());
- Assertions.assertEquals(1933405011,
- model.defaultServiceTypeHealthPolicy().maxPercentUnhealthyPartitionsPerService());
- Assertions.assertEquals(1057432086,
- model.defaultServiceTypeHealthPolicy().maxPercentUnhealthyReplicasPerPartition());
- Assertions.assertEquals(1948356330,
- model.serviceTypeHealthPolicyMap().get("vwpm").maxPercentUnhealthyServices());
- Assertions.assertEquals(2126872967,
- model.serviceTypeHealthPolicyMap().get("vwpm").maxPercentUnhealthyPartitionsPerService());
- Assertions.assertEquals(1133541665,
- model.serviceTypeHealthPolicyMap().get("vwpm").maxPercentUnhealthyReplicasPerPartition());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ArmApplicationHealthPolicy model = new ArmApplicationHealthPolicy().withConsiderWarningAsError(true)
- .withMaxPercentUnhealthyDeployedApplications(1553831435)
- .withDefaultServiceTypeHealthPolicy(new ArmServiceTypeHealthPolicy()
- .withMaxPercentUnhealthyServices(1616367631).withMaxPercentUnhealthyPartitionsPerService(1933405011)
- .withMaxPercentUnhealthyReplicasPerPartition(1057432086))
- .withServiceTypeHealthPolicyMap(mapOf("vwpm",
- new ArmServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1948356330)
- .withMaxPercentUnhealthyPartitionsPerService(2126872967)
- .withMaxPercentUnhealthyReplicasPerPartition(1133541665),
- "jmkcjhwqytj",
- new ArmServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1787439694)
- .withMaxPercentUnhealthyPartitionsPerService(930552751)
- .withMaxPercentUnhealthyReplicasPerPartition(477944589),
- "wgdrjervnaenqp",
- new ArmServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(778428037)
- .withMaxPercentUnhealthyPartitionsPerService(385457826)
- .withMaxPercentUnhealthyReplicasPerPartition(524895743),
- "gmifthnzd",
- new ArmServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1479768723)
- .withMaxPercentUnhealthyPartitionsPerService(681452902)
- .withMaxPercentUnhealthyReplicasPerPartition(895776000)));
- model = BinaryData.fromObject(model).toObject(ArmApplicationHealthPolicy.class);
- Assertions.assertEquals(true, model.considerWarningAsError());
- Assertions.assertEquals(1553831435, model.maxPercentUnhealthyDeployedApplications());
- Assertions.assertEquals(1616367631, model.defaultServiceTypeHealthPolicy().maxPercentUnhealthyServices());
- Assertions.assertEquals(1933405011,
- model.defaultServiceTypeHealthPolicy().maxPercentUnhealthyPartitionsPerService());
- Assertions.assertEquals(1057432086,
- model.defaultServiceTypeHealthPolicy().maxPercentUnhealthyReplicasPerPartition());
- Assertions.assertEquals(1948356330,
- model.serviceTypeHealthPolicyMap().get("vwpm").maxPercentUnhealthyServices());
- Assertions.assertEquals(2126872967,
- model.serviceTypeHealthPolicyMap().get("vwpm").maxPercentUnhealthyPartitionsPerService());
- Assertions.assertEquals(1133541665,
- model.serviceTypeHealthPolicyMap().get("vwpm").maxPercentUnhealthyReplicasPerPartition());
- }
-
- // Use "Map.of" if available
- @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/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ArmRollingUpgradeMonitoringPolicyTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ArmRollingUpgradeMonitoringPolicyTests.java
deleted file mode 100644
index 425c451be3be..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ArmRollingUpgradeMonitoringPolicyTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.ArmRollingUpgradeMonitoringPolicy;
-import com.azure.resourcemanager.servicefabric.models.ArmUpgradeFailureAction;
-import org.junit.jupiter.api.Assertions;
-
-public final class ArmRollingUpgradeMonitoringPolicyTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ArmRollingUpgradeMonitoringPolicy model = BinaryData.fromString(
- "{\"failureAction\":\"Manual\",\"healthCheckWaitDuration\":\"ovasrruvwbhsqfsu\",\"healthCheckStableDuration\":\"gjb\",\"healthCheckRetryTimeout\":\"xb\",\"upgradeTimeout\":\"bsrfbj\",\"upgradeDomainTimeout\":\"twss\"}")
- .toObject(ArmRollingUpgradeMonitoringPolicy.class);
- Assertions.assertEquals(ArmUpgradeFailureAction.MANUAL, model.failureAction());
- Assertions.assertEquals("ovasrruvwbhsqfsu", model.healthCheckWaitDuration());
- Assertions.assertEquals("gjb", model.healthCheckStableDuration());
- Assertions.assertEquals("xb", model.healthCheckRetryTimeout());
- Assertions.assertEquals("bsrfbj", model.upgradeTimeout());
- Assertions.assertEquals("twss", model.upgradeDomainTimeout());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ArmRollingUpgradeMonitoringPolicy model
- = new ArmRollingUpgradeMonitoringPolicy().withFailureAction(ArmUpgradeFailureAction.MANUAL)
- .withHealthCheckWaitDuration("ovasrruvwbhsqfsu").withHealthCheckStableDuration("gjb")
- .withHealthCheckRetryTimeout("xb").withUpgradeTimeout("bsrfbj").withUpgradeDomainTimeout("twss");
- model = BinaryData.fromObject(model).toObject(ArmRollingUpgradeMonitoringPolicy.class);
- Assertions.assertEquals(ArmUpgradeFailureAction.MANUAL, model.failureAction());
- Assertions.assertEquals("ovasrruvwbhsqfsu", model.healthCheckWaitDuration());
- Assertions.assertEquals("gjb", model.healthCheckStableDuration());
- Assertions.assertEquals("xb", model.healthCheckRetryTimeout());
- Assertions.assertEquals("bsrfbj", model.upgradeTimeout());
- Assertions.assertEquals("twss", model.upgradeDomainTimeout());
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ArmServiceTypeHealthPolicyTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ArmServiceTypeHealthPolicyTests.java
deleted file mode 100644
index 482997784ca8..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ArmServiceTypeHealthPolicyTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.ArmServiceTypeHealthPolicy;
-import org.junit.jupiter.api.Assertions;
-
-public final class ArmServiceTypeHealthPolicyTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ArmServiceTypeHealthPolicy model = BinaryData.fromString(
- "{\"maxPercentUnhealthyServices\":294736838,\"maxPercentUnhealthyPartitionsPerService\":962281735,\"maxPercentUnhealthyReplicasPerPartition\":843221186}")
- .toObject(ArmServiceTypeHealthPolicy.class);
- Assertions.assertEquals(294736838, model.maxPercentUnhealthyServices());
- Assertions.assertEquals(962281735, model.maxPercentUnhealthyPartitionsPerService());
- Assertions.assertEquals(843221186, model.maxPercentUnhealthyReplicasPerPartition());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ArmServiceTypeHealthPolicy model = new ArmServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(294736838)
- .withMaxPercentUnhealthyPartitionsPerService(962281735)
- .withMaxPercentUnhealthyReplicasPerPartition(843221186);
- model = BinaryData.fromObject(model).toObject(ArmServiceTypeHealthPolicy.class);
- Assertions.assertEquals(294736838, model.maxPercentUnhealthyServices());
- Assertions.assertEquals(962281735, model.maxPercentUnhealthyPartitionsPerService());
- Assertions.assertEquals(843221186, model.maxPercentUnhealthyReplicasPerPartition());
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/AvailableOperationDisplayTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/AvailableOperationDisplayTests.java
deleted file mode 100644
index 5e0e80d194df..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/AvailableOperationDisplayTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.AvailableOperationDisplay;
-import org.junit.jupiter.api.Assertions;
-
-public final class AvailableOperationDisplayTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AvailableOperationDisplay model = BinaryData
- .fromString("{\"provider\":\"og\",\"resource\":\"e\",\"operation\":\"a\",\"description\":\"uhrzayvvt\"}")
- .toObject(AvailableOperationDisplay.class);
- Assertions.assertEquals("og", model.provider());
- Assertions.assertEquals("e", model.resource());
- Assertions.assertEquals("a", model.operation());
- Assertions.assertEquals("uhrzayvvt", model.description());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AvailableOperationDisplay model = new AvailableOperationDisplay().withProvider("og").withResource("e")
- .withOperation("a").withDescription("uhrzayvvt");
- model = BinaryData.fromObject(model).toObject(AvailableOperationDisplay.class);
- Assertions.assertEquals("og", model.provider());
- Assertions.assertEquals("e", model.resource());
- Assertions.assertEquals("a", model.operation());
- Assertions.assertEquals("uhrzayvvt", model.description());
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/AzureActiveDirectoryTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/AzureActiveDirectoryTests.java
deleted file mode 100644
index b25c8cd86591..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/AzureActiveDirectoryTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.AzureActiveDirectory;
-import org.junit.jupiter.api.Assertions;
-
-public final class AzureActiveDirectoryTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- AzureActiveDirectory model = BinaryData
- .fromString(
- "{\"tenantId\":\"cmsxaobhdxbm\",\"clusterApplication\":\"ioq\",\"clientApplication\":\"ehtbm\"}")
- .toObject(AzureActiveDirectory.class);
- Assertions.assertEquals("cmsxaobhdxbm", model.tenantId());
- Assertions.assertEquals("ioq", model.clusterApplication());
- Assertions.assertEquals("ehtbm", model.clientApplication());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- AzureActiveDirectory model = new AzureActiveDirectory().withTenantId("cmsxaobhdxbm")
- .withClusterApplication("ioq").withClientApplication("ehtbm");
- model = BinaryData.fromObject(model).toObject(AzureActiveDirectory.class);
- Assertions.assertEquals("cmsxaobhdxbm", model.tenantId());
- Assertions.assertEquals("ioq", model.clusterApplication());
- Assertions.assertEquals("ehtbm", model.clientApplication());
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/CertificateDescriptionTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/CertificateDescriptionTests.java
deleted file mode 100644
index 16a1edd3b7ff..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/CertificateDescriptionTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.CertificateDescription;
-import com.azure.resourcemanager.servicefabric.models.StoreName;
-import org.junit.jupiter.api.Assertions;
-
-public final class CertificateDescriptionTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- CertificateDescription model = BinaryData.fromString(
- "{\"thumbprint\":\"fpownoizhwlr\",\"thumbprintSecondary\":\"bqsoqijg\",\"x509StoreName\":\"TrustedPublisher\"}")
- .toObject(CertificateDescription.class);
- Assertions.assertEquals("fpownoizhwlr", model.thumbprint());
- Assertions.assertEquals("bqsoqijg", model.thumbprintSecondary());
- Assertions.assertEquals(StoreName.TRUSTED_PUBLISHER, model.x509StoreName());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- CertificateDescription model = new CertificateDescription().withThumbprint("fpownoizhwlr")
- .withThumbprintSecondary("bqsoqijg").withX509StoreName(StoreName.TRUSTED_PUBLISHER);
- model = BinaryData.fromObject(model).toObject(CertificateDescription.class);
- Assertions.assertEquals("fpownoizhwlr", model.thumbprint());
- Assertions.assertEquals("bqsoqijg", model.thumbprintSecondary());
- Assertions.assertEquals(StoreName.TRUSTED_PUBLISHER, model.x509StoreName());
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ClientCertificateCommonNameTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ClientCertificateCommonNameTests.java
deleted file mode 100644
index b1fcde14cc93..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ClientCertificateCommonNameTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.ClientCertificateCommonName;
-import org.junit.jupiter.api.Assertions;
-
-public final class ClientCertificateCommonNameTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ClientCertificateCommonName model = BinaryData.fromString(
- "{\"isAdmin\":false,\"certificateCommonName\":\"jpsq\",\"certificateIssuerThumbprint\":\"cmpoyfdkfogkny\"}")
- .toObject(ClientCertificateCommonName.class);
- Assertions.assertEquals(false, model.isAdmin());
- Assertions.assertEquals("jpsq", model.certificateCommonName());
- Assertions.assertEquals("cmpoyfdkfogkny", model.certificateIssuerThumbprint());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ClientCertificateCommonName model = new ClientCertificateCommonName().withIsAdmin(false)
- .withCertificateCommonName("jpsq").withCertificateIssuerThumbprint("cmpoyfdkfogkny");
- model = BinaryData.fromObject(model).toObject(ClientCertificateCommonName.class);
- Assertions.assertEquals(false, model.isAdmin());
- Assertions.assertEquals("jpsq", model.certificateCommonName());
- Assertions.assertEquals("cmpoyfdkfogkny", model.certificateIssuerThumbprint());
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ClientCertificateThumbprintTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ClientCertificateThumbprintTests.java
deleted file mode 100644
index d9155125ab33..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ClientCertificateThumbprintTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.ClientCertificateThumbprint;
-import org.junit.jupiter.api.Assertions;
-
-public final class ClientCertificateThumbprintTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ClientCertificateThumbprint model
- = BinaryData.fromString("{\"isAdmin\":false,\"certificateThumbprint\":\"ofjdde\"}")
- .toObject(ClientCertificateThumbprint.class);
- Assertions.assertEquals(false, model.isAdmin());
- Assertions.assertEquals("ofjdde", model.certificateThumbprint());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ClientCertificateThumbprint model
- = new ClientCertificateThumbprint().withIsAdmin(false).withCertificateThumbprint("ofjdde");
- model = BinaryData.fromObject(model).toObject(ClientCertificateThumbprint.class);
- Assertions.assertEquals(false, model.isAdmin());
- Assertions.assertEquals("ofjdde", model.certificateThumbprint());
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ClusterHealthPolicyTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ClusterHealthPolicyTests.java
deleted file mode 100644
index 50a820beea87..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ClusterHealthPolicyTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.ApplicationHealthPolicy;
-import com.azure.resourcemanager.servicefabric.models.ClusterHealthPolicy;
-import com.azure.resourcemanager.servicefabric.models.ServiceTypeHealthPolicy;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class ClusterHealthPolicyTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ClusterHealthPolicy model = BinaryData.fromString(
- "{\"maxPercentUnhealthyNodes\":180815183,\"maxPercentUnhealthyApplications\":1181425969,\"applicationHealthPolicies\":{\"eotusivyevc\":{\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":1824195045},\"serviceTypeHealthPolicies\":{\"pdvhpfxxypin\":{\"maxPercentUnhealthyServices\":864037829},\"ayhuy\":{\"maxPercentUnhealthyServices\":2146603578},\"podepoo\":{\"maxPercentUnhealthyServices\":1192352775},\"uvamiheognarxzxt\":{\"maxPercentUnhealthyServices\":895630833}}},\"kufubljo\":{\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":1522291140},\"serviceTypeHealthPolicies\":{\"ngbwjz\":{\"maxPercentUnhealthyServices\":422843266},\"ygxgispemvtz\":{\"maxPercentUnhealthyServices\":1668036347}}},\"jqul\":{\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":111264928},\"serviceTypeHealthPolicies\":{\"e\":{\"maxPercentUnhealthyServices\":1330720242},\"qjbasvms\":{\"maxPercentUnhealthyServices\":565226786}}}}}")
- .toObject(ClusterHealthPolicy.class);
- Assertions.assertEquals(180815183, model.maxPercentUnhealthyNodes());
- Assertions.assertEquals(1181425969, model.maxPercentUnhealthyApplications());
- Assertions.assertEquals(1824195045, model.applicationHealthPolicies().get("eotusivyevc")
- .defaultServiceTypeHealthPolicy().maxPercentUnhealthyServices());
- Assertions.assertEquals(864037829, model.applicationHealthPolicies().get("eotusivyevc")
- .serviceTypeHealthPolicies().get("pdvhpfxxypin").maxPercentUnhealthyServices());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ClusterHealthPolicy model = new ClusterHealthPolicy().withMaxPercentUnhealthyNodes(180815183)
- .withMaxPercentUnhealthyApplications(1181425969)
- .withApplicationHealthPolicies(mapOf("eotusivyevc", new ApplicationHealthPolicy()
- .withDefaultServiceTypeHealthPolicy(
- new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1824195045))
- .withServiceTypeHealthPolicies(
- mapOf("pdvhpfxxypin", new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(864037829),
- "ayhuy", new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(2146603578), "podepoo",
- new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1192352775), "uvamiheognarxzxt",
- new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(895630833))),
- "kufubljo",
- new ApplicationHealthPolicy()
- .withDefaultServiceTypeHealthPolicy(
- new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1522291140))
- .withServiceTypeHealthPolicies(
- mapOf("ngbwjz", new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(422843266),
- "ygxgispemvtz", new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1668036347))),
- "jqul",
- new ApplicationHealthPolicy()
- .withDefaultServiceTypeHealthPolicy(
- new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(111264928))
- .withServiceTypeHealthPolicies(
- mapOf("e", new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1330720242),
- "qjbasvms", new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(565226786)))));
- model = BinaryData.fromObject(model).toObject(ClusterHealthPolicy.class);
- Assertions.assertEquals(180815183, model.maxPercentUnhealthyNodes());
- Assertions.assertEquals(1181425969, model.maxPercentUnhealthyApplications());
- Assertions.assertEquals(1824195045, model.applicationHealthPolicies().get("eotusivyevc")
- .defaultServiceTypeHealthPolicy().maxPercentUnhealthyServices());
- Assertions.assertEquals(864037829, model.applicationHealthPolicies().get("eotusivyevc")
- .serviceTypeHealthPolicies().get("pdvhpfxxypin").maxPercentUnhealthyServices());
- }
-
- // Use "Map.of" if available
- @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/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ClusterUpgradeDeltaHealthPolicyTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ClusterUpgradeDeltaHealthPolicyTests.java
deleted file mode 100644
index 8dfc8ceb9541..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ClusterUpgradeDeltaHealthPolicyTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.ApplicationDeltaHealthPolicy;
-import com.azure.resourcemanager.servicefabric.models.ClusterUpgradeDeltaHealthPolicy;
-import com.azure.resourcemanager.servicefabric.models.ServiceTypeDeltaHealthPolicy;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class ClusterUpgradeDeltaHealthPolicyTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ClusterUpgradeDeltaHealthPolicy model = BinaryData.fromString(
- "{\"maxPercentDeltaUnhealthyNodes\":1154463022,\"maxPercentUpgradeDomainDeltaUnhealthyNodes\":595941541,\"maxPercentDeltaUnhealthyApplications\":1356626713,\"applicationDeltaHealthPolicies\":{\"vmgxsab\":{\"defaultServiceTypeDeltaHealthPolicy\":{\"maxPercentDeltaUnhealthyServices\":461040275},\"serviceTypeDeltaHealthPolicies\":{\"ljfmppee\":{\"maxPercentDeltaUnhealthyServices\":347858915}}},\"dkvwrwjfe\":{\"defaultServiceTypeDeltaHealthPolicy\":{\"maxPercentDeltaUnhealthyServices\":1160647104},\"serviceTypeDeltaHealthPolicies\":{\"tcj\":{\"maxPercentDeltaUnhealthyServices\":2066308678},\"zevndhkrwpdappds\":{\"maxPercentDeltaUnhealthyServices\":372276294}}},\"tqxhocdgeab\":{\"defaultServiceTypeDeltaHealthPolicy\":{\"maxPercentDeltaUnhealthyServices\":1102727938},\"serviceTypeDeltaHealthPolicies\":{\"ltmrldh\":{\"maxPercentDeltaUnhealthyServices\":1936335434},\"zzd\":{\"maxPercentDeltaUnhealthyServices\":885785432}}},\"aozwyiftyhxhu\":{\"defaultServiceTypeDeltaHealthPolicy\":{\"maxPercentDeltaUnhealthyServices\":743985587},\"serviceTypeDeltaHealthPolicies\":{\"ndv\":{\"maxPercentDeltaUnhealthyServices\":1962929741}}}}}")
- .toObject(ClusterUpgradeDeltaHealthPolicy.class);
- Assertions.assertEquals(1154463022, model.maxPercentDeltaUnhealthyNodes());
- Assertions.assertEquals(595941541, model.maxPercentUpgradeDomainDeltaUnhealthyNodes());
- Assertions.assertEquals(1356626713, model.maxPercentDeltaUnhealthyApplications());
- Assertions.assertEquals(461040275, model.applicationDeltaHealthPolicies().get("vmgxsab")
- .defaultServiceTypeDeltaHealthPolicy().maxPercentDeltaUnhealthyServices());
- Assertions.assertEquals(347858915, model.applicationDeltaHealthPolicies().get("vmgxsab")
- .serviceTypeDeltaHealthPolicies().get("ljfmppee").maxPercentDeltaUnhealthyServices());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ClusterUpgradeDeltaHealthPolicy model = new ClusterUpgradeDeltaHealthPolicy()
- .withMaxPercentDeltaUnhealthyNodes(1154463022).withMaxPercentUpgradeDomainDeltaUnhealthyNodes(595941541)
- .withMaxPercentDeltaUnhealthyApplications(1356626713)
- .withApplicationDeltaHealthPolicies(mapOf("vmgxsab",
- new ApplicationDeltaHealthPolicy()
- .withDefaultServiceTypeDeltaHealthPolicy(
- new ServiceTypeDeltaHealthPolicy().withMaxPercentDeltaUnhealthyServices(461040275))
- .withServiceTypeDeltaHealthPolicies(mapOf("ljfmppee",
- new ServiceTypeDeltaHealthPolicy().withMaxPercentDeltaUnhealthyServices(347858915))),
- "dkvwrwjfe",
- new ApplicationDeltaHealthPolicy()
- .withDefaultServiceTypeDeltaHealthPolicy(
- new ServiceTypeDeltaHealthPolicy().withMaxPercentDeltaUnhealthyServices(1160647104))
- .withServiceTypeDeltaHealthPolicies(mapOf("tcj",
- new ServiceTypeDeltaHealthPolicy().withMaxPercentDeltaUnhealthyServices(2066308678),
- "zevndhkrwpdappds",
- new ServiceTypeDeltaHealthPolicy().withMaxPercentDeltaUnhealthyServices(372276294))),
- "tqxhocdgeab",
- new ApplicationDeltaHealthPolicy()
- .withDefaultServiceTypeDeltaHealthPolicy(
- new ServiceTypeDeltaHealthPolicy().withMaxPercentDeltaUnhealthyServices(1102727938))
- .withServiceTypeDeltaHealthPolicies(mapOf("ltmrldh",
- new ServiceTypeDeltaHealthPolicy().withMaxPercentDeltaUnhealthyServices(1936335434), "zzd",
- new ServiceTypeDeltaHealthPolicy().withMaxPercentDeltaUnhealthyServices(885785432))),
- "aozwyiftyhxhu",
- new ApplicationDeltaHealthPolicy()
- .withDefaultServiceTypeDeltaHealthPolicy(
- new ServiceTypeDeltaHealthPolicy().withMaxPercentDeltaUnhealthyServices(743985587))
- .withServiceTypeDeltaHealthPolicies(mapOf("ndv",
- new ServiceTypeDeltaHealthPolicy().withMaxPercentDeltaUnhealthyServices(1962929741)))));
- model = BinaryData.fromObject(model).toObject(ClusterUpgradeDeltaHealthPolicy.class);
- Assertions.assertEquals(1154463022, model.maxPercentDeltaUnhealthyNodes());
- Assertions.assertEquals(595941541, model.maxPercentUpgradeDomainDeltaUnhealthyNodes());
- Assertions.assertEquals(1356626713, model.maxPercentDeltaUnhealthyApplications());
- Assertions.assertEquals(461040275, model.applicationDeltaHealthPolicies().get("vmgxsab")
- .defaultServiceTypeDeltaHealthPolicy().maxPercentDeltaUnhealthyServices());
- Assertions.assertEquals(347858915, model.applicationDeltaHealthPolicies().get("vmgxsab")
- .serviceTypeDeltaHealthPolicies().get("ljfmppee").maxPercentDeltaUnhealthyServices());
- }
-
- // Use "Map.of" if available
- @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/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ClusterUpgradePolicyTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ClusterUpgradePolicyTests.java
deleted file mode 100644
index 680530818c18..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ClusterUpgradePolicyTests.java
+++ /dev/null
@@ -1,125 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.ApplicationDeltaHealthPolicy;
-import com.azure.resourcemanager.servicefabric.models.ApplicationHealthPolicy;
-import com.azure.resourcemanager.servicefabric.models.ClusterHealthPolicy;
-import com.azure.resourcemanager.servicefabric.models.ClusterUpgradeDeltaHealthPolicy;
-import com.azure.resourcemanager.servicefabric.models.ClusterUpgradePolicy;
-import com.azure.resourcemanager.servicefabric.models.ServiceTypeDeltaHealthPolicy;
-import com.azure.resourcemanager.servicefabric.models.ServiceTypeHealthPolicy;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class ClusterUpgradePolicyTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ClusterUpgradePolicy model = BinaryData.fromString(
- "{\"forceRestart\":false,\"upgradeReplicaSetCheckTimeout\":\"wvukx\",\"healthCheckWaitDuration\":\"audccsnhs\",\"healthCheckStableDuration\":\"cnyejhkryhtnapcz\",\"healthCheckRetryTimeout\":\"lokjyemkk\",\"upgradeTimeout\":\"ni\",\"upgradeDomainTimeout\":\"joxzjnchgejspodm\",\"healthPolicy\":{\"maxPercentUnhealthyNodes\":1543997460,\"maxPercentUnhealthyApplications\":1345546955,\"applicationHealthPolicies\":{\"jvwmfda\":{\"defaultServiceTypeHealthPolicy\":{\"maxPercentUnhealthyServices\":1876925756},\"serviceTypeHealthPolicies\":{\"uxinpmqnjaq\":{\"maxPercentUnhealthyServices\":302858012},\"jsprozvcpute\":{\"maxPercentUnhealthyServices\":288433409}}}}},\"deltaHealthPolicy\":{\"maxPercentDeltaUnhealthyNodes\":1030512533,\"maxPercentUpgradeDomainDeltaUnhealthyNodes\":344559573,\"maxPercentDeltaUnhealthyApplications\":1290413072,\"applicationDeltaHealthPolicies\":{\"slwejdpvw\":{\"defaultServiceTypeDeltaHealthPolicy\":{\"maxPercentDeltaUnhealthyServices\":153428823},\"serviceTypeDeltaHealthPolicies\":{\"vmkjozkrwfndiodj\":{\"maxPercentDeltaUnhealthyServices\":796050777}}},\"hcrzevd\":{\"defaultServiceTypeDeltaHealthPolicy\":{\"maxPercentDeltaUnhealthyServices\":1059261896},\"serviceTypeDeltaHealthPolicies\":{\"cctazakljlahbc\":{\"maxPercentDeltaUnhealthyServices\":854028036},\"fdfdosygexpa\":{\"maxPercentDeltaUnhealthyServices\":1201536256},\"khmsbz\":{\"maxPercentDeltaUnhealthyServices\":889386051}}},\"it\":{\"defaultServiceTypeDeltaHealthPolicy\":{\"maxPercentDeltaUnhealthyServices\":1500196175},\"serviceTypeDeltaHealthPolicies\":{\"hqtrgqjbpf\":{\"maxPercentDeltaUnhealthyServices\":965033495},\"inzgvfcj\":{\"maxPercentDeltaUnhealthyServices\":257181558},\"oxxjtfelluwf\":{\"maxPercentDeltaUnhealthyServices\":1821850933}}}}}}")
- .toObject(ClusterUpgradePolicy.class);
- Assertions.assertEquals(false, model.forceRestart());
- Assertions.assertEquals("wvukx", model.upgradeReplicaSetCheckTimeout());
- Assertions.assertEquals("audccsnhs", model.healthCheckWaitDuration());
- Assertions.assertEquals("cnyejhkryhtnapcz", model.healthCheckStableDuration());
- Assertions.assertEquals("lokjyemkk", model.healthCheckRetryTimeout());
- Assertions.assertEquals("ni", model.upgradeTimeout());
- Assertions.assertEquals("joxzjnchgejspodm", model.upgradeDomainTimeout());
- Assertions.assertEquals(1543997460, model.healthPolicy().maxPercentUnhealthyNodes());
- Assertions.assertEquals(1345546955, model.healthPolicy().maxPercentUnhealthyApplications());
- Assertions.assertEquals(1876925756, model.healthPolicy().applicationHealthPolicies().get("jvwmfda")
- .defaultServiceTypeHealthPolicy().maxPercentUnhealthyServices());
- Assertions.assertEquals(302858012, model.healthPolicy().applicationHealthPolicies().get("jvwmfda")
- .serviceTypeHealthPolicies().get("uxinpmqnjaq").maxPercentUnhealthyServices());
- Assertions.assertEquals(1030512533, model.deltaHealthPolicy().maxPercentDeltaUnhealthyNodes());
- Assertions.assertEquals(344559573, model.deltaHealthPolicy().maxPercentUpgradeDomainDeltaUnhealthyNodes());
- Assertions.assertEquals(1290413072, model.deltaHealthPolicy().maxPercentDeltaUnhealthyApplications());
- Assertions.assertEquals(153428823, model.deltaHealthPolicy().applicationDeltaHealthPolicies().get("slwejdpvw")
- .defaultServiceTypeDeltaHealthPolicy().maxPercentDeltaUnhealthyServices());
- Assertions.assertEquals(796050777, model.deltaHealthPolicy().applicationDeltaHealthPolicies().get("slwejdpvw")
- .serviceTypeDeltaHealthPolicies().get("vmkjozkrwfndiodj").maxPercentDeltaUnhealthyServices());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ClusterUpgradePolicy model
- = new ClusterUpgradePolicy().withForceRestart(false).withUpgradeReplicaSetCheckTimeout("wvukx")
- .withHealthCheckWaitDuration("audccsnhs").withHealthCheckStableDuration("cnyejhkryhtnapcz")
- .withHealthCheckRetryTimeout("lokjyemkk").withUpgradeTimeout("ni")
- .withUpgradeDomainTimeout("joxzjnchgejspodm")
- .withHealthPolicy(new ClusterHealthPolicy().withMaxPercentUnhealthyNodes(1543997460)
- .withMaxPercentUnhealthyApplications(1345546955)
- .withApplicationHealthPolicies(mapOf("jvwmfda", new ApplicationHealthPolicy()
- .withDefaultServiceTypeHealthPolicy(
- new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1876925756))
- .withServiceTypeHealthPolicies(mapOf("uxinpmqnjaq",
- new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(302858012), "jsprozvcpute",
- new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(288433409))))))
- .withDeltaHealthPolicy(new ClusterUpgradeDeltaHealthPolicy()
- .withMaxPercentDeltaUnhealthyNodes(1030512533)
- .withMaxPercentUpgradeDomainDeltaUnhealthyNodes(344559573)
- .withMaxPercentDeltaUnhealthyApplications(1290413072)
- .withApplicationDeltaHealthPolicies(mapOf("slwejdpvw", new ApplicationDeltaHealthPolicy()
- .withDefaultServiceTypeDeltaHealthPolicy(
- new ServiceTypeDeltaHealthPolicy().withMaxPercentDeltaUnhealthyServices(153428823))
- .withServiceTypeDeltaHealthPolicies(mapOf("vmkjozkrwfndiodj",
- new ServiceTypeDeltaHealthPolicy().withMaxPercentDeltaUnhealthyServices(796050777))),
- "hcrzevd",
- new ApplicationDeltaHealthPolicy()
- .withDefaultServiceTypeDeltaHealthPolicy(
- new ServiceTypeDeltaHealthPolicy().withMaxPercentDeltaUnhealthyServices(1059261896))
- .withServiceTypeDeltaHealthPolicies(mapOf("cctazakljlahbc",
- new ServiceTypeDeltaHealthPolicy().withMaxPercentDeltaUnhealthyServices(854028036),
- "fdfdosygexpa",
- new ServiceTypeDeltaHealthPolicy().withMaxPercentDeltaUnhealthyServices(1201536256),
- "khmsbz",
- new ServiceTypeDeltaHealthPolicy().withMaxPercentDeltaUnhealthyServices(889386051))),
- "it",
- new ApplicationDeltaHealthPolicy()
- .withDefaultServiceTypeDeltaHealthPolicy(
- new ServiceTypeDeltaHealthPolicy().withMaxPercentDeltaUnhealthyServices(1500196175))
- .withServiceTypeDeltaHealthPolicies(mapOf("hqtrgqjbpf",
- new ServiceTypeDeltaHealthPolicy().withMaxPercentDeltaUnhealthyServices(965033495),
- "inzgvfcj",
- new ServiceTypeDeltaHealthPolicy().withMaxPercentDeltaUnhealthyServices(257181558),
- "oxxjtfelluwf", new ServiceTypeDeltaHealthPolicy()
- .withMaxPercentDeltaUnhealthyServices(1821850933))))));
- model = BinaryData.fromObject(model).toObject(ClusterUpgradePolicy.class);
- Assertions.assertEquals(false, model.forceRestart());
- Assertions.assertEquals("wvukx", model.upgradeReplicaSetCheckTimeout());
- Assertions.assertEquals("audccsnhs", model.healthCheckWaitDuration());
- Assertions.assertEquals("cnyejhkryhtnapcz", model.healthCheckStableDuration());
- Assertions.assertEquals("lokjyemkk", model.healthCheckRetryTimeout());
- Assertions.assertEquals("ni", model.upgradeTimeout());
- Assertions.assertEquals("joxzjnchgejspodm", model.upgradeDomainTimeout());
- Assertions.assertEquals(1543997460, model.healthPolicy().maxPercentUnhealthyNodes());
- Assertions.assertEquals(1345546955, model.healthPolicy().maxPercentUnhealthyApplications());
- Assertions.assertEquals(1876925756, model.healthPolicy().applicationHealthPolicies().get("jvwmfda")
- .defaultServiceTypeHealthPolicy().maxPercentUnhealthyServices());
- Assertions.assertEquals(302858012, model.healthPolicy().applicationHealthPolicies().get("jvwmfda")
- .serviceTypeHealthPolicies().get("uxinpmqnjaq").maxPercentUnhealthyServices());
- Assertions.assertEquals(1030512533, model.deltaHealthPolicy().maxPercentDeltaUnhealthyNodes());
- Assertions.assertEquals(344559573, model.deltaHealthPolicy().maxPercentUpgradeDomainDeltaUnhealthyNodes());
- Assertions.assertEquals(1290413072, model.deltaHealthPolicy().maxPercentDeltaUnhealthyApplications());
- Assertions.assertEquals(153428823, model.deltaHealthPolicy().applicationDeltaHealthPolicies().get("slwejdpvw")
- .defaultServiceTypeDeltaHealthPolicy().maxPercentDeltaUnhealthyServices());
- Assertions.assertEquals(796050777, model.deltaHealthPolicy().applicationDeltaHealthPolicies().get("slwejdpvw")
- .serviceTypeDeltaHealthPolicies().get("vmkjozkrwfndiodj").maxPercentDeltaUnhealthyServices());
- }
-
- // Use "Map.of" if available
- @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/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ClustersDeleteByResourceGroupWithResponseMockTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ClustersDeleteByResourceGroupWithResponseMockTests.java
deleted file mode 100644
index e8282c5812cb..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ClustersDeleteByResourceGroupWithResponseMockTests.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.servicefabric.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.servicefabric.ServiceFabricManager;
-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 ClustersDeleteByResourceGroupWithResponseMockTests {
- @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);
- }));
-
- ServiceFabricManager manager = ServiceFabricManager.configure().withHttpClient(httpClient).authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- manager.clusters().deleteByResourceGroupWithResponse("opgxedkowepb", "pc", com.azure.core.util.Context.NONE);
-
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ClustersListUpgradableVersionsWithResponseMockTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ClustersListUpgradableVersionsWithResponseMockTests.java
deleted file mode 100644
index 3b98d3413def..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ClustersListUpgradableVersionsWithResponseMockTests.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.servicefabric.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.servicefabric.ServiceFabricManager;
-import com.azure.resourcemanager.servicefabric.models.UpgradableVersionPathResult;
-import com.azure.resourcemanager.servicefabric.models.UpgradableVersionsDescription;
-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 ClustersListUpgradableVersionsWithResponseMockTests {
- @Test
- public void testListUpgradableVersionsWithResponse() throws Exception {
- HttpClient httpClient = Mockito.mock(HttpClient.class);
- HttpResponse httpResponse = Mockito.mock(HttpResponse.class);
- ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class);
-
- String responseStr = "{\"supportedPath\":[\"vgoup\"]}";
-
- 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);
- }));
-
- ServiceFabricManager manager = ServiceFabricManager.configure().withHttpClient(httpClient).authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- UpgradableVersionPathResult response = manager.clusters()
- .listUpgradableVersionsWithResponse("dhtmdvypgikd", "szywkbirryu",
- new UpgradableVersionsDescription().withTargetVersion("hlhkjoqrvqqaatj"),
- com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("vgoup", response.supportedPath().get(0));
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/EndpointRangeDescriptionTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/EndpointRangeDescriptionTests.java
deleted file mode 100644
index 5fb877ccb3a5..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/EndpointRangeDescriptionTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.EndpointRangeDescription;
-import org.junit.jupiter.api.Assertions;
-
-public final class EndpointRangeDescriptionTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- EndpointRangeDescription model = BinaryData.fromString("{\"startPort\":1629282531,\"endPort\":850212440}")
- .toObject(EndpointRangeDescription.class);
- Assertions.assertEquals(1629282531, model.startPort());
- Assertions.assertEquals(850212440, model.endPort());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- EndpointRangeDescription model
- = new EndpointRangeDescription().withStartPort(1629282531).withEndPort(850212440);
- model = BinaryData.fromObject(model).toObject(EndpointRangeDescription.class);
- Assertions.assertEquals(1629282531, model.startPort());
- Assertions.assertEquals(850212440, model.endPort());
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ManagedIdentityTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ManagedIdentityTests.java
deleted file mode 100644
index b09c405e2428..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ManagedIdentityTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.ManagedIdentity;
-import com.azure.resourcemanager.servicefabric.models.ManagedIdentityType;
-import com.azure.resourcemanager.servicefabric.models.UserAssignedIdentity;
-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\":\"hcdhmdual\",\"tenantId\":\"xqpvfadmw\",\"type\":\"SystemAssigned, UserAssigned\",\"userAssignedIdentities\":{\"isgwbnbbeldawkz\":{\"principalId\":\"xpvgo\",\"clientId\":\"lf\"}}}")
- .toObject(ManagedIdentity.class);
- Assertions.assertEquals(ManagedIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ManagedIdentity model = new ManagedIdentity().withType(ManagedIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED)
- .withUserAssignedIdentities(mapOf("isgwbnbbeldawkz", new UserAssignedIdentity()));
- model = BinaryData.fromObject(model).toObject(ManagedIdentity.class);
- Assertions.assertEquals(ManagedIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, model.type());
- }
-
- // Use "Map.of" if available
- @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/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/NamedPartitionSchemeDescriptionTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/NamedPartitionSchemeDescriptionTests.java
deleted file mode 100644
index 37eaabb6f8eb..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/NamedPartitionSchemeDescriptionTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.NamedPartitionSchemeDescription;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class NamedPartitionSchemeDescriptionTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- NamedPartitionSchemeDescription model = BinaryData
- .fromString(
- "{\"partitionScheme\":\"Named\",\"count\":1561704632,\"names\":[\"refajpjorwkqnyh\",\"b\",\"j\"]}")
- .toObject(NamedPartitionSchemeDescription.class);
- Assertions.assertEquals(1561704632, model.count());
- Assertions.assertEquals("refajpjorwkqnyh", model.names().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- NamedPartitionSchemeDescription model = new NamedPartitionSchemeDescription().withCount(1561704632)
- .withNames(Arrays.asList("refajpjorwkqnyh", "b", "j"));
- model = BinaryData.fromObject(model).toObject(NamedPartitionSchemeDescription.class);
- Assertions.assertEquals(1561704632, model.count());
- Assertions.assertEquals("refajpjorwkqnyh", model.names().get(0));
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/NodeTypeDescriptionTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/NodeTypeDescriptionTests.java
deleted file mode 100644
index 6d88fe2453f4..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/NodeTypeDescriptionTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.DurabilityLevel;
-import com.azure.resourcemanager.servicefabric.models.EndpointRangeDescription;
-import com.azure.resourcemanager.servicefabric.models.NodeTypeDescription;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class NodeTypeDescriptionTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- NodeTypeDescription model = BinaryData.fromString(
- "{\"name\":\"u\",\"placementProperties\":{\"nwzsymg\":\"ryrtihfxtijbpzv\",\"anufhfcbjysag\":\"zufcyzkohdbi\"},\"capacities\":{\"pikxwczbyscnpqxu\":\"xqhabi\"},\"clientConnectionEndpointPort\":1646115006,\"httpGatewayEndpointPort\":800348188,\"durabilityLevel\":\"Silver\",\"applicationPorts\":{\"startPort\":1574574303,\"endPort\":649847293},\"ephemeralPorts\":{\"startPort\":992034682,\"endPort\":355535904},\"isPrimary\":false,\"vmInstanceCount\":143848779,\"reverseProxyEndpointPort\":519347031,\"isStateless\":true,\"multipleAvailabilityZones\":true}")
- .toObject(NodeTypeDescription.class);
- Assertions.assertEquals("u", model.name());
- Assertions.assertEquals("ryrtihfxtijbpzv", model.placementProperties().get("nwzsymg"));
- Assertions.assertEquals("xqhabi", model.capacities().get("pikxwczbyscnpqxu"));
- Assertions.assertEquals(1646115006, model.clientConnectionEndpointPort());
- Assertions.assertEquals(800348188, model.httpGatewayEndpointPort());
- Assertions.assertEquals(DurabilityLevel.SILVER, model.durabilityLevel());
- Assertions.assertEquals(1574574303, model.applicationPorts().startPort());
- Assertions.assertEquals(649847293, model.applicationPorts().endPort());
- Assertions.assertEquals(992034682, model.ephemeralPorts().startPort());
- Assertions.assertEquals(355535904, model.ephemeralPorts().endPort());
- Assertions.assertEquals(false, model.isPrimary());
- Assertions.assertEquals(143848779, model.vmInstanceCount());
- Assertions.assertEquals(519347031, model.reverseProxyEndpointPort());
- Assertions.assertEquals(true, model.isStateless());
- Assertions.assertEquals(true, model.multipleAvailabilityZones());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- NodeTypeDescription model = new NodeTypeDescription().withName("u")
- .withPlacementProperties(mapOf("nwzsymg", "ryrtihfxtijbpzv", "anufhfcbjysag", "zufcyzkohdbi"))
- .withCapacities(mapOf("pikxwczbyscnpqxu", "xqhabi")).withClientConnectionEndpointPort(1646115006)
- .withHttpGatewayEndpointPort(800348188).withDurabilityLevel(DurabilityLevel.SILVER)
- .withApplicationPorts(new EndpointRangeDescription().withStartPort(1574574303).withEndPort(649847293))
- .withEphemeralPorts(new EndpointRangeDescription().withStartPort(992034682).withEndPort(355535904))
- .withIsPrimary(false).withVmInstanceCount(143848779).withReverseProxyEndpointPort(519347031)
- .withIsStateless(true).withMultipleAvailabilityZones(true);
- model = BinaryData.fromObject(model).toObject(NodeTypeDescription.class);
- Assertions.assertEquals("u", model.name());
- Assertions.assertEquals("ryrtihfxtijbpzv", model.placementProperties().get("nwzsymg"));
- Assertions.assertEquals("xqhabi", model.capacities().get("pikxwczbyscnpqxu"));
- Assertions.assertEquals(1646115006, model.clientConnectionEndpointPort());
- Assertions.assertEquals(800348188, model.httpGatewayEndpointPort());
- Assertions.assertEquals(DurabilityLevel.SILVER, model.durabilityLevel());
- Assertions.assertEquals(1574574303, model.applicationPorts().startPort());
- Assertions.assertEquals(649847293, model.applicationPorts().endPort());
- Assertions.assertEquals(992034682, model.ephemeralPorts().startPort());
- Assertions.assertEquals(355535904, model.ephemeralPorts().endPort());
- Assertions.assertEquals(false, model.isPrimary());
- Assertions.assertEquals(143848779, model.vmInstanceCount());
- Assertions.assertEquals(519347031, model.reverseProxyEndpointPort());
- Assertions.assertEquals(true, model.isStateless());
- Assertions.assertEquals(true, model.multipleAvailabilityZones());
- }
-
- // Use "Map.of" if available
- @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/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/NotificationTargetTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/NotificationTargetTests.java
deleted file mode 100644
index aa96d4337eac..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/NotificationTargetTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.NotificationChannel;
-import com.azure.resourcemanager.servicefabric.models.NotificationTarget;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class NotificationTargetTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- NotificationTarget model = BinaryData
- .fromString("{\"notificationChannel\":\"EmailUser\",\"receivers\":[\"kgfg\",\"bmadgak\",\"qsrxybzqqed\"]}")
- .toObject(NotificationTarget.class);
- Assertions.assertEquals(NotificationChannel.EMAIL_USER, model.notificationChannel());
- Assertions.assertEquals("kgfg", model.receivers().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- NotificationTarget model = new NotificationTarget().withNotificationChannel(NotificationChannel.EMAIL_USER)
- .withReceivers(Arrays.asList("kgfg", "bmadgak", "qsrxybzqqed"));
- model = BinaryData.fromObject(model).toObject(NotificationTarget.class);
- Assertions.assertEquals(NotificationChannel.EMAIL_USER, model.notificationChannel());
- Assertions.assertEquals("kgfg", model.receivers().get(0));
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/NotificationTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/NotificationTests.java
deleted file mode 100644
index 61aef3f5ce59..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/NotificationTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.Notification;
-import com.azure.resourcemanager.servicefabric.models.NotificationCategory;
-import com.azure.resourcemanager.servicefabric.models.NotificationChannel;
-import com.azure.resourcemanager.servicefabric.models.NotificationLevel;
-import com.azure.resourcemanager.servicefabric.models.NotificationTarget;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class NotificationTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- Notification model = BinaryData.fromString(
- "{\"isEnabled\":true,\"notificationCategory\":\"WaveProgress\",\"notificationLevel\":\"All\",\"notificationTargets\":[{\"notificationChannel\":\"EmailSubscription\",\"receivers\":[\"ejk\",\"tynqgoul\",\"ndlik\"]}]}")
- .toObject(Notification.class);
- Assertions.assertEquals(true, model.isEnabled());
- Assertions.assertEquals(NotificationCategory.WAVE_PROGRESS, model.notificationCategory());
- Assertions.assertEquals(NotificationLevel.ALL, model.notificationLevel());
- Assertions.assertEquals(NotificationChannel.EMAIL_SUBSCRIPTION,
- model.notificationTargets().get(0).notificationChannel());
- Assertions.assertEquals("ejk", model.notificationTargets().get(0).receivers().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- Notification model
- = new Notification().withIsEnabled(true).withNotificationCategory(NotificationCategory.WAVE_PROGRESS)
- .withNotificationLevel(NotificationLevel.ALL)
- .withNotificationTargets(Arrays
- .asList(new NotificationTarget().withNotificationChannel(NotificationChannel.EMAIL_SUBSCRIPTION)
- .withReceivers(Arrays.asList("ejk", "tynqgoul", "ndlik"))));
- model = BinaryData.fromObject(model).toObject(Notification.class);
- Assertions.assertEquals(true, model.isEnabled());
- Assertions.assertEquals(NotificationCategory.WAVE_PROGRESS, model.notificationCategory());
- Assertions.assertEquals(NotificationLevel.ALL, model.notificationLevel());
- Assertions.assertEquals(NotificationChannel.EMAIL_SUBSCRIPTION,
- model.notificationTargets().get(0).notificationChannel());
- Assertions.assertEquals("ejk", model.notificationTargets().get(0).receivers().get(0));
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/OperationListResultTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/OperationListResultTests.java
deleted file mode 100644
index cda3966bcadb..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/OperationListResultTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.fluent.models.OperationResultInner;
-import com.azure.resourcemanager.servicefabric.models.AvailableOperationDisplay;
-import com.azure.resourcemanager.servicefabric.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\":\"idtqajzyu\",\"isDataAction\":true,\"display\":{\"provider\":\"jkrlkhbzhfepg\",\"resource\":\"qex\",\"operation\":\"ocxscpaierhhbcs\",\"description\":\"ummajtjaod\"},\"origin\":\"bnbdxkqpxokajion\",\"nextLink\":\"mexgstxgcp\"},{\"name\":\"gmaajrm\",\"isDataAction\":false,\"display\":{\"provider\":\"rlovmclwhijcoej\",\"resource\":\"bzaqsqsycbkbfk\",\"operation\":\"kdkexxp\",\"description\":\"fmxa\"},\"origin\":\"fjpgddtocjjxhvp\",\"nextLink\":\"uexhdzx\"}],\"nextLink\":\"qeojnxqbzvddntw\"}")
- .toObject(OperationListResult.class);
- Assertions.assertEquals("idtqajzyu", model.value().get(0).name());
- Assertions.assertEquals(true, model.value().get(0).isDataAction());
- Assertions.assertEquals("jkrlkhbzhfepg", model.value().get(0).display().provider());
- Assertions.assertEquals("qex", model.value().get(0).display().resource());
- Assertions.assertEquals("ocxscpaierhhbcs", model.value().get(0).display().operation());
- Assertions.assertEquals("ummajtjaod", model.value().get(0).display().description());
- Assertions.assertEquals("bnbdxkqpxokajion", model.value().get(0).origin());
- Assertions.assertEquals("mexgstxgcp", model.value().get(0).nextLink());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- OperationListResult model = new OperationListResult().withValue(Arrays.asList(
- new OperationResultInner().withName("idtqajzyu").withIsDataAction(true)
- .withDisplay(new AvailableOperationDisplay().withProvider("jkrlkhbzhfepg").withResource("qex")
- .withOperation("ocxscpaierhhbcs").withDescription("ummajtjaod"))
- .withOrigin("bnbdxkqpxokajion").withNextLink("mexgstxgcp"),
- new OperationResultInner().withName("gmaajrm").withIsDataAction(false)
- .withDisplay(new AvailableOperationDisplay().withProvider("rlovmclwhijcoej")
- .withResource("bzaqsqsycbkbfk").withOperation("kdkexxp").withDescription("fmxa"))
- .withOrigin("fjpgddtocjjxhvp").withNextLink("uexhdzx")));
- model = BinaryData.fromObject(model).toObject(OperationListResult.class);
- Assertions.assertEquals("idtqajzyu", model.value().get(0).name());
- Assertions.assertEquals(true, model.value().get(0).isDataAction());
- Assertions.assertEquals("jkrlkhbzhfepg", model.value().get(0).display().provider());
- Assertions.assertEquals("qex", model.value().get(0).display().resource());
- Assertions.assertEquals("ocxscpaierhhbcs", model.value().get(0).display().operation());
- Assertions.assertEquals("ummajtjaod", model.value().get(0).display().description());
- Assertions.assertEquals("bnbdxkqpxokajion", model.value().get(0).origin());
- Assertions.assertEquals("mexgstxgcp", model.value().get(0).nextLink());
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/OperationResultInnerTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/OperationResultInnerTests.java
deleted file mode 100644
index 7ca483ac3fa4..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/OperationResultInnerTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.fluent.models.OperationResultInner;
-import com.azure.resourcemanager.servicefabric.models.AvailableOperationDisplay;
-import org.junit.jupiter.api.Assertions;
-
-public final class OperationResultInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- OperationResultInner model = BinaryData.fromString(
- "{\"name\":\"eic\",\"isDataAction\":false,\"display\":{\"provider\":\"zao\",\"resource\":\"uhrhcffcyddgl\",\"operation\":\"t\",\"description\":\"qkwpyeicxmqc\"},\"origin\":\"q\",\"nextLink\":\"khixuigdtopbo\"}")
- .toObject(OperationResultInner.class);
- Assertions.assertEquals("eic", model.name());
- Assertions.assertEquals(false, model.isDataAction());
- Assertions.assertEquals("zao", model.display().provider());
- Assertions.assertEquals("uhrhcffcyddgl", model.display().resource());
- Assertions.assertEquals("t", model.display().operation());
- Assertions.assertEquals("qkwpyeicxmqc", model.display().description());
- Assertions.assertEquals("q", model.origin());
- Assertions.assertEquals("khixuigdtopbo", model.nextLink());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- OperationResultInner model = new OperationResultInner()
- .withName("eic").withIsDataAction(false).withDisplay(new AvailableOperationDisplay().withProvider("zao")
- .withResource("uhrhcffcyddgl").withOperation("t").withDescription("qkwpyeicxmqc"))
- .withOrigin("q").withNextLink("khixuigdtopbo");
- model = BinaryData.fromObject(model).toObject(OperationResultInner.class);
- Assertions.assertEquals("eic", model.name());
- Assertions.assertEquals(false, model.isDataAction());
- Assertions.assertEquals("zao", model.display().provider());
- Assertions.assertEquals("uhrhcffcyddgl", model.display().resource());
- Assertions.assertEquals("t", model.display().operation());
- Assertions.assertEquals("qkwpyeicxmqc", model.display().description());
- Assertions.assertEquals("q", model.origin());
- Assertions.assertEquals("khixuigdtopbo", model.nextLink());
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/OperationsListMockTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/OperationsListMockTests.java
deleted file mode 100644
index ae098913bb0d..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/OperationsListMockTests.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.servicefabric.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.servicefabric.ServiceFabricManager;
-import com.azure.resourcemanager.servicefabric.models.OperationResult;
-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 OperationsListMockTests {
- @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\":\"kpnb\",\"isDataAction\":false,\"display\":{\"provider\":\"joqkagfhsxt\",\"resource\":\"ugzxnf\",\"operation\":\"zpxdt\",\"description\":\"dm\"},\"origin\":\"j\",\"nextLink\":\"wuenvr\"}]}";
-
- 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);
- }));
-
- ServiceFabricManager manager = ServiceFabricManager.configure().withHttpClient(httpClient).authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("kpnb", response.iterator().next().name());
- Assertions.assertEquals(false, response.iterator().next().isDataAction());
- Assertions.assertEquals("joqkagfhsxt", response.iterator().next().display().provider());
- Assertions.assertEquals("ugzxnf", response.iterator().next().display().resource());
- Assertions.assertEquals("zpxdt", response.iterator().next().display().operation());
- Assertions.assertEquals("dm", response.iterator().next().display().description());
- Assertions.assertEquals("j", response.iterator().next().origin());
- Assertions.assertEquals("wuenvr", response.iterator().next().nextLink());
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/PartitionSchemeDescriptionTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/PartitionSchemeDescriptionTests.java
deleted file mode 100644
index cfc909fb9711..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/PartitionSchemeDescriptionTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.PartitionSchemeDescription;
-
-public final class PartitionSchemeDescriptionTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- PartitionSchemeDescription model = BinaryData.fromString("{\"partitionScheme\":\"PartitionSchemeDescription\"}")
- .toObject(PartitionSchemeDescription.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- PartitionSchemeDescription model = new PartitionSchemeDescription();
- model = BinaryData.fromObject(model).toObject(PartitionSchemeDescription.class);
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServerCertificateCommonNameTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServerCertificateCommonNameTests.java
deleted file mode 100644
index 69cfd5b18221..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServerCertificateCommonNameTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.ServerCertificateCommonName;
-import org.junit.jupiter.api.Assertions;
-
-public final class ServerCertificateCommonNameTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ServerCertificateCommonName model = BinaryData
- .fromString(
- "{\"certificateCommonName\":\"zlhjxrifkwmrvkt\",\"certificateIssuerThumbprint\":\"izntocipao\"}")
- .toObject(ServerCertificateCommonName.class);
- Assertions.assertEquals("zlhjxrifkwmrvkt", model.certificateCommonName());
- Assertions.assertEquals("izntocipao", model.certificateIssuerThumbprint());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ServerCertificateCommonName model = new ServerCertificateCommonName()
- .withCertificateCommonName("zlhjxrifkwmrvkt").withCertificateIssuerThumbprint("izntocipao");
- model = BinaryData.fromObject(model).toObject(ServerCertificateCommonName.class);
- Assertions.assertEquals("zlhjxrifkwmrvkt", model.certificateCommonName());
- Assertions.assertEquals("izntocipao", model.certificateIssuerThumbprint());
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServerCertificateCommonNamesTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServerCertificateCommonNamesTests.java
deleted file mode 100644
index 2b41e1bdc84f..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServerCertificateCommonNamesTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.ServerCertificateCommonName;
-import com.azure.resourcemanager.servicefabric.models.ServerCertificateCommonNames;
-import com.azure.resourcemanager.servicefabric.models.StoreName;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class ServerCertificateCommonNamesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ServerCertificateCommonNames model = BinaryData.fromString(
- "{\"commonNames\":[{\"certificateCommonName\":\"azlobcufpdznrbt\",\"certificateIssuerThumbprint\":\"qqjnqgl\"},{\"certificateCommonName\":\"qgn\",\"certificateIssuerThumbprint\":\"foooj\"},{\"certificateCommonName\":\"wifsq\",\"certificateIssuerThumbprint\":\"saagdf\"}],\"x509StoreName\":\"AuthRoot\"}")
- .toObject(ServerCertificateCommonNames.class);
- Assertions.assertEquals("azlobcufpdznrbt", model.commonNames().get(0).certificateCommonName());
- Assertions.assertEquals("qqjnqgl", model.commonNames().get(0).certificateIssuerThumbprint());
- Assertions.assertEquals(StoreName.AUTH_ROOT, model.x509StoreName());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ServerCertificateCommonNames model = new ServerCertificateCommonNames().withCommonNames(Arrays.asList(
- new ServerCertificateCommonName().withCertificateCommonName("azlobcufpdznrbt")
- .withCertificateIssuerThumbprint("qqjnqgl"),
- new ServerCertificateCommonName().withCertificateCommonName("qgn").withCertificateIssuerThumbprint("foooj"),
- new ServerCertificateCommonName().withCertificateCommonName("wifsq")
- .withCertificateIssuerThumbprint("saagdf")))
- .withX509StoreName(StoreName.AUTH_ROOT);
- model = BinaryData.fromObject(model).toObject(ServerCertificateCommonNames.class);
- Assertions.assertEquals("azlobcufpdznrbt", model.commonNames().get(0).certificateCommonName());
- Assertions.assertEquals("qqjnqgl", model.commonNames().get(0).certificateIssuerThumbprint());
- Assertions.assertEquals(StoreName.AUTH_ROOT, model.x509StoreName());
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServiceCorrelationDescriptionTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServiceCorrelationDescriptionTests.java
deleted file mode 100644
index 90f5acf83296..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServiceCorrelationDescriptionTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.ServiceCorrelationDescription;
-import com.azure.resourcemanager.servicefabric.models.ServiceCorrelationScheme;
-import org.junit.jupiter.api.Assertions;
-
-public final class ServiceCorrelationDescriptionTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ServiceCorrelationDescription model
- = BinaryData.fromString("{\"scheme\":\"Invalid\",\"serviceName\":\"pofncck\"}")
- .toObject(ServiceCorrelationDescription.class);
- Assertions.assertEquals(ServiceCorrelationScheme.INVALID, model.scheme());
- Assertions.assertEquals("pofncck", model.serviceName());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ServiceCorrelationDescription model = new ServiceCorrelationDescription()
- .withScheme(ServiceCorrelationScheme.INVALID).withServiceName("pofncck");
- model = BinaryData.fromObject(model).toObject(ServiceCorrelationDescription.class);
- Assertions.assertEquals(ServiceCorrelationScheme.INVALID, model.scheme());
- Assertions.assertEquals("pofncck", model.serviceName());
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServiceLoadMetricDescriptionTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServiceLoadMetricDescriptionTests.java
deleted file mode 100644
index 0c2886a82c5c..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServiceLoadMetricDescriptionTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.ServiceLoadMetricDescription;
-import com.azure.resourcemanager.servicefabric.models.ServiceLoadMetricWeight;
-import org.junit.jupiter.api.Assertions;
-
-public final class ServiceLoadMetricDescriptionTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ServiceLoadMetricDescription model = BinaryData.fromString(
- "{\"name\":\"yfzqwhxxbu\",\"weight\":\"Zero\",\"primaryDefaultLoad\":437954475,\"secondaryDefaultLoad\":776883338,\"defaultLoad\":1924816201}")
- .toObject(ServiceLoadMetricDescription.class);
- Assertions.assertEquals("yfzqwhxxbu", model.name());
- Assertions.assertEquals(ServiceLoadMetricWeight.ZERO, model.weight());
- Assertions.assertEquals(437954475, model.primaryDefaultLoad());
- Assertions.assertEquals(776883338, model.secondaryDefaultLoad());
- Assertions.assertEquals(1924816201, model.defaultLoad());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ServiceLoadMetricDescription model
- = new ServiceLoadMetricDescription().withName("yfzqwhxxbu").withWeight(ServiceLoadMetricWeight.ZERO)
- .withPrimaryDefaultLoad(437954475).withSecondaryDefaultLoad(776883338).withDefaultLoad(1924816201);
- model = BinaryData.fromObject(model).toObject(ServiceLoadMetricDescription.class);
- Assertions.assertEquals("yfzqwhxxbu", model.name());
- Assertions.assertEquals(ServiceLoadMetricWeight.ZERO, model.weight());
- Assertions.assertEquals(437954475, model.primaryDefaultLoad());
- Assertions.assertEquals(776883338, model.secondaryDefaultLoad());
- Assertions.assertEquals(1924816201, model.defaultLoad());
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServicePlacementPolicyDescriptionTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServicePlacementPolicyDescriptionTests.java
deleted file mode 100644
index 5e4a6d46a1d4..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServicePlacementPolicyDescriptionTests.java
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.ServicePlacementPolicyDescription;
-
-public final class ServicePlacementPolicyDescriptionTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ServicePlacementPolicyDescription model
- = BinaryData.fromString("{\"type\":\"ServicePlacementPolicyDescription\"}")
- .toObject(ServicePlacementPolicyDescription.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ServicePlacementPolicyDescription model = new ServicePlacementPolicyDescription();
- model = BinaryData.fromObject(model).toObject(ServicePlacementPolicyDescription.class);
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServiceResourceInnerTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServiceResourceInnerTests.java
deleted file mode 100644
index 6ca0b804f3b8..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServiceResourceInnerTests.java
+++ /dev/null
@@ -1,96 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.fluent.models.ServiceResourceInner;
-import com.azure.resourcemanager.servicefabric.models.ArmServicePackageActivationMode;
-import com.azure.resourcemanager.servicefabric.models.MoveCost;
-import com.azure.resourcemanager.servicefabric.models.PartitionSchemeDescription;
-import com.azure.resourcemanager.servicefabric.models.ServiceCorrelationDescription;
-import com.azure.resourcemanager.servicefabric.models.ServiceCorrelationScheme;
-import com.azure.resourcemanager.servicefabric.models.ServiceLoadMetricDescription;
-import com.azure.resourcemanager.servicefabric.models.ServiceLoadMetricWeight;
-import com.azure.resourcemanager.servicefabric.models.ServicePlacementPolicyDescription;
-import com.azure.resourcemanager.servicefabric.models.ServiceResourceProperties;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class ServiceResourceInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ServiceResourceInner model = BinaryData.fromString(
- "{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"varmywdmj\",\"serviceTypeName\":\"q\",\"partitionDescription\":{\"partitionScheme\":\"PartitionSchemeDescription\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"x\",\"placementConstraints\":\"wlycoduhpkxkg\",\"correlationScheme\":[{\"scheme\":\"Invalid\",\"serviceName\":\"eqnajxqugjhkycu\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"ddg\"}],\"serviceLoadMetrics\":[{\"name\":\"fwqmzqalkrmn\",\"weight\":\"Low\",\"primaryDefaultLoad\":988494266,\"secondaryDefaultLoad\":1400063393,\"defaultLoad\":935480812}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicyDescription\"},{\"type\":\"ServicePlacementPolicyDescription\"},{\"type\":\"ServicePlacementPolicyDescription\"},{\"type\":\"ServicePlacementPolicyDescription\"}],\"defaultMoveCost\":\"Medium\"},\"location\":\"yxbaaabjyvayf\",\"tags\":{\"evfdnwnwm\":\"rzrtuzqogsex\"},\"etag\":\"zsyyceuzso\",\"id\":\"judpfrxt\",\"name\":\"thzvaytdwkqbrqu\",\"type\":\"paxh\"}")
- .toObject(ServiceResourceInner.class);
- Assertions.assertEquals("wlycoduhpkxkg", model.properties().placementConstraints());
- Assertions.assertEquals(ServiceCorrelationScheme.INVALID,
- model.properties().correlationScheme().get(0).scheme());
- Assertions.assertEquals("eqnajxqugjhkycu", model.properties().correlationScheme().get(0).serviceName());
- Assertions.assertEquals("fwqmzqalkrmn", model.properties().serviceLoadMetrics().get(0).name());
- Assertions.assertEquals(ServiceLoadMetricWeight.LOW, model.properties().serviceLoadMetrics().get(0).weight());
- Assertions.assertEquals(988494266, model.properties().serviceLoadMetrics().get(0).primaryDefaultLoad());
- Assertions.assertEquals(1400063393, model.properties().serviceLoadMetrics().get(0).secondaryDefaultLoad());
- Assertions.assertEquals(935480812, model.properties().serviceLoadMetrics().get(0).defaultLoad());
- Assertions.assertEquals(MoveCost.MEDIUM, model.properties().defaultMoveCost());
- Assertions.assertEquals("q", model.properties().serviceTypeName());
- Assertions.assertEquals(ArmServicePackageActivationMode.EXCLUSIVE_PROCESS,
- model.properties().servicePackageActivationMode());
- Assertions.assertEquals("x", model.properties().serviceDnsName());
- Assertions.assertEquals("yxbaaabjyvayf", model.location());
- Assertions.assertEquals("rzrtuzqogsex", model.tags().get("evfdnwnwm"));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ServiceResourceInner model = new ServiceResourceInner().withProperties(new ServiceResourceProperties()
- .withPlacementConstraints("wlycoduhpkxkg")
- .withCorrelationScheme(Arrays.asList(
- new ServiceCorrelationDescription().withScheme(ServiceCorrelationScheme.INVALID)
- .withServiceName("eqnajxqugjhkycu"),
- new ServiceCorrelationDescription().withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY)
- .withServiceName("ddg")))
- .withServiceLoadMetrics(Arrays.asList(
- new ServiceLoadMetricDescription().withName("fwqmzqalkrmn").withWeight(ServiceLoadMetricWeight.LOW)
- .withPrimaryDefaultLoad(988494266).withSecondaryDefaultLoad(1400063393).withDefaultLoad(935480812)))
- .withServicePlacementPolicies(
- Arrays.asList(new ServicePlacementPolicyDescription(), new ServicePlacementPolicyDescription(),
- new ServicePlacementPolicyDescription(), new ServicePlacementPolicyDescription()))
- .withDefaultMoveCost(MoveCost.MEDIUM).withServiceTypeName("q")
- .withPartitionDescription(new PartitionSchemeDescription())
- .withServicePackageActivationMode(ArmServicePackageActivationMode.EXCLUSIVE_PROCESS)
- .withServiceDnsName("x")).withLocation("yxbaaabjyvayf").withTags(mapOf("evfdnwnwm", "rzrtuzqogsex"));
- model = BinaryData.fromObject(model).toObject(ServiceResourceInner.class);
- Assertions.assertEquals("wlycoduhpkxkg", model.properties().placementConstraints());
- Assertions.assertEquals(ServiceCorrelationScheme.INVALID,
- model.properties().correlationScheme().get(0).scheme());
- Assertions.assertEquals("eqnajxqugjhkycu", model.properties().correlationScheme().get(0).serviceName());
- Assertions.assertEquals("fwqmzqalkrmn", model.properties().serviceLoadMetrics().get(0).name());
- Assertions.assertEquals(ServiceLoadMetricWeight.LOW, model.properties().serviceLoadMetrics().get(0).weight());
- Assertions.assertEquals(988494266, model.properties().serviceLoadMetrics().get(0).primaryDefaultLoad());
- Assertions.assertEquals(1400063393, model.properties().serviceLoadMetrics().get(0).secondaryDefaultLoad());
- Assertions.assertEquals(935480812, model.properties().serviceLoadMetrics().get(0).defaultLoad());
- Assertions.assertEquals(MoveCost.MEDIUM, model.properties().defaultMoveCost());
- Assertions.assertEquals("q", model.properties().serviceTypeName());
- Assertions.assertEquals(ArmServicePackageActivationMode.EXCLUSIVE_PROCESS,
- model.properties().servicePackageActivationMode());
- Assertions.assertEquals("x", model.properties().serviceDnsName());
- Assertions.assertEquals("yxbaaabjyvayf", model.location());
- Assertions.assertEquals("rzrtuzqogsex", model.tags().get("evfdnwnwm"));
- }
-
- // Use "Map.of" if available
- @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/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServiceResourceListTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServiceResourceListTests.java
deleted file mode 100644
index 235e427b9946..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServiceResourceListTests.java
+++ /dev/null
@@ -1,136 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.fluent.models.ServiceResourceInner;
-import com.azure.resourcemanager.servicefabric.models.ArmServicePackageActivationMode;
-import com.azure.resourcemanager.servicefabric.models.MoveCost;
-import com.azure.resourcemanager.servicefabric.models.PartitionSchemeDescription;
-import com.azure.resourcemanager.servicefabric.models.ServiceCorrelationDescription;
-import com.azure.resourcemanager.servicefabric.models.ServiceCorrelationScheme;
-import com.azure.resourcemanager.servicefabric.models.ServiceLoadMetricDescription;
-import com.azure.resourcemanager.servicefabric.models.ServiceLoadMetricWeight;
-import com.azure.resourcemanager.servicefabric.models.ServicePlacementPolicyDescription;
-import com.azure.resourcemanager.servicefabric.models.ServiceResourceList;
-import com.azure.resourcemanager.servicefabric.models.ServiceResourceProperties;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class ServiceResourceListTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ServiceResourceList model = BinaryData.fromString(
- "{\"value\":[{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"koowtl\",\"serviceTypeName\":\"guxawqaldsyuuxi\",\"partitionDescription\":{\"partitionScheme\":\"PartitionSchemeDescription\"},\"servicePackageActivationMode\":\"SharedProcess\",\"serviceDnsName\":\"obwyznkb\",\"placementConstraints\":\"utwpfhp\",\"correlationScheme\":[{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"r\"}],\"serviceLoadMetrics\":[{\"name\":\"snfdsdoakgtdl\",\"weight\":\"High\",\"primaryDefaultLoad\":1323542271,\"secondaryDefaultLoad\":1591125890,\"defaultLoad\":973934778},{\"name\":\"ewpusdsttwvogvb\",\"weight\":\"Low\",\"primaryDefaultLoad\":1690092543,\"secondaryDefaultLoad\":764265895,\"defaultLoad\":963593520},{\"name\":\"m\",\"weight\":\"Low\",\"primaryDefaultLoad\":840228808,\"secondaryDefaultLoad\":127978460,\"defaultLoad\":328261823},{\"name\":\"rwr\",\"weight\":\"Medium\",\"primaryDefaultLoad\":739471239,\"secondaryDefaultLoad\":354795976,\"defaultLoad\":130436359}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicyDescription\"},{\"type\":\"ServicePlacementPolicyDescription\"}],\"defaultMoveCost\":\"Medium\"},\"location\":\"bminrfdwoyuhhzi\",\"tags\":{\"rmaequ\":\"fozbhdmsmlmzqhof\",\"icslfaoq\":\"ah\",\"kaivwit\":\"piyylhalnswhccsp\"},\"etag\":\"cywuggwol\",\"id\":\"czbwemhairsbr\",\"name\":\"z\",\"type\":\"wmsweypqwd\"},{\"properties\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"icccn\",\"serviceTypeName\":\"huexmk\",\"partitionDescription\":{\"partitionScheme\":\"PartitionSchemeDescription\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"vlz\",\"placementConstraints\":\"emhzrncsdtc\",\"correlationScheme\":[{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"ypbsfgytguslfead\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"gq\"}],\"serviceLoadMetrics\":[{\"name\":\"hejhzisx\",\"weight\":\"Low\",\"primaryDefaultLoad\":843863757,\"secondaryDefaultLoad\":196039433,\"defaultLoad\":517582343},{\"name\":\"vk\",\"weight\":\"High\",\"primaryDefaultLoad\":500405809,\"secondaryDefaultLoad\":900186733,\"defaultLoad\":653973034},{\"name\":\"aehtwd\",\"weight\":\"High\",\"primaryDefaultLoad\":1438579727,\"secondaryDefaultLoad\":767551661,\"defaultLoad\":1720208183}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicyDescription\"}],\"defaultMoveCost\":\"Zero\"},\"location\":\"h\",\"tags\":{\"c\":\"wpracstwitykhev\",\"jc\":\"edcpnmdyodnwzxl\",\"vvwxqi\":\"nhltiugcxn\"},\"etag\":\"qunyowxwlmdjr\",\"id\":\"fgbvfvpdbo\",\"name\":\"acizsjqlhkrr\",\"type\":\"bdeibqipqk\"}],\"nextLink\":\"vxndz\"}")
- .toObject(ServiceResourceList.class);
- Assertions.assertEquals("utwpfhp", model.value().get(0).properties().placementConstraints());
- Assertions.assertEquals(ServiceCorrelationScheme.ALIGNED_AFFINITY,
- model.value().get(0).properties().correlationScheme().get(0).scheme());
- Assertions.assertEquals("r", model.value().get(0).properties().correlationScheme().get(0).serviceName());
- Assertions.assertEquals("snfdsdoakgtdl", model.value().get(0).properties().serviceLoadMetrics().get(0).name());
- Assertions.assertEquals(ServiceLoadMetricWeight.HIGH,
- model.value().get(0).properties().serviceLoadMetrics().get(0).weight());
- Assertions.assertEquals(1323542271,
- model.value().get(0).properties().serviceLoadMetrics().get(0).primaryDefaultLoad());
- Assertions.assertEquals(1591125890,
- model.value().get(0).properties().serviceLoadMetrics().get(0).secondaryDefaultLoad());
- Assertions.assertEquals(973934778, model.value().get(0).properties().serviceLoadMetrics().get(0).defaultLoad());
- Assertions.assertEquals(MoveCost.MEDIUM, model.value().get(0).properties().defaultMoveCost());
- Assertions.assertEquals("guxawqaldsyuuxi", model.value().get(0).properties().serviceTypeName());
- Assertions.assertEquals(ArmServicePackageActivationMode.SHARED_PROCESS,
- model.value().get(0).properties().servicePackageActivationMode());
- Assertions.assertEquals("obwyznkb", model.value().get(0).properties().serviceDnsName());
- Assertions.assertEquals("bminrfdwoyuhhzi", model.value().get(0).location());
- Assertions.assertEquals("fozbhdmsmlmzqhof", model.value().get(0).tags().get("rmaequ"));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ServiceResourceList model = new ServiceResourceList().withValue(Arrays.asList(new ServiceResourceInner()
- .withProperties(new ServiceResourceProperties().withPlacementConstraints("utwpfhp")
- .withCorrelationScheme(Arrays.asList(new ServiceCorrelationDescription()
- .withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY).withServiceName("r")))
- .withServiceLoadMetrics(Arrays.asList(
- new ServiceLoadMetricDescription().withName("snfdsdoakgtdl")
- .withWeight(ServiceLoadMetricWeight.HIGH).withPrimaryDefaultLoad(1323542271)
- .withSecondaryDefaultLoad(1591125890).withDefaultLoad(973934778),
- new ServiceLoadMetricDescription().withName("ewpusdsttwvogvb")
- .withWeight(ServiceLoadMetricWeight.LOW).withPrimaryDefaultLoad(1690092543)
- .withSecondaryDefaultLoad(764265895).withDefaultLoad(963593520),
- new ServiceLoadMetricDescription().withName("m").withWeight(ServiceLoadMetricWeight.LOW)
- .withPrimaryDefaultLoad(840228808).withSecondaryDefaultLoad(127978460)
- .withDefaultLoad(328261823),
- new ServiceLoadMetricDescription().withName("rwr").withWeight(ServiceLoadMetricWeight.MEDIUM)
- .withPrimaryDefaultLoad(739471239).withSecondaryDefaultLoad(354795976)
- .withDefaultLoad(130436359)))
- .withServicePlacementPolicies(
- Arrays.asList(new ServicePlacementPolicyDescription(), new ServicePlacementPolicyDescription()))
- .withDefaultMoveCost(MoveCost.MEDIUM).withServiceTypeName("guxawqaldsyuuxi")
- .withPartitionDescription(
- new PartitionSchemeDescription())
- .withServicePackageActivationMode(ArmServicePackageActivationMode.SHARED_PROCESS)
- .withServiceDnsName("obwyznkb"))
- .withLocation("bminrfdwoyuhhzi")
- .withTags(mapOf("rmaequ", "fozbhdmsmlmzqhof", "icslfaoq", "ah", "kaivwit", "piyylhalnswhccsp")),
- new ServiceResourceInner()
- .withProperties(new ServiceResourceProperties().withPlacementConstraints("emhzrncsdtc")
- .withCorrelationScheme(Arrays.asList(
- new ServiceCorrelationDescription().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY)
- .withServiceName("ypbsfgytguslfead"),
- new ServiceCorrelationDescription().withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY)
- .withServiceName("gq")))
- .withServiceLoadMetrics(Arrays.asList(
- new ServiceLoadMetricDescription().withName("hejhzisx").withWeight(ServiceLoadMetricWeight.LOW)
- .withPrimaryDefaultLoad(843863757).withSecondaryDefaultLoad(196039433)
- .withDefaultLoad(517582343),
- new ServiceLoadMetricDescription().withName("vk").withWeight(ServiceLoadMetricWeight.HIGH)
- .withPrimaryDefaultLoad(500405809).withSecondaryDefaultLoad(900186733)
- .withDefaultLoad(653973034),
- new ServiceLoadMetricDescription().withName("aehtwd").withWeight(ServiceLoadMetricWeight.HIGH)
- .withPrimaryDefaultLoad(1438579727).withSecondaryDefaultLoad(767551661)
- .withDefaultLoad(1720208183)))
- .withServicePlacementPolicies(Arrays.asList(new ServicePlacementPolicyDescription()))
- .withDefaultMoveCost(MoveCost.ZERO).withServiceTypeName("huexmk")
- .withPartitionDescription(new PartitionSchemeDescription())
- .withServicePackageActivationMode(ArmServicePackageActivationMode.EXCLUSIVE_PROCESS)
- .withServiceDnsName("vlz"))
- .withLocation("h")
- .withTags(mapOf("c", "wpracstwitykhev", "jc", "edcpnmdyodnwzxl", "vvwxqi", "nhltiugcxn"))));
- model = BinaryData.fromObject(model).toObject(ServiceResourceList.class);
- Assertions.assertEquals("utwpfhp", model.value().get(0).properties().placementConstraints());
- Assertions.assertEquals(ServiceCorrelationScheme.ALIGNED_AFFINITY,
- model.value().get(0).properties().correlationScheme().get(0).scheme());
- Assertions.assertEquals("r", model.value().get(0).properties().correlationScheme().get(0).serviceName());
- Assertions.assertEquals("snfdsdoakgtdl", model.value().get(0).properties().serviceLoadMetrics().get(0).name());
- Assertions.assertEquals(ServiceLoadMetricWeight.HIGH,
- model.value().get(0).properties().serviceLoadMetrics().get(0).weight());
- Assertions.assertEquals(1323542271,
- model.value().get(0).properties().serviceLoadMetrics().get(0).primaryDefaultLoad());
- Assertions.assertEquals(1591125890,
- model.value().get(0).properties().serviceLoadMetrics().get(0).secondaryDefaultLoad());
- Assertions.assertEquals(973934778, model.value().get(0).properties().serviceLoadMetrics().get(0).defaultLoad());
- Assertions.assertEquals(MoveCost.MEDIUM, model.value().get(0).properties().defaultMoveCost());
- Assertions.assertEquals("guxawqaldsyuuxi", model.value().get(0).properties().serviceTypeName());
- Assertions.assertEquals(ArmServicePackageActivationMode.SHARED_PROCESS,
- model.value().get(0).properties().servicePackageActivationMode());
- Assertions.assertEquals("obwyznkb", model.value().get(0).properties().serviceDnsName());
- Assertions.assertEquals("bminrfdwoyuhhzi", model.value().get(0).location());
- Assertions.assertEquals("fozbhdmsmlmzqhof", model.value().get(0).tags().get("rmaequ"));
- }
-
- // Use "Map.of" if available
- @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/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServiceResourcePropertiesBaseTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServiceResourcePropertiesBaseTests.java
deleted file mode 100644
index 9d94a2922078..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServiceResourcePropertiesBaseTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.MoveCost;
-import com.azure.resourcemanager.servicefabric.models.ServiceCorrelationDescription;
-import com.azure.resourcemanager.servicefabric.models.ServiceCorrelationScheme;
-import com.azure.resourcemanager.servicefabric.models.ServiceLoadMetricDescription;
-import com.azure.resourcemanager.servicefabric.models.ServiceLoadMetricWeight;
-import com.azure.resourcemanager.servicefabric.models.ServicePlacementPolicyDescription;
-import com.azure.resourcemanager.servicefabric.models.ServiceResourcePropertiesBase;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class ServiceResourcePropertiesBaseTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ServiceResourcePropertiesBase model = BinaryData.fromString(
- "{\"placementConstraints\":\"lfoakg\",\"correlationScheme\":[{\"scheme\":\"Affinity\",\"serviceName\":\"agaowpulpqblylsy\"},{\"scheme\":\"Invalid\",\"serviceName\":\"qjnsjervtia\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"sdszue\"}],\"serviceLoadMetrics\":[{\"name\":\"bzkfzbeyvpn\",\"weight\":\"High\",\"primaryDefaultLoad\":1110186498,\"secondaryDefaultLoad\":242850063,\"defaultLoad\":887231612},{\"name\":\"jxdxrbuukz\",\"weight\":\"Low\",\"primaryDefaultLoad\":553106392,\"secondaryDefaultLoad\":1827391658,\"defaultLoad\":460922562}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicyDescription\"}],\"defaultMoveCost\":\"High\"}")
- .toObject(ServiceResourcePropertiesBase.class);
- Assertions.assertEquals("lfoakg", model.placementConstraints());
- Assertions.assertEquals(ServiceCorrelationScheme.AFFINITY, model.correlationScheme().get(0).scheme());
- Assertions.assertEquals("agaowpulpqblylsy", model.correlationScheme().get(0).serviceName());
- Assertions.assertEquals("bzkfzbeyvpn", model.serviceLoadMetrics().get(0).name());
- Assertions.assertEquals(ServiceLoadMetricWeight.HIGH, model.serviceLoadMetrics().get(0).weight());
- Assertions.assertEquals(1110186498, model.serviceLoadMetrics().get(0).primaryDefaultLoad());
- Assertions.assertEquals(242850063, model.serviceLoadMetrics().get(0).secondaryDefaultLoad());
- Assertions.assertEquals(887231612, model.serviceLoadMetrics().get(0).defaultLoad());
- Assertions.assertEquals(MoveCost.HIGH, model.defaultMoveCost());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ServiceResourcePropertiesBase model = new ServiceResourcePropertiesBase().withPlacementConstraints("lfoakg")
- .withCorrelationScheme(Arrays.asList(
- new ServiceCorrelationDescription().withScheme(ServiceCorrelationScheme.AFFINITY)
- .withServiceName("agaowpulpqblylsy"),
- new ServiceCorrelationDescription().withScheme(ServiceCorrelationScheme.INVALID)
- .withServiceName("qjnsjervtia"),
- new ServiceCorrelationDescription().withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY)
- .withServiceName("sdszue")))
- .withServiceLoadMetrics(Arrays.asList(
- new ServiceLoadMetricDescription().withName("bzkfzbeyvpn").withWeight(ServiceLoadMetricWeight.HIGH)
- .withPrimaryDefaultLoad(1110186498).withSecondaryDefaultLoad(242850063).withDefaultLoad(887231612),
- new ServiceLoadMetricDescription().withName("jxdxrbuukz").withWeight(ServiceLoadMetricWeight.LOW)
- .withPrimaryDefaultLoad(553106392).withSecondaryDefaultLoad(1827391658).withDefaultLoad(460922562)))
- .withServicePlacementPolicies(Arrays.asList(new ServicePlacementPolicyDescription()))
- .withDefaultMoveCost(MoveCost.HIGH);
- model = BinaryData.fromObject(model).toObject(ServiceResourcePropertiesBase.class);
- Assertions.assertEquals("lfoakg", model.placementConstraints());
- Assertions.assertEquals(ServiceCorrelationScheme.AFFINITY, model.correlationScheme().get(0).scheme());
- Assertions.assertEquals("agaowpulpqblylsy", model.correlationScheme().get(0).serviceName());
- Assertions.assertEquals("bzkfzbeyvpn", model.serviceLoadMetrics().get(0).name());
- Assertions.assertEquals(ServiceLoadMetricWeight.HIGH, model.serviceLoadMetrics().get(0).weight());
- Assertions.assertEquals(1110186498, model.serviceLoadMetrics().get(0).primaryDefaultLoad());
- Assertions.assertEquals(242850063, model.serviceLoadMetrics().get(0).secondaryDefaultLoad());
- Assertions.assertEquals(887231612, model.serviceLoadMetrics().get(0).defaultLoad());
- Assertions.assertEquals(MoveCost.HIGH, model.defaultMoveCost());
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServiceResourcePropertiesTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServiceResourcePropertiesTests.java
deleted file mode 100644
index 4f7897905817..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServiceResourcePropertiesTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.ArmServicePackageActivationMode;
-import com.azure.resourcemanager.servicefabric.models.MoveCost;
-import com.azure.resourcemanager.servicefabric.models.PartitionSchemeDescription;
-import com.azure.resourcemanager.servicefabric.models.ServiceCorrelationDescription;
-import com.azure.resourcemanager.servicefabric.models.ServiceCorrelationScheme;
-import com.azure.resourcemanager.servicefabric.models.ServiceLoadMetricDescription;
-import com.azure.resourcemanager.servicefabric.models.ServiceLoadMetricWeight;
-import com.azure.resourcemanager.servicefabric.models.ServicePlacementPolicyDescription;
-import com.azure.resourcemanager.servicefabric.models.ServiceResourceProperties;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class ServiceResourcePropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ServiceResourceProperties model = BinaryData.fromString(
- "{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"iilivpdtiirqtd\",\"serviceTypeName\":\"axoruzfgsquy\",\"partitionDescription\":{\"partitionScheme\":\"PartitionSchemeDescription\"},\"servicePackageActivationMode\":\"SharedProcess\",\"serviceDnsName\":\"l\",\"placementConstraints\":\"tramxjez\",\"correlationScheme\":[{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"wxuqlcvydypatdoo\"},{\"scheme\":\"Affinity\",\"serviceName\":\"jkniodko\"},{\"scheme\":\"Affinity\",\"serviceName\":\"bw\"}],\"serviceLoadMetrics\":[{\"name\":\"hemms\",\"weight\":\"Low\",\"primaryDefaultLoad\":145685509,\"secondaryDefaultLoad\":1224512622,\"defaultLoad\":1242300027},{\"name\":\"jinfw\",\"weight\":\"Low\",\"primaryDefaultLoad\":1139569570,\"secondaryDefaultLoad\":2134484633,\"defaultLoad\":1895840108}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicyDescription\"},{\"type\":\"ServicePlacementPolicyDescription\"}],\"defaultMoveCost\":\"Low\"}")
- .toObject(ServiceResourceProperties.class);
- Assertions.assertEquals("tramxjez", model.placementConstraints());
- Assertions.assertEquals(ServiceCorrelationScheme.ALIGNED_AFFINITY, model.correlationScheme().get(0).scheme());
- Assertions.assertEquals("wxuqlcvydypatdoo", model.correlationScheme().get(0).serviceName());
- Assertions.assertEquals("hemms", model.serviceLoadMetrics().get(0).name());
- Assertions.assertEquals(ServiceLoadMetricWeight.LOW, model.serviceLoadMetrics().get(0).weight());
- Assertions.assertEquals(145685509, model.serviceLoadMetrics().get(0).primaryDefaultLoad());
- Assertions.assertEquals(1224512622, model.serviceLoadMetrics().get(0).secondaryDefaultLoad());
- Assertions.assertEquals(1242300027, model.serviceLoadMetrics().get(0).defaultLoad());
- Assertions.assertEquals(MoveCost.LOW, model.defaultMoveCost());
- Assertions.assertEquals("axoruzfgsquy", model.serviceTypeName());
- Assertions.assertEquals(ArmServicePackageActivationMode.SHARED_PROCESS, model.servicePackageActivationMode());
- Assertions.assertEquals("l", model.serviceDnsName());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ServiceResourceProperties model = new ServiceResourceProperties().withPlacementConstraints("tramxjez")
- .withCorrelationScheme(Arrays.asList(
- new ServiceCorrelationDescription().withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY)
- .withServiceName("wxuqlcvydypatdoo"),
- new ServiceCorrelationDescription().withScheme(ServiceCorrelationScheme.AFFINITY)
- .withServiceName("jkniodko"),
- new ServiceCorrelationDescription().withScheme(ServiceCorrelationScheme.AFFINITY)
- .withServiceName("bw")))
- .withServiceLoadMetrics(Arrays.asList(
- new ServiceLoadMetricDescription().withName("hemms").withWeight(ServiceLoadMetricWeight.LOW)
- .withPrimaryDefaultLoad(145685509).withSecondaryDefaultLoad(1224512622).withDefaultLoad(1242300027),
- new ServiceLoadMetricDescription().withName("jinfw").withWeight(ServiceLoadMetricWeight.LOW)
- .withPrimaryDefaultLoad(1139569570).withSecondaryDefaultLoad(2134484633)
- .withDefaultLoad(1895840108)))
- .withServicePlacementPolicies(
- Arrays.asList(new ServicePlacementPolicyDescription(), new ServicePlacementPolicyDescription()))
- .withDefaultMoveCost(MoveCost.LOW).withServiceTypeName("axoruzfgsquy")
- .withPartitionDescription(new PartitionSchemeDescription())
- .withServicePackageActivationMode(ArmServicePackageActivationMode.SHARED_PROCESS).withServiceDnsName("l");
- model = BinaryData.fromObject(model).toObject(ServiceResourceProperties.class);
- Assertions.assertEquals("tramxjez", model.placementConstraints());
- Assertions.assertEquals(ServiceCorrelationScheme.ALIGNED_AFFINITY, model.correlationScheme().get(0).scheme());
- Assertions.assertEquals("wxuqlcvydypatdoo", model.correlationScheme().get(0).serviceName());
- Assertions.assertEquals("hemms", model.serviceLoadMetrics().get(0).name());
- Assertions.assertEquals(ServiceLoadMetricWeight.LOW, model.serviceLoadMetrics().get(0).weight());
- Assertions.assertEquals(145685509, model.serviceLoadMetrics().get(0).primaryDefaultLoad());
- Assertions.assertEquals(1224512622, model.serviceLoadMetrics().get(0).secondaryDefaultLoad());
- Assertions.assertEquals(1242300027, model.serviceLoadMetrics().get(0).defaultLoad());
- Assertions.assertEquals(MoveCost.LOW, model.defaultMoveCost());
- Assertions.assertEquals("axoruzfgsquy", model.serviceTypeName());
- Assertions.assertEquals(ArmServicePackageActivationMode.SHARED_PROCESS, model.servicePackageActivationMode());
- Assertions.assertEquals("l", model.serviceDnsName());
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServiceResourceUpdatePropertiesTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServiceResourceUpdatePropertiesTests.java
deleted file mode 100644
index 8d67ba2b6423..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServiceResourceUpdatePropertiesTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.MoveCost;
-import com.azure.resourcemanager.servicefabric.models.ServiceCorrelationDescription;
-import com.azure.resourcemanager.servicefabric.models.ServiceCorrelationScheme;
-import com.azure.resourcemanager.servicefabric.models.ServiceLoadMetricDescription;
-import com.azure.resourcemanager.servicefabric.models.ServiceLoadMetricWeight;
-import com.azure.resourcemanager.servicefabric.models.ServicePlacementPolicyDescription;
-import com.azure.resourcemanager.servicefabric.models.ServiceResourceUpdateProperties;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class ServiceResourceUpdatePropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ServiceResourceUpdateProperties model = BinaryData.fromString(
- "{\"serviceKind\":\"ServiceResourceUpdateProperties\",\"placementConstraints\":\"ujmqlgkfbtndoa\",\"correlationScheme\":[{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"jcntuj\"},{\"scheme\":\"Invalid\",\"serviceName\":\"c\"},{\"scheme\":\"Invalid\",\"serviceName\":\"df\"},{\"scheme\":\"Invalid\",\"serviceName\":\"waezkojvd\"}],\"serviceLoadMetrics\":[{\"name\":\"foqouicybx\",\"weight\":\"Zero\",\"primaryDefaultLoad\":1685402148,\"secondaryDefaultLoad\":1273142830,\"defaultLoad\":1813944379},{\"name\":\"x\",\"weight\":\"Zero\",\"primaryDefaultLoad\":153808073,\"secondaryDefaultLoad\":1015925448,\"defaultLoad\":1109207713},{\"name\":\"mciodhkhazxkhn\",\"weight\":\"Medium\",\"primaryDefaultLoad\":1895789611,\"secondaryDefaultLoad\":959916144,\"defaultLoad\":332286671},{\"name\":\"egokdwbwhkszzcmr\",\"weight\":\"High\",\"primaryDefaultLoad\":648975494,\"secondaryDefaultLoad\":465027307,\"defaultLoad\":1159944878}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicyDescription\"},{\"type\":\"ServicePlacementPolicyDescription\"},{\"type\":\"ServicePlacementPolicyDescription\"}],\"defaultMoveCost\":\"Zero\"}")
- .toObject(ServiceResourceUpdateProperties.class);
- Assertions.assertEquals("ujmqlgkfbtndoa", model.placementConstraints());
- Assertions.assertEquals(ServiceCorrelationScheme.ALIGNED_AFFINITY, model.correlationScheme().get(0).scheme());
- Assertions.assertEquals("jcntuj", model.correlationScheme().get(0).serviceName());
- Assertions.assertEquals("foqouicybx", model.serviceLoadMetrics().get(0).name());
- Assertions.assertEquals(ServiceLoadMetricWeight.ZERO, model.serviceLoadMetrics().get(0).weight());
- Assertions.assertEquals(1685402148, model.serviceLoadMetrics().get(0).primaryDefaultLoad());
- Assertions.assertEquals(1273142830, model.serviceLoadMetrics().get(0).secondaryDefaultLoad());
- Assertions.assertEquals(1813944379, model.serviceLoadMetrics().get(0).defaultLoad());
- Assertions.assertEquals(MoveCost.ZERO, model.defaultMoveCost());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ServiceResourceUpdateProperties model = new ServiceResourceUpdateProperties()
- .withPlacementConstraints("ujmqlgkfbtndoa")
- .withCorrelationScheme(Arrays.asList(
- new ServiceCorrelationDescription().withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY)
- .withServiceName("jcntuj"),
- new ServiceCorrelationDescription().withScheme(ServiceCorrelationScheme.INVALID).withServiceName("c"),
- new ServiceCorrelationDescription().withScheme(ServiceCorrelationScheme.INVALID).withServiceName("df"),
- new ServiceCorrelationDescription().withScheme(ServiceCorrelationScheme.INVALID)
- .withServiceName("waezkojvd")))
- .withServiceLoadMetrics(Arrays.asList(
- new ServiceLoadMetricDescription().withName("foqouicybx").withWeight(ServiceLoadMetricWeight.ZERO)
- .withPrimaryDefaultLoad(1685402148).withSecondaryDefaultLoad(1273142830)
- .withDefaultLoad(1813944379),
- new ServiceLoadMetricDescription().withName("x").withWeight(ServiceLoadMetricWeight.ZERO)
- .withPrimaryDefaultLoad(153808073).withSecondaryDefaultLoad(1015925448).withDefaultLoad(1109207713),
- new ServiceLoadMetricDescription().withName("mciodhkhazxkhn").withWeight(ServiceLoadMetricWeight.MEDIUM)
- .withPrimaryDefaultLoad(1895789611).withSecondaryDefaultLoad(959916144).withDefaultLoad(332286671),
- new ServiceLoadMetricDescription().withName("egokdwbwhkszzcmr").withWeight(ServiceLoadMetricWeight.HIGH)
- .withPrimaryDefaultLoad(648975494).withSecondaryDefaultLoad(465027307).withDefaultLoad(1159944878)))
- .withServicePlacementPolicies(Arrays.asList(new ServicePlacementPolicyDescription(),
- new ServicePlacementPolicyDescription(), new ServicePlacementPolicyDescription()))
- .withDefaultMoveCost(MoveCost.ZERO);
- model = BinaryData.fromObject(model).toObject(ServiceResourceUpdateProperties.class);
- Assertions.assertEquals("ujmqlgkfbtndoa", model.placementConstraints());
- Assertions.assertEquals(ServiceCorrelationScheme.ALIGNED_AFFINITY, model.correlationScheme().get(0).scheme());
- Assertions.assertEquals("jcntuj", model.correlationScheme().get(0).serviceName());
- Assertions.assertEquals("foqouicybx", model.serviceLoadMetrics().get(0).name());
- Assertions.assertEquals(ServiceLoadMetricWeight.ZERO, model.serviceLoadMetrics().get(0).weight());
- Assertions.assertEquals(1685402148, model.serviceLoadMetrics().get(0).primaryDefaultLoad());
- Assertions.assertEquals(1273142830, model.serviceLoadMetrics().get(0).secondaryDefaultLoad());
- Assertions.assertEquals(1813944379, model.serviceLoadMetrics().get(0).defaultLoad());
- Assertions.assertEquals(MoveCost.ZERO, model.defaultMoveCost());
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServiceResourceUpdateTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServiceResourceUpdateTests.java
deleted file mode 100644
index 1041d6e3f68f..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServiceResourceUpdateTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.MoveCost;
-import com.azure.resourcemanager.servicefabric.models.ServiceCorrelationDescription;
-import com.azure.resourcemanager.servicefabric.models.ServiceCorrelationScheme;
-import com.azure.resourcemanager.servicefabric.models.ServiceLoadMetricDescription;
-import com.azure.resourcemanager.servicefabric.models.ServiceLoadMetricWeight;
-import com.azure.resourcemanager.servicefabric.models.ServicePlacementPolicyDescription;
-import com.azure.resourcemanager.servicefabric.models.ServiceResourceUpdate;
-import com.azure.resourcemanager.servicefabric.models.ServiceResourceUpdateProperties;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-import org.junit.jupiter.api.Assertions;
-
-public final class ServiceResourceUpdateTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ServiceResourceUpdate model = BinaryData.fromString(
- "{\"properties\":{\"serviceKind\":\"ServiceResourceUpdateProperties\",\"placementConstraints\":\"priolx\",\"correlationScheme\":[{\"scheme\":\"Affinity\",\"serviceName\":\"lt\"},{\"scheme\":\"Affinity\",\"serviceName\":\"mncwsobqwcsdb\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"dcfhucqdpf\"}],\"serviceLoadMetrics\":[{\"name\":\"lsbjjcanvxbv\",\"weight\":\"Low\",\"primaryDefaultLoad\":1741162391,\"secondaryDefaultLoad\":1347837415,\"defaultLoad\":1940918804},{\"name\":\"rmrlxqtvcof\",\"weight\":\"Zero\",\"primaryDefaultLoad\":573023383,\"secondaryDefaultLoad\":360831817,\"defaultLoad\":264333959}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicyDescription\"},{\"type\":\"ServicePlacementPolicyDescription\"}],\"defaultMoveCost\":\"Medium\"},\"location\":\"nqvsaznqnto\",\"tags\":{\"uwjuetaeburuvdmo\":\"sgsahmkycgr\"},\"etag\":\"mz\",\"id\":\"wabm\",\"name\":\"oefki\",\"type\":\"rvtp\"}")
- .toObject(ServiceResourceUpdate.class);
- Assertions.assertEquals("priolx", model.properties().placementConstraints());
- Assertions.assertEquals(ServiceCorrelationScheme.AFFINITY,
- model.properties().correlationScheme().get(0).scheme());
- Assertions.assertEquals("lt", model.properties().correlationScheme().get(0).serviceName());
- Assertions.assertEquals("lsbjjcanvxbv", model.properties().serviceLoadMetrics().get(0).name());
- Assertions.assertEquals(ServiceLoadMetricWeight.LOW, model.properties().serviceLoadMetrics().get(0).weight());
- Assertions.assertEquals(1741162391, model.properties().serviceLoadMetrics().get(0).primaryDefaultLoad());
- Assertions.assertEquals(1347837415, model.properties().serviceLoadMetrics().get(0).secondaryDefaultLoad());
- Assertions.assertEquals(1940918804, model.properties().serviceLoadMetrics().get(0).defaultLoad());
- Assertions.assertEquals(MoveCost.MEDIUM, model.properties().defaultMoveCost());
- Assertions.assertEquals("nqvsaznqnto", model.location());
- Assertions.assertEquals("sgsahmkycgr", model.tags().get("uwjuetaeburuvdmo"));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ServiceResourceUpdate model = new ServiceResourceUpdate().withProperties(new ServiceResourceUpdateProperties()
- .withPlacementConstraints("priolx")
- .withCorrelationScheme(Arrays.asList(
- new ServiceCorrelationDescription().withScheme(ServiceCorrelationScheme.AFFINITY).withServiceName("lt"),
- new ServiceCorrelationDescription().withScheme(ServiceCorrelationScheme.AFFINITY)
- .withServiceName("mncwsobqwcsdb"),
- new ServiceCorrelationDescription().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY)
- .withServiceName("dcfhucqdpf")))
- .withServiceLoadMetrics(Arrays.asList(
- new ServiceLoadMetricDescription().withName("lsbjjcanvxbv").withWeight(ServiceLoadMetricWeight.LOW)
- .withPrimaryDefaultLoad(1741162391).withSecondaryDefaultLoad(1347837415)
- .withDefaultLoad(1940918804),
- new ServiceLoadMetricDescription().withName("rmrlxqtvcof").withWeight(ServiceLoadMetricWeight.ZERO)
- .withPrimaryDefaultLoad(573023383).withSecondaryDefaultLoad(360831817).withDefaultLoad(264333959)))
- .withServicePlacementPolicies(
- Arrays.asList(new ServicePlacementPolicyDescription(), new ServicePlacementPolicyDescription()))
- .withDefaultMoveCost(MoveCost.MEDIUM)).withLocation("nqvsaznqnto")
- .withTags(mapOf("uwjuetaeburuvdmo", "sgsahmkycgr"));
- model = BinaryData.fromObject(model).toObject(ServiceResourceUpdate.class);
- Assertions.assertEquals("priolx", model.properties().placementConstraints());
- Assertions.assertEquals(ServiceCorrelationScheme.AFFINITY,
- model.properties().correlationScheme().get(0).scheme());
- Assertions.assertEquals("lt", model.properties().correlationScheme().get(0).serviceName());
- Assertions.assertEquals("lsbjjcanvxbv", model.properties().serviceLoadMetrics().get(0).name());
- Assertions.assertEquals(ServiceLoadMetricWeight.LOW, model.properties().serviceLoadMetrics().get(0).weight());
- Assertions.assertEquals(1741162391, model.properties().serviceLoadMetrics().get(0).primaryDefaultLoad());
- Assertions.assertEquals(1347837415, model.properties().serviceLoadMetrics().get(0).secondaryDefaultLoad());
- Assertions.assertEquals(1940918804, model.properties().serviceLoadMetrics().get(0).defaultLoad());
- Assertions.assertEquals(MoveCost.MEDIUM, model.properties().defaultMoveCost());
- Assertions.assertEquals("nqvsaznqnto", model.location());
- Assertions.assertEquals("sgsahmkycgr", model.tags().get("uwjuetaeburuvdmo"));
- }
-
- // Use "Map.of" if available
- @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/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServiceTypeDeltaHealthPolicyTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServiceTypeDeltaHealthPolicyTests.java
deleted file mode 100644
index 963999f7d319..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServiceTypeDeltaHealthPolicyTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.ServiceTypeDeltaHealthPolicy;
-import org.junit.jupiter.api.Assertions;
-
-public final class ServiceTypeDeltaHealthPolicyTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ServiceTypeDeltaHealthPolicy model = BinaryData.fromString("{\"maxPercentDeltaUnhealthyServices\":1475325470}")
- .toObject(ServiceTypeDeltaHealthPolicy.class);
- Assertions.assertEquals(1475325470, model.maxPercentDeltaUnhealthyServices());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ServiceTypeDeltaHealthPolicy model
- = new ServiceTypeDeltaHealthPolicy().withMaxPercentDeltaUnhealthyServices(1475325470);
- model = BinaryData.fromObject(model).toObject(ServiceTypeDeltaHealthPolicy.class);
- Assertions.assertEquals(1475325470, model.maxPercentDeltaUnhealthyServices());
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServiceTypeHealthPolicyTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServiceTypeHealthPolicyTests.java
deleted file mode 100644
index a1ad5d9eb495..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServiceTypeHealthPolicyTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.ServiceTypeHealthPolicy;
-import org.junit.jupiter.api.Assertions;
-
-public final class ServiceTypeHealthPolicyTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- ServiceTypeHealthPolicy model = BinaryData.fromString("{\"maxPercentUnhealthyServices\":1218196264}")
- .toObject(ServiceTypeHealthPolicy.class);
- Assertions.assertEquals(1218196264, model.maxPercentUnhealthyServices());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- ServiceTypeHealthPolicy model = new ServiceTypeHealthPolicy().withMaxPercentUnhealthyServices(1218196264);
- model = BinaryData.fromObject(model).toObject(ServiceTypeHealthPolicy.class);
- Assertions.assertEquals(1218196264, model.maxPercentUnhealthyServices());
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServicesGetWithResponseMockTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServicesGetWithResponseMockTests.java
deleted file mode 100644
index d847648267ef..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServicesGetWithResponseMockTests.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.servicefabric.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.servicefabric.ServiceFabricManager;
-import com.azure.resourcemanager.servicefabric.models.ArmServicePackageActivationMode;
-import com.azure.resourcemanager.servicefabric.models.MoveCost;
-import com.azure.resourcemanager.servicefabric.models.ServiceCorrelationScheme;
-import com.azure.resourcemanager.servicefabric.models.ServiceLoadMetricWeight;
-import com.azure.resourcemanager.servicefabric.models.ServiceResource;
-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 ServicesGetWithResponseMockTests {
- @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\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"rqzz\",\"serviceTypeName\":\"jvpglydzgk\",\"partitionDescription\":{\"partitionScheme\":\"PartitionSchemeDescription\"},\"servicePackageActivationMode\":\"SharedProcess\",\"serviceDnsName\":\"vtoepryutnw\",\"placementConstraints\":\"pzdm\",\"correlationScheme\":[{\"scheme\":\"Invalid\",\"serviceName\":\"fvaawzqa\"},{\"scheme\":\"Invalid\",\"serviceName\":\"lgzurig\"}],\"serviceLoadMetrics\":[{\"name\":\"cx\",\"weight\":\"Zero\",\"primaryDefaultLoad\":1221508981,\"secondaryDefaultLoad\":1691117977,\"defaultLoad\":675680646}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicyDescription\"},{\"type\":\"ServicePlacementPolicyDescription\"},{\"type\":\"ServicePlacementPolicyDescription\"}],\"defaultMoveCost\":\"Low\"},\"location\":\"mldgxobfirc\",\"tags\":{\"khyawfvjlboxqv\":\"kciayzri\"},\"etag\":\"lmxhomdyn\",\"id\":\"wdigumbnraauz\",\"name\":\"p\",\"type\":\"jazysdzhezwwvaiq\"}";
-
- 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);
- }));
-
- ServiceFabricManager manager = ServiceFabricManager.configure().withHttpClient(httpClient).authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- ServiceResource response = manager.services()
- .getWithResponse("apeewchpxlkt", "kuziycsle", "ufuztcktyhjtq", "dcgzul", com.azure.core.util.Context.NONE)
- .getValue();
-
- Assertions.assertEquals("pzdm", response.properties().placementConstraints());
- Assertions.assertEquals(ServiceCorrelationScheme.INVALID,
- response.properties().correlationScheme().get(0).scheme());
- Assertions.assertEquals("fvaawzqa", response.properties().correlationScheme().get(0).serviceName());
- Assertions.assertEquals("cx", response.properties().serviceLoadMetrics().get(0).name());
- Assertions.assertEquals(ServiceLoadMetricWeight.ZERO,
- response.properties().serviceLoadMetrics().get(0).weight());
- Assertions.assertEquals(1221508981, response.properties().serviceLoadMetrics().get(0).primaryDefaultLoad());
- Assertions.assertEquals(1691117977, response.properties().serviceLoadMetrics().get(0).secondaryDefaultLoad());
- Assertions.assertEquals(675680646, response.properties().serviceLoadMetrics().get(0).defaultLoad());
- Assertions.assertEquals(MoveCost.LOW, response.properties().defaultMoveCost());
- Assertions.assertEquals("jvpglydzgk", response.properties().serviceTypeName());
- Assertions.assertEquals(ArmServicePackageActivationMode.SHARED_PROCESS,
- response.properties().servicePackageActivationMode());
- Assertions.assertEquals("vtoepryutnw", response.properties().serviceDnsName());
- Assertions.assertEquals("mldgxobfirc", response.location());
- Assertions.assertEquals("kciayzri", response.tags().get("khyawfvjlboxqv"));
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServicesListMockTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServicesListMockTests.java
deleted file mode 100644
index c9092581cc4d..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/ServicesListMockTests.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.servicefabric.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.servicefabric.ServiceFabricManager;
-import com.azure.resourcemanager.servicefabric.models.ArmServicePackageActivationMode;
-import com.azure.resourcemanager.servicefabric.models.MoveCost;
-import com.azure.resourcemanager.servicefabric.models.ServiceCorrelationScheme;
-import com.azure.resourcemanager.servicefabric.models.ServiceLoadMetricWeight;
-import com.azure.resourcemanager.servicefabric.models.ServiceResource;
-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 ServicesListMockTests {
- @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\":{\"serviceKind\":\"ServiceResourceProperties\",\"provisioningState\":\"uwmncs\",\"serviceTypeName\":\"ijf\",\"partitionDescription\":{\"partitionScheme\":\"PartitionSchemeDescription\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"ekrsgs\",\"placementConstraints\":\"dhuzqgnjdgk\",\"correlationScheme\":[{\"scheme\":\"Invalid\",\"serviceName\":\"liqhzvhx\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"omtkub\"}],\"serviceLoadMetrics\":[{\"name\":\"pnvdxz\",\"weight\":\"Medium\",\"primaryDefaultLoad\":1207165403,\"secondaryDefaultLoad\":670431250,\"defaultLoad\":589968603},{\"name\":\"evqagtl\",\"weight\":\"Medium\",\"primaryDefaultLoad\":1706986082,\"secondaryDefaultLoad\":1272275597,\"defaultLoad\":2094473580}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicyDescription\"},{\"type\":\"ServicePlacementPolicyDescription\"},{\"type\":\"ServicePlacementPolicyDescription\"},{\"type\":\"ServicePlacementPolicyDescription\"}],\"defaultMoveCost\":\"High\"},\"location\":\"trdcnifmzzs\",\"tags\":{\"suxmpraf\":\"brn\"},\"etag\":\"ckh\",\"id\":\"xvd\",\"name\":\"ffwafq\",\"type\":\"oudaspavehhrvk\"}]}";
-
- 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);
- }));
-
- ServiceFabricManager manager = ServiceFabricManager.configure().withHttpClient(httpClient).authenticate(
- tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)),
- new AzureProfile("", "", AzureEnvironment.AZURE));
-
- PagedIterable response
- = manager.services().list("uvvfonkp", "hqyikvy", "auy", com.azure.core.util.Context.NONE);
-
- Assertions.assertEquals("dhuzqgnjdgk", response.iterator().next().properties().placementConstraints());
- Assertions.assertEquals(ServiceCorrelationScheme.INVALID,
- response.iterator().next().properties().correlationScheme().get(0).scheme());
- Assertions.assertEquals("liqhzvhx",
- response.iterator().next().properties().correlationScheme().get(0).serviceName());
- Assertions.assertEquals("pnvdxz", response.iterator().next().properties().serviceLoadMetrics().get(0).name());
- Assertions.assertEquals(ServiceLoadMetricWeight.MEDIUM,
- response.iterator().next().properties().serviceLoadMetrics().get(0).weight());
- Assertions.assertEquals(1207165403,
- response.iterator().next().properties().serviceLoadMetrics().get(0).primaryDefaultLoad());
- Assertions.assertEquals(670431250,
- response.iterator().next().properties().serviceLoadMetrics().get(0).secondaryDefaultLoad());
- Assertions.assertEquals(589968603,
- response.iterator().next().properties().serviceLoadMetrics().get(0).defaultLoad());
- Assertions.assertEquals(MoveCost.HIGH, response.iterator().next().properties().defaultMoveCost());
- Assertions.assertEquals("ijf", response.iterator().next().properties().serviceTypeName());
- Assertions.assertEquals(ArmServicePackageActivationMode.EXCLUSIVE_PROCESS,
- response.iterator().next().properties().servicePackageActivationMode());
- Assertions.assertEquals("ekrsgs", response.iterator().next().properties().serviceDnsName());
- Assertions.assertEquals("trdcnifmzzs", response.iterator().next().location());
- Assertions.assertEquals("brn", response.iterator().next().tags().get("suxmpraf"));
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/SettingsParameterDescriptionTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/SettingsParameterDescriptionTests.java
deleted file mode 100644
index a3e7ee761567..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/SettingsParameterDescriptionTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.SettingsParameterDescription;
-import org.junit.jupiter.api.Assertions;
-
-public final class SettingsParameterDescriptionTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- SettingsParameterDescription model = BinaryData.fromString("{\"name\":\"xzdxtayrlhmwh\",\"value\":\"pmrqobm\"}")
- .toObject(SettingsParameterDescription.class);
- Assertions.assertEquals("xzdxtayrlhmwh", model.name());
- Assertions.assertEquals("pmrqobm", model.value());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- SettingsParameterDescription model
- = new SettingsParameterDescription().withName("xzdxtayrlhmwh").withValue("pmrqobm");
- model = BinaryData.fromObject(model).toObject(SettingsParameterDescription.class);
- Assertions.assertEquals("xzdxtayrlhmwh", model.name());
- Assertions.assertEquals("pmrqobm", model.value());
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/SettingsSectionDescriptionTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/SettingsSectionDescriptionTests.java
deleted file mode 100644
index ee13c5746be8..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/SettingsSectionDescriptionTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.SettingsParameterDescription;
-import com.azure.resourcemanager.servicefabric.models.SettingsSectionDescription;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class SettingsSectionDescriptionTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- SettingsSectionDescription model = BinaryData.fromString(
- "{\"name\":\"jzyflu\",\"parameters\":[{\"name\":\"rh\",\"value\":\"ofcqhsm\"},{\"name\":\"urkdtmlx\",\"value\":\"ekuksjtx\"},{\"name\":\"kc\",\"value\":\"mparcryuanzw\"}]}")
- .toObject(SettingsSectionDescription.class);
- Assertions.assertEquals("jzyflu", model.name());
- Assertions.assertEquals("rh", model.parameters().get(0).name());
- Assertions.assertEquals("ofcqhsm", model.parameters().get(0).value());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- SettingsSectionDescription model = new SettingsSectionDescription().withName("jzyflu")
- .withParameters(Arrays.asList(new SettingsParameterDescription().withName("rh").withValue("ofcqhsm"),
- new SettingsParameterDescription().withName("urkdtmlx").withValue("ekuksjtx"),
- new SettingsParameterDescription().withName("kc").withValue("mparcryuanzw")));
- model = BinaryData.fromObject(model).toObject(SettingsSectionDescription.class);
- Assertions.assertEquals("jzyflu", model.name());
- Assertions.assertEquals("rh", model.parameters().get(0).name());
- Assertions.assertEquals("ofcqhsm", model.parameters().get(0).value());
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/SingletonPartitionSchemeDescriptionTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/SingletonPartitionSchemeDescriptionTests.java
deleted file mode 100644
index 0442826727e3..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/SingletonPartitionSchemeDescriptionTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.SingletonPartitionSchemeDescription;
-
-public final class SingletonPartitionSchemeDescriptionTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- SingletonPartitionSchemeDescription model = BinaryData.fromString("{\"partitionScheme\":\"Singleton\"}")
- .toObject(SingletonPartitionSchemeDescription.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- SingletonPartitionSchemeDescription model = new SingletonPartitionSchemeDescription();
- model = BinaryData.fromObject(model).toObject(SingletonPartitionSchemeDescription.class);
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/StatefulServicePropertiesTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/StatefulServicePropertiesTests.java
deleted file mode 100644
index a97e4030e297..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/StatefulServicePropertiesTests.java
+++ /dev/null
@@ -1,96 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.ArmServicePackageActivationMode;
-import com.azure.resourcemanager.servicefabric.models.MoveCost;
-import com.azure.resourcemanager.servicefabric.models.PartitionSchemeDescription;
-import com.azure.resourcemanager.servicefabric.models.ServiceCorrelationDescription;
-import com.azure.resourcemanager.servicefabric.models.ServiceCorrelationScheme;
-import com.azure.resourcemanager.servicefabric.models.ServiceLoadMetricDescription;
-import com.azure.resourcemanager.servicefabric.models.ServiceLoadMetricWeight;
-import com.azure.resourcemanager.servicefabric.models.ServicePlacementPolicyDescription;
-import com.azure.resourcemanager.servicefabric.models.StatefulServiceProperties;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class StatefulServicePropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- StatefulServiceProperties model = BinaryData.fromString(
- "{\"serviceKind\":\"Stateful\",\"hasPersistedState\":true,\"targetReplicaSetSize\":1117462910,\"minReplicaSetSize\":394204922,\"replicaRestartWaitDuration\":\"2021-08-30T01:40:48Z\",\"quorumLossWaitDuration\":\"2021-03-14T13:52:20Z\",\"standByReplicaKeepDuration\":\"2021-09-22T23:43:14Z\",\"provisioningState\":\"ystawfsdjpvkvp\",\"serviceTypeName\":\"xbkzbzkdvncj\",\"partitionDescription\":{\"partitionScheme\":\"PartitionSchemeDescription\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"r\",\"placementConstraints\":\"akmokzhjjklf\",\"correlationScheme\":[{\"scheme\":\"Invalid\",\"serviceName\":\"uwqlgzrfzeey\"},{\"scheme\":\"AlignedAffinity\",\"serviceName\":\"izikayuhq\"},{\"scheme\":\"Affinity\",\"serviceName\":\"jbsybbqw\"},{\"scheme\":\"NonAlignedAffinity\",\"serviceName\":\"t\"}],\"serviceLoadMetrics\":[{\"name\":\"mfpgv\",\"weight\":\"High\",\"primaryDefaultLoad\":299337354,\"secondaryDefaultLoad\":1000390440,\"defaultLoad\":753407395},{\"name\":\"aqfxss\",\"weight\":\"Zero\",\"primaryDefaultLoad\":1174161651,\"secondaryDefaultLoad\":1781178234,\"defaultLoad\":1417218644}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicyDescription\"},{\"type\":\"ServicePlacementPolicyDescription\"}],\"defaultMoveCost\":\"Medium\"}")
- .toObject(StatefulServiceProperties.class);
- Assertions.assertEquals("akmokzhjjklf", model.placementConstraints());
- Assertions.assertEquals(ServiceCorrelationScheme.INVALID, model.correlationScheme().get(0).scheme());
- Assertions.assertEquals("uwqlgzrfzeey", model.correlationScheme().get(0).serviceName());
- Assertions.assertEquals("mfpgv", model.serviceLoadMetrics().get(0).name());
- Assertions.assertEquals(ServiceLoadMetricWeight.HIGH, model.serviceLoadMetrics().get(0).weight());
- Assertions.assertEquals(299337354, model.serviceLoadMetrics().get(0).primaryDefaultLoad());
- Assertions.assertEquals(1000390440, model.serviceLoadMetrics().get(0).secondaryDefaultLoad());
- Assertions.assertEquals(753407395, model.serviceLoadMetrics().get(0).defaultLoad());
- Assertions.assertEquals(MoveCost.MEDIUM, model.defaultMoveCost());
- Assertions.assertEquals("xbkzbzkdvncj", model.serviceTypeName());
- Assertions.assertEquals(ArmServicePackageActivationMode.EXCLUSIVE_PROCESS,
- model.servicePackageActivationMode());
- Assertions.assertEquals("r", model.serviceDnsName());
- Assertions.assertEquals(true, model.hasPersistedState());
- Assertions.assertEquals(1117462910, model.targetReplicaSetSize());
- Assertions.assertEquals(394204922, model.minReplicaSetSize());
- Assertions.assertEquals(OffsetDateTime.parse("2021-08-30T01:40:48Z"), model.replicaRestartWaitDuration());
- Assertions.assertEquals(OffsetDateTime.parse("2021-03-14T13:52:20Z"), model.quorumLossWaitDuration());
- Assertions.assertEquals(OffsetDateTime.parse("2021-09-22T23:43:14Z"), model.standByReplicaKeepDuration());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- StatefulServiceProperties model = new StatefulServiceProperties().withPlacementConstraints("akmokzhjjklf")
- .withCorrelationScheme(Arrays.asList(
- new ServiceCorrelationDescription().withScheme(ServiceCorrelationScheme.INVALID)
- .withServiceName("uwqlgzrfzeey"),
- new ServiceCorrelationDescription().withScheme(ServiceCorrelationScheme.ALIGNED_AFFINITY)
- .withServiceName("izikayuhq"),
- new ServiceCorrelationDescription().withScheme(ServiceCorrelationScheme.AFFINITY)
- .withServiceName("jbsybbqw"),
- new ServiceCorrelationDescription().withScheme(ServiceCorrelationScheme.NON_ALIGNED_AFFINITY)
- .withServiceName("t")))
- .withServiceLoadMetrics(Arrays.asList(
- new ServiceLoadMetricDescription().withName("mfpgv").withWeight(ServiceLoadMetricWeight.HIGH)
- .withPrimaryDefaultLoad(299337354).withSecondaryDefaultLoad(1000390440).withDefaultLoad(753407395),
- new ServiceLoadMetricDescription().withName("aqfxss").withWeight(ServiceLoadMetricWeight.ZERO)
- .withPrimaryDefaultLoad(1174161651).withSecondaryDefaultLoad(1781178234)
- .withDefaultLoad(1417218644)))
- .withServicePlacementPolicies(
- Arrays.asList(new ServicePlacementPolicyDescription(), new ServicePlacementPolicyDescription()))
- .withDefaultMoveCost(MoveCost.MEDIUM).withServiceTypeName("xbkzbzkdvncj")
- .withPartitionDescription(new PartitionSchemeDescription())
- .withServicePackageActivationMode(ArmServicePackageActivationMode.EXCLUSIVE_PROCESS).withServiceDnsName("r")
- .withHasPersistedState(true).withTargetReplicaSetSize(1117462910).withMinReplicaSetSize(394204922)
- .withReplicaRestartWaitDuration(OffsetDateTime.parse("2021-08-30T01:40:48Z"))
- .withQuorumLossWaitDuration(OffsetDateTime.parse("2021-03-14T13:52:20Z"))
- .withStandByReplicaKeepDuration(OffsetDateTime.parse("2021-09-22T23:43:14Z"));
- model = BinaryData.fromObject(model).toObject(StatefulServiceProperties.class);
- Assertions.assertEquals("akmokzhjjklf", model.placementConstraints());
- Assertions.assertEquals(ServiceCorrelationScheme.INVALID, model.correlationScheme().get(0).scheme());
- Assertions.assertEquals("uwqlgzrfzeey", model.correlationScheme().get(0).serviceName());
- Assertions.assertEquals("mfpgv", model.serviceLoadMetrics().get(0).name());
- Assertions.assertEquals(ServiceLoadMetricWeight.HIGH, model.serviceLoadMetrics().get(0).weight());
- Assertions.assertEquals(299337354, model.serviceLoadMetrics().get(0).primaryDefaultLoad());
- Assertions.assertEquals(1000390440, model.serviceLoadMetrics().get(0).secondaryDefaultLoad());
- Assertions.assertEquals(753407395, model.serviceLoadMetrics().get(0).defaultLoad());
- Assertions.assertEquals(MoveCost.MEDIUM, model.defaultMoveCost());
- Assertions.assertEquals("xbkzbzkdvncj", model.serviceTypeName());
- Assertions.assertEquals(ArmServicePackageActivationMode.EXCLUSIVE_PROCESS,
- model.servicePackageActivationMode());
- Assertions.assertEquals("r", model.serviceDnsName());
- Assertions.assertEquals(true, model.hasPersistedState());
- Assertions.assertEquals(1117462910, model.targetReplicaSetSize());
- Assertions.assertEquals(394204922, model.minReplicaSetSize());
- Assertions.assertEquals(OffsetDateTime.parse("2021-08-30T01:40:48Z"), model.replicaRestartWaitDuration());
- Assertions.assertEquals(OffsetDateTime.parse("2021-03-14T13:52:20Z"), model.quorumLossWaitDuration());
- Assertions.assertEquals(OffsetDateTime.parse("2021-09-22T23:43:14Z"), model.standByReplicaKeepDuration());
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/StatefulServiceUpdatePropertiesTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/StatefulServiceUpdatePropertiesTests.java
deleted file mode 100644
index 7a7be5b597be..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/StatefulServiceUpdatePropertiesTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.MoveCost;
-import com.azure.resourcemanager.servicefabric.models.ServiceCorrelationDescription;
-import com.azure.resourcemanager.servicefabric.models.ServiceCorrelationScheme;
-import com.azure.resourcemanager.servicefabric.models.ServiceLoadMetricDescription;
-import com.azure.resourcemanager.servicefabric.models.ServiceLoadMetricWeight;
-import com.azure.resourcemanager.servicefabric.models.ServicePlacementPolicyDescription;
-import com.azure.resourcemanager.servicefabric.models.StatefulServiceUpdateProperties;
-import java.time.OffsetDateTime;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class StatefulServiceUpdatePropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- StatefulServiceUpdateProperties model = BinaryData.fromString(
- "{\"serviceKind\":\"Stateful\",\"targetReplicaSetSize\":481709550,\"minReplicaSetSize\":1948740846,\"replicaRestartWaitDuration\":\"2021-09-27T12:02:20Z\",\"quorumLossWaitDuration\":\"2021-10-12T10:01:16Z\",\"standByReplicaKeepDuration\":\"2020-12-23T03:39:10Z\",\"placementConstraints\":\"wyt\",\"correlationScheme\":[{\"scheme\":\"Invalid\",\"serviceName\":\"ircgpikpz\"}],\"serviceLoadMetrics\":[{\"name\":\"j\",\"weight\":\"Medium\",\"primaryDefaultLoad\":108512766,\"secondaryDefaultLoad\":453149058,\"defaultLoad\":386879497},{\"name\":\"vrmbzono\",\"weight\":\"High\",\"primaryDefaultLoad\":485732763,\"secondaryDefaultLoad\":1432241544,\"defaultLoad\":749799353}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicyDescription\"},{\"type\":\"ServicePlacementPolicyDescription\"}],\"defaultMoveCost\":\"Zero\"}")
- .toObject(StatefulServiceUpdateProperties.class);
- Assertions.assertEquals("wyt", model.placementConstraints());
- Assertions.assertEquals(ServiceCorrelationScheme.INVALID, model.correlationScheme().get(0).scheme());
- Assertions.assertEquals("ircgpikpz", model.correlationScheme().get(0).serviceName());
- Assertions.assertEquals("j", model.serviceLoadMetrics().get(0).name());
- Assertions.assertEquals(ServiceLoadMetricWeight.MEDIUM, model.serviceLoadMetrics().get(0).weight());
- Assertions.assertEquals(108512766, model.serviceLoadMetrics().get(0).primaryDefaultLoad());
- Assertions.assertEquals(453149058, model.serviceLoadMetrics().get(0).secondaryDefaultLoad());
- Assertions.assertEquals(386879497, model.serviceLoadMetrics().get(0).defaultLoad());
- Assertions.assertEquals(MoveCost.ZERO, model.defaultMoveCost());
- Assertions.assertEquals(481709550, model.targetReplicaSetSize());
- Assertions.assertEquals(1948740846, model.minReplicaSetSize());
- Assertions.assertEquals(OffsetDateTime.parse("2021-09-27T12:02:20Z"), model.replicaRestartWaitDuration());
- Assertions.assertEquals(OffsetDateTime.parse("2021-10-12T10:01:16Z"), model.quorumLossWaitDuration());
- Assertions.assertEquals(OffsetDateTime.parse("2020-12-23T03:39:10Z"), model.standByReplicaKeepDuration());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- StatefulServiceUpdateProperties model = new StatefulServiceUpdateProperties().withPlacementConstraints("wyt")
- .withCorrelationScheme(Arrays.asList(new ServiceCorrelationDescription()
- .withScheme(ServiceCorrelationScheme.INVALID).withServiceName("ircgpikpz")))
- .withServiceLoadMetrics(Arrays.asList(
- new ServiceLoadMetricDescription().withName("j").withWeight(ServiceLoadMetricWeight.MEDIUM)
- .withPrimaryDefaultLoad(108512766).withSecondaryDefaultLoad(453149058).withDefaultLoad(386879497),
- new ServiceLoadMetricDescription().withName("vrmbzono").withWeight(ServiceLoadMetricWeight.HIGH)
- .withPrimaryDefaultLoad(485732763).withSecondaryDefaultLoad(1432241544).withDefaultLoad(749799353)))
- .withServicePlacementPolicies(
- Arrays.asList(new ServicePlacementPolicyDescription(), new ServicePlacementPolicyDescription()))
- .withDefaultMoveCost(MoveCost.ZERO).withTargetReplicaSetSize(481709550).withMinReplicaSetSize(1948740846)
- .withReplicaRestartWaitDuration(OffsetDateTime.parse("2021-09-27T12:02:20Z"))
- .withQuorumLossWaitDuration(OffsetDateTime.parse("2021-10-12T10:01:16Z"))
- .withStandByReplicaKeepDuration(OffsetDateTime.parse("2020-12-23T03:39:10Z"));
- model = BinaryData.fromObject(model).toObject(StatefulServiceUpdateProperties.class);
- Assertions.assertEquals("wyt", model.placementConstraints());
- Assertions.assertEquals(ServiceCorrelationScheme.INVALID, model.correlationScheme().get(0).scheme());
- Assertions.assertEquals("ircgpikpz", model.correlationScheme().get(0).serviceName());
- Assertions.assertEquals("j", model.serviceLoadMetrics().get(0).name());
- Assertions.assertEquals(ServiceLoadMetricWeight.MEDIUM, model.serviceLoadMetrics().get(0).weight());
- Assertions.assertEquals(108512766, model.serviceLoadMetrics().get(0).primaryDefaultLoad());
- Assertions.assertEquals(453149058, model.serviceLoadMetrics().get(0).secondaryDefaultLoad());
- Assertions.assertEquals(386879497, model.serviceLoadMetrics().get(0).defaultLoad());
- Assertions.assertEquals(MoveCost.ZERO, model.defaultMoveCost());
- Assertions.assertEquals(481709550, model.targetReplicaSetSize());
- Assertions.assertEquals(1948740846, model.minReplicaSetSize());
- Assertions.assertEquals(OffsetDateTime.parse("2021-09-27T12:02:20Z"), model.replicaRestartWaitDuration());
- Assertions.assertEquals(OffsetDateTime.parse("2021-10-12T10:01:16Z"), model.quorumLossWaitDuration());
- Assertions.assertEquals(OffsetDateTime.parse("2020-12-23T03:39:10Z"), model.standByReplicaKeepDuration());
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/StatelessServicePropertiesTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/StatelessServicePropertiesTests.java
deleted file mode 100644
index 39e518846d56..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/StatelessServicePropertiesTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.ArmServicePackageActivationMode;
-import com.azure.resourcemanager.servicefabric.models.MoveCost;
-import com.azure.resourcemanager.servicefabric.models.PartitionSchemeDescription;
-import com.azure.resourcemanager.servicefabric.models.ServiceCorrelationDescription;
-import com.azure.resourcemanager.servicefabric.models.ServiceCorrelationScheme;
-import com.azure.resourcemanager.servicefabric.models.ServiceLoadMetricDescription;
-import com.azure.resourcemanager.servicefabric.models.ServiceLoadMetricWeight;
-import com.azure.resourcemanager.servicefabric.models.ServicePlacementPolicyDescription;
-import com.azure.resourcemanager.servicefabric.models.StatelessServiceProperties;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class StatelessServicePropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- StatelessServiceProperties model = BinaryData.fromString(
- "{\"serviceKind\":\"Stateless\",\"instanceCount\":1656770527,\"instanceCloseDelayDuration\":\"zszrnwoiindfpw\",\"provisioningState\":\"ylwbtlhflsjcdhsz\",\"serviceTypeName\":\"vfbgofeljagrqmqh\",\"partitionDescription\":{\"partitionScheme\":\"PartitionSchemeDescription\"},\"servicePackageActivationMode\":\"ExclusiveProcess\",\"serviceDnsName\":\"iiojnal\",\"placementConstraints\":\"fk\",\"correlationScheme\":[{\"scheme\":\"Affinity\",\"serviceName\":\"ex\"},{\"scheme\":\"Affinity\",\"serviceName\":\"wueluqhhahhxv\"},{\"scheme\":\"Invalid\",\"serviceName\":\"mzkwpjg\"}],\"serviceLoadMetrics\":[{\"name\":\"pughftqsxh\",\"weight\":\"Medium\",\"primaryDefaultLoad\":318834407,\"secondaryDefaultLoad\":649615996,\"defaultLoad\":1485711526},{\"name\":\"xdigrjg\",\"weight\":\"Zero\",\"primaryDefaultLoad\":1159016951,\"secondaryDefaultLoad\":1563611736,\"defaultLoad\":1621102365},{\"name\":\"tfih\",\"weight\":\"High\",\"primaryDefaultLoad\":720488968,\"secondaryDefaultLoad\":1701702807,\"defaultLoad\":867678631}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicyDescription\"}],\"defaultMoveCost\":\"Zero\"}")
- .toObject(StatelessServiceProperties.class);
- Assertions.assertEquals("fk", model.placementConstraints());
- Assertions.assertEquals(ServiceCorrelationScheme.AFFINITY, model.correlationScheme().get(0).scheme());
- Assertions.assertEquals("ex", model.correlationScheme().get(0).serviceName());
- Assertions.assertEquals("pughftqsxh", model.serviceLoadMetrics().get(0).name());
- Assertions.assertEquals(ServiceLoadMetricWeight.MEDIUM, model.serviceLoadMetrics().get(0).weight());
- Assertions.assertEquals(318834407, model.serviceLoadMetrics().get(0).primaryDefaultLoad());
- Assertions.assertEquals(649615996, model.serviceLoadMetrics().get(0).secondaryDefaultLoad());
- Assertions.assertEquals(1485711526, model.serviceLoadMetrics().get(0).defaultLoad());
- Assertions.assertEquals(MoveCost.ZERO, model.defaultMoveCost());
- Assertions.assertEquals("vfbgofeljagrqmqh", model.serviceTypeName());
- Assertions.assertEquals(ArmServicePackageActivationMode.EXCLUSIVE_PROCESS,
- model.servicePackageActivationMode());
- Assertions.assertEquals("iiojnal", model.serviceDnsName());
- Assertions.assertEquals(1656770527, model.instanceCount());
- Assertions.assertEquals("zszrnwoiindfpw", model.instanceCloseDelayDuration());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- StatelessServiceProperties model = new StatelessServiceProperties().withPlacementConstraints("fk")
- .withCorrelationScheme(Arrays.asList(
- new ServiceCorrelationDescription().withScheme(ServiceCorrelationScheme.AFFINITY).withServiceName("ex"),
- new ServiceCorrelationDescription().withScheme(ServiceCorrelationScheme.AFFINITY)
- .withServiceName("wueluqhhahhxv"),
- new ServiceCorrelationDescription().withScheme(ServiceCorrelationScheme.INVALID)
- .withServiceName("mzkwpjg")))
- .withServiceLoadMetrics(Arrays.asList(
- new ServiceLoadMetricDescription().withName("pughftqsxh").withWeight(ServiceLoadMetricWeight.MEDIUM)
- .withPrimaryDefaultLoad(318834407).withSecondaryDefaultLoad(649615996).withDefaultLoad(1485711526),
- new ServiceLoadMetricDescription().withName("xdigrjg").withWeight(ServiceLoadMetricWeight.ZERO)
- .withPrimaryDefaultLoad(1159016951).withSecondaryDefaultLoad(1563611736)
- .withDefaultLoad(1621102365),
- new ServiceLoadMetricDescription().withName("tfih").withWeight(ServiceLoadMetricWeight.HIGH)
- .withPrimaryDefaultLoad(720488968).withSecondaryDefaultLoad(1701702807).withDefaultLoad(867678631)))
- .withServicePlacementPolicies(Arrays.asList(new ServicePlacementPolicyDescription()))
- .withDefaultMoveCost(MoveCost.ZERO).withServiceTypeName("vfbgofeljagrqmqh")
- .withPartitionDescription(new PartitionSchemeDescription())
- .withServicePackageActivationMode(ArmServicePackageActivationMode.EXCLUSIVE_PROCESS)
- .withServiceDnsName("iiojnal").withInstanceCount(1656770527)
- .withInstanceCloseDelayDuration("zszrnwoiindfpw");
- model = BinaryData.fromObject(model).toObject(StatelessServiceProperties.class);
- Assertions.assertEquals("fk", model.placementConstraints());
- Assertions.assertEquals(ServiceCorrelationScheme.AFFINITY, model.correlationScheme().get(0).scheme());
- Assertions.assertEquals("ex", model.correlationScheme().get(0).serviceName());
- Assertions.assertEquals("pughftqsxh", model.serviceLoadMetrics().get(0).name());
- Assertions.assertEquals(ServiceLoadMetricWeight.MEDIUM, model.serviceLoadMetrics().get(0).weight());
- Assertions.assertEquals(318834407, model.serviceLoadMetrics().get(0).primaryDefaultLoad());
- Assertions.assertEquals(649615996, model.serviceLoadMetrics().get(0).secondaryDefaultLoad());
- Assertions.assertEquals(1485711526, model.serviceLoadMetrics().get(0).defaultLoad());
- Assertions.assertEquals(MoveCost.ZERO, model.defaultMoveCost());
- Assertions.assertEquals("vfbgofeljagrqmqh", model.serviceTypeName());
- Assertions.assertEquals(ArmServicePackageActivationMode.EXCLUSIVE_PROCESS,
- model.servicePackageActivationMode());
- Assertions.assertEquals("iiojnal", model.serviceDnsName());
- Assertions.assertEquals(1656770527, model.instanceCount());
- Assertions.assertEquals("zszrnwoiindfpw", model.instanceCloseDelayDuration());
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/StatelessServiceUpdatePropertiesTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/StatelessServiceUpdatePropertiesTests.java
deleted file mode 100644
index ecbb9c63bac3..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/StatelessServiceUpdatePropertiesTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.MoveCost;
-import com.azure.resourcemanager.servicefabric.models.ServiceCorrelationDescription;
-import com.azure.resourcemanager.servicefabric.models.ServiceCorrelationScheme;
-import com.azure.resourcemanager.servicefabric.models.ServiceLoadMetricDescription;
-import com.azure.resourcemanager.servicefabric.models.ServiceLoadMetricWeight;
-import com.azure.resourcemanager.servicefabric.models.ServicePlacementPolicyDescription;
-import com.azure.resourcemanager.servicefabric.models.StatelessServiceUpdateProperties;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class StatelessServiceUpdatePropertiesTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- StatelessServiceUpdateProperties model = BinaryData.fromString(
- "{\"serviceKind\":\"Stateless\",\"instanceCount\":313573135,\"instanceCloseDelayDuration\":\"szqzudphqamv\",\"placementConstraints\":\"fwynwcvtbvkay\",\"correlationScheme\":[{\"scheme\":\"Invalid\",\"serviceName\":\"vyqia\"},{\"scheme\":\"Affinity\",\"serviceName\":\"zwpcnpwzcjaesg\"},{\"scheme\":\"Invalid\",\"serviceName\":\"sccyajguqf\"}],\"serviceLoadMetrics\":[{\"name\":\"gzlvdnkfxu\",\"weight\":\"High\",\"primaryDefaultLoad\":1547666647,\"secondaryDefaultLoad\":252265287,\"defaultLoad\":372421736}],\"servicePlacementPolicies\":[{\"type\":\"ServicePlacementPolicyDescription\"},{\"type\":\"ServicePlacementPolicyDescription\"},{\"type\":\"ServicePlacementPolicyDescription\"}],\"defaultMoveCost\":\"Low\"}")
- .toObject(StatelessServiceUpdateProperties.class);
- Assertions.assertEquals("fwynwcvtbvkay", model.placementConstraints());
- Assertions.assertEquals(ServiceCorrelationScheme.INVALID, model.correlationScheme().get(0).scheme());
- Assertions.assertEquals("vyqia", model.correlationScheme().get(0).serviceName());
- Assertions.assertEquals("gzlvdnkfxu", model.serviceLoadMetrics().get(0).name());
- Assertions.assertEquals(ServiceLoadMetricWeight.HIGH, model.serviceLoadMetrics().get(0).weight());
- Assertions.assertEquals(1547666647, model.serviceLoadMetrics().get(0).primaryDefaultLoad());
- Assertions.assertEquals(252265287, model.serviceLoadMetrics().get(0).secondaryDefaultLoad());
- Assertions.assertEquals(372421736, model.serviceLoadMetrics().get(0).defaultLoad());
- Assertions.assertEquals(MoveCost.LOW, model.defaultMoveCost());
- Assertions.assertEquals(313573135, model.instanceCount());
- Assertions.assertEquals("szqzudphqamv", model.instanceCloseDelayDuration());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- StatelessServiceUpdateProperties model
- = new StatelessServiceUpdateProperties().withPlacementConstraints("fwynwcvtbvkay")
- .withCorrelationScheme(Arrays.asList(
- new ServiceCorrelationDescription().withScheme(ServiceCorrelationScheme.INVALID)
- .withServiceName("vyqia"),
- new ServiceCorrelationDescription().withScheme(ServiceCorrelationScheme.AFFINITY)
- .withServiceName("zwpcnpwzcjaesg"),
- new ServiceCorrelationDescription().withScheme(ServiceCorrelationScheme.INVALID)
- .withServiceName("sccyajguqf")))
- .withServiceLoadMetrics(Arrays.asList(new ServiceLoadMetricDescription().withName("gzlvdnkfxu")
- .withWeight(ServiceLoadMetricWeight.HIGH).withPrimaryDefaultLoad(1547666647)
- .withSecondaryDefaultLoad(252265287).withDefaultLoad(372421736)))
- .withServicePlacementPolicies(Arrays.asList(new ServicePlacementPolicyDescription(),
- new ServicePlacementPolicyDescription(), new ServicePlacementPolicyDescription()))
- .withDefaultMoveCost(MoveCost.LOW).withInstanceCount(313573135)
- .withInstanceCloseDelayDuration("szqzudphqamv");
- model = BinaryData.fromObject(model).toObject(StatelessServiceUpdateProperties.class);
- Assertions.assertEquals("fwynwcvtbvkay", model.placementConstraints());
- Assertions.assertEquals(ServiceCorrelationScheme.INVALID, model.correlationScheme().get(0).scheme());
- Assertions.assertEquals("vyqia", model.correlationScheme().get(0).serviceName());
- Assertions.assertEquals("gzlvdnkfxu", model.serviceLoadMetrics().get(0).name());
- Assertions.assertEquals(ServiceLoadMetricWeight.HIGH, model.serviceLoadMetrics().get(0).weight());
- Assertions.assertEquals(1547666647, model.serviceLoadMetrics().get(0).primaryDefaultLoad());
- Assertions.assertEquals(252265287, model.serviceLoadMetrics().get(0).secondaryDefaultLoad());
- Assertions.assertEquals(372421736, model.serviceLoadMetrics().get(0).defaultLoad());
- Assertions.assertEquals(MoveCost.LOW, model.defaultMoveCost());
- Assertions.assertEquals(313573135, model.instanceCount());
- Assertions.assertEquals("szqzudphqamv", model.instanceCloseDelayDuration());
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/UpgradableVersionPathResultInnerTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/UpgradableVersionPathResultInnerTests.java
deleted file mode 100644
index 2ebf3febdfc0..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/UpgradableVersionPathResultInnerTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.fluent.models.UpgradableVersionPathResultInner;
-import java.util.Arrays;
-import org.junit.jupiter.api.Assertions;
-
-public final class UpgradableVersionPathResultInnerTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- UpgradableVersionPathResultInner model = BinaryData.fromString("{\"supportedPath\":[\"gpbtoqcjmklj\"]}")
- .toObject(UpgradableVersionPathResultInner.class);
- Assertions.assertEquals("gpbtoqcjmklj", model.supportedPath().get(0));
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- UpgradableVersionPathResultInner model
- = new UpgradableVersionPathResultInner().withSupportedPath(Arrays.asList("gpbtoqcjmklj"));
- model = BinaryData.fromObject(model).toObject(UpgradableVersionPathResultInner.class);
- Assertions.assertEquals("gpbtoqcjmklj", model.supportedPath().get(0));
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/UpgradableVersionsDescriptionTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/UpgradableVersionsDescriptionTests.java
deleted file mode 100644
index 04b7ea8b8089..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/UpgradableVersionsDescriptionTests.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.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.UpgradableVersionsDescription;
-import org.junit.jupiter.api.Assertions;
-
-public final class UpgradableVersionsDescriptionTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- UpgradableVersionsDescription model
- = BinaryData.fromString("{\"targetVersion\":\"zafb\"}").toObject(UpgradableVersionsDescription.class);
- Assertions.assertEquals("zafb", model.targetVersion());
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- UpgradableVersionsDescription model = new UpgradableVersionsDescription().withTargetVersion("zafb");
- model = BinaryData.fromObject(model).toObject(UpgradableVersionsDescription.class);
- Assertions.assertEquals("zafb", model.targetVersion());
- }
-}
diff --git a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/UserAssignedIdentityTests.java b/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/UserAssignedIdentityTests.java
deleted file mode 100644
index 00cc3cf92f82..000000000000
--- a/sdk/servicefabric/azure-resourcemanager-servicefabric/src/test/java/com/azure/resourcemanager/servicefabric/generated/UserAssignedIdentityTests.java
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.resourcemanager.servicefabric.generated;
-
-import com.azure.core.util.BinaryData;
-import com.azure.resourcemanager.servicefabric.models.UserAssignedIdentity;
-
-public final class UserAssignedIdentityTests {
- @org.junit.jupiter.api.Test
- public void testDeserialize() throws Exception {
- UserAssignedIdentity model
- = BinaryData.fromString("{\"principalId\":\"liourqhak\",\"clientId\":\"hashsfwxosow\"}")
- .toObject(UserAssignedIdentity.class);
- }
-
- @org.junit.jupiter.api.Test
- public void testSerialize() throws Exception {
- UserAssignedIdentity model = new UserAssignedIdentity();
- model = BinaryData.fromObject(model).toObject(UserAssignedIdentity.class);
- }
-}