diff --git a/sdk/quota/azure-resourcemanager-quota/CHANGELOG.md b/sdk/quota/azure-resourcemanager-quota/CHANGELOG.md index 7958543fd4d4..9d52e2cf9f6d 100644 --- a/sdk/quota/azure-resourcemanager-quota/CHANGELOG.md +++ b/sdk/quota/azure-resourcemanager-quota/CHANGELOG.md @@ -1,14 +1,8 @@ # Release History -## 1.2.0-beta.1 (Unreleased) +## 1.0.0-beta.1 (2025-03-18) -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes +- Azure Resource Manager quota client library for Java. This package contains Microsoft Azure SDK for quota Management SDK. Microsoft Azure Quota Resource Provider. This Swagger is for Azure Group Quota using GroupQuota Entity. Package tag package-2025-03-01. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## 1.1.0 (2025-02-21) diff --git a/sdk/quota/azure-resourcemanager-quota/pom.xml b/sdk/quota/azure-resourcemanager-quota/pom.xml index 7acb33a40e8f..712484bfae32 100644 --- a/sdk/quota/azure-resourcemanager-quota/pom.xml +++ b/sdk/quota/azure-resourcemanager-quota/pom.xml @@ -45,6 +45,7 @@ UTF-8 0 0 + true false diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/AllocatedQuotaToSubscriptionListTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/AllocatedQuotaToSubscriptionListTests.java deleted file mode 100644 index f804bb56859b..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/AllocatedQuotaToSubscriptionListTests.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.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.models.AllocatedQuotaToSubscriptionList; -import com.azure.resourcemanager.quota.models.AllocatedToSubscription; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AllocatedQuotaToSubscriptionListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AllocatedQuotaToSubscriptionList model = BinaryData.fromString( - "{\"value\":[{\"subscriptionId\":\"dfvzwdzuhty\",\"quotaAllocated\":7933168556425721476},{\"subscriptionId\":\"kfthwxmntei\",\"quotaAllocated\":320495050152534005}]}") - .toObject(AllocatedQuotaToSubscriptionList.class); - Assertions.assertEquals("dfvzwdzuhty", model.value().get(0).subscriptionId()); - Assertions.assertEquals(7933168556425721476L, model.value().get(0).quotaAllocated()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AllocatedQuotaToSubscriptionList model = new AllocatedQuotaToSubscriptionList().withValue(Arrays.asList( - new AllocatedToSubscription().withSubscriptionId("dfvzwdzuhty").withQuotaAllocated(7933168556425721476L), - new AllocatedToSubscription().withSubscriptionId("kfthwxmntei").withQuotaAllocated(320495050152534005L))); - model = BinaryData.fromObject(model).toObject(AllocatedQuotaToSubscriptionList.class); - Assertions.assertEquals("dfvzwdzuhty", model.value().get(0).subscriptionId()); - Assertions.assertEquals(7933168556425721476L, model.value().get(0).quotaAllocated()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/AllocatedToSubscriptionTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/AllocatedToSubscriptionTests.java deleted file mode 100644 index 7c0610065489..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/AllocatedToSubscriptionTests.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.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.models.AllocatedToSubscription; -import org.junit.jupiter.api.Assertions; - -public final class AllocatedToSubscriptionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AllocatedToSubscription model - = BinaryData.fromString("{\"subscriptionId\":\"km\",\"quotaAllocated\":400256039619718392}") - .toObject(AllocatedToSubscription.class); - Assertions.assertEquals("km", model.subscriptionId()); - Assertions.assertEquals(400256039619718392L, model.quotaAllocated()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AllocatedToSubscription model - = new AllocatedToSubscription().withSubscriptionId("km").withQuotaAllocated(400256039619718392L); - model = BinaryData.fromObject(model).toObject(AllocatedToSubscription.class); - Assertions.assertEquals("km", model.subscriptionId()); - Assertions.assertEquals(400256039619718392L, model.quotaAllocated()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/CurrentQuotaLimitBaseInnerTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/CurrentQuotaLimitBaseInnerTests.java deleted file mode 100644 index cb1bdc39bbde..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/CurrentQuotaLimitBaseInnerTests.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.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.fluent.models.CurrentQuotaLimitBaseInner; -import com.azure.resourcemanager.quota.models.LimitJsonObject; -import com.azure.resourcemanager.quota.models.QuotaProperties; -import com.azure.resourcemanager.quota.models.ResourceName; -import org.junit.jupiter.api.Assertions; - -public final class CurrentQuotaLimitBaseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CurrentQuotaLimitBaseInner model = BinaryData.fromString( - "{\"properties\":{\"limit\":{\"limitObjectType\":\"LimitJsonObject\"},\"unit\":\"ohoqqnwvlryav\",\"name\":{\"value\":\"eun\",\"localizedValue\":\"qhgyxzkonocukok\"},\"resourceType\":\"axuconuq\",\"quotaPeriod\":\"fkbey\",\"isQuotaApplicable\":true,\"properties\":\"datamjmwvvjektcx\"},\"id\":\"enhwlrs\",\"name\":\"frzpwvlqdqgb\",\"type\":\"qylihkaetckt\"}") - .toObject(CurrentQuotaLimitBaseInner.class); - Assertions.assertEquals("eun", model.properties().name().value()); - Assertions.assertEquals("axuconuq", model.properties().resourceType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CurrentQuotaLimitBaseInner model - = new CurrentQuotaLimitBaseInner().withProperties(new QuotaProperties().withLimit(new LimitJsonObject()) - .withName(new ResourceName().withValue("eun")) - .withResourceType("axuconuq") - .withProperties("datamjmwvvjektcx")); - model = BinaryData.fromObject(model).toObject(CurrentQuotaLimitBaseInner.class); - Assertions.assertEquals("eun", model.properties().name().value()); - Assertions.assertEquals("axuconuq", model.properties().resourceType()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/CurrentUsagesBaseInnerTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/CurrentUsagesBaseInnerTests.java deleted file mode 100644 index 307c6910483d..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/CurrentUsagesBaseInnerTests.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.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.fluent.models.CurrentUsagesBaseInner; -import com.azure.resourcemanager.quota.models.ResourceName; -import com.azure.resourcemanager.quota.models.UsagesObject; -import com.azure.resourcemanager.quota.models.UsagesProperties; -import com.azure.resourcemanager.quota.models.UsagesTypes; -import org.junit.jupiter.api.Assertions; - -public final class CurrentUsagesBaseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CurrentUsagesBaseInner model = BinaryData.fromString( - "{\"properties\":{\"usages\":{\"value\":1709538743,\"usagesType\":\"Combined\"},\"unit\":\"pfhyhl\",\"name\":{\"value\":\"mopjmc\",\"localizedValue\":\"tuo\"},\"resourceType\":\"hfuiuaodsfc\",\"quotaPeriod\":\"vxodpu\",\"isQuotaApplicable\":true,\"properties\":\"datazydagfuaxbezyiuo\"},\"id\":\"ktwh\",\"name\":\"dxwzywqsmbsurexi\",\"type\":\"o\"}") - .toObject(CurrentUsagesBaseInner.class); - Assertions.assertEquals(1709538743, model.properties().usages().value()); - Assertions.assertEquals(UsagesTypes.COMBINED, model.properties().usages().usagesType()); - Assertions.assertEquals("mopjmc", model.properties().name().value()); - Assertions.assertEquals("hfuiuaodsfc", model.properties().resourceType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CurrentUsagesBaseInner model = new CurrentUsagesBaseInner().withProperties(new UsagesProperties() - .withUsages(new UsagesObject().withValue(1709538743).withUsagesType(UsagesTypes.COMBINED)) - .withName(new ResourceName().withValue("mopjmc")) - .withResourceType("hfuiuaodsfc") - .withProperties("datazydagfuaxbezyiuo")); - model = BinaryData.fromObject(model).toObject(CurrentUsagesBaseInner.class); - Assertions.assertEquals(1709538743, model.properties().usages().value()); - Assertions.assertEquals(UsagesTypes.COMBINED, model.properties().usages().usagesType()); - Assertions.assertEquals("mopjmc", model.properties().name().value()); - Assertions.assertEquals("hfuiuaodsfc", model.properties().resourceType()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaDetailsNameTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaDetailsNameTests.java deleted file mode 100644 index 6521b522b369..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaDetailsNameTests.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.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.fluent.models.GroupQuotaDetailsName; - -public final class GroupQuotaDetailsNameTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GroupQuotaDetailsName model - = BinaryData.fromString("{\"value\":\"nguitnwuizgazxu\",\"localizedValue\":\"zuckyfi\"}") - .toObject(GroupQuotaDetailsName.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GroupQuotaDetailsName model = new GroupQuotaDetailsName(); - model = BinaryData.fromObject(model).toObject(GroupQuotaDetailsName.class); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaDetailsTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaDetailsTests.java deleted file mode 100644 index db6d969ca06f..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaDetailsTests.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.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.models.GroupQuotaDetails; -import org.junit.jupiter.api.Assertions; - -public final class GroupQuotaDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GroupQuotaDetails model = BinaryData.fromString( - "{\"resourceName\":\"ol\",\"limit\":728427044151085646,\"comment\":\"algbquxigjyjg\",\"unit\":\"aoyfhrtxilnerkuj\",\"name\":{\"value\":\"l\",\"localizedValue\":\"uvfqawrlyxwj\"},\"availableLimit\":4891061322345208982,\"allocatedToSubscriptions\":{\"value\":[{\"subscriptionId\":\"xgjvtbv\",\"quotaAllocated\":7661305214436261701},{\"subscriptionId\":\"dnrujqguhmuouqfp\",\"quotaAllocated\":1346703559786740146}]}}") - .toObject(GroupQuotaDetails.class); - Assertions.assertEquals("ol", model.resourceName()); - Assertions.assertEquals(728427044151085646L, model.limit()); - Assertions.assertEquals("algbquxigjyjg", model.comment()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GroupQuotaDetails model = new GroupQuotaDetails().withResourceName("ol") - .withLimit(728427044151085646L) - .withComment("algbquxigjyjg"); - model = BinaryData.fromObject(model).toObject(GroupQuotaDetails.class); - Assertions.assertEquals("ol", model.resourceName()); - Assertions.assertEquals(728427044151085646L, model.limit()); - Assertions.assertEquals("algbquxigjyjg", model.comment()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaLimitListInnerTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaLimitListInnerTests.java deleted file mode 100644 index 6345eb57a5e5..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaLimitListInnerTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.fluent.models.GroupQuotaLimitListInner; -import com.azure.resourcemanager.quota.models.GroupQuotaLimit; -import com.azure.resourcemanager.quota.models.GroupQuotaLimitListProperties; -import com.azure.resourcemanager.quota.models.GroupQuotaLimitProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class GroupQuotaLimitListInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GroupQuotaLimitListInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Canceled\",\"value\":[{\"properties\":{\"resourceName\":\"xpaojakhmsbz\",\"limit\":2192126563466196128,\"comment\":\"evdphlxaol\",\"unit\":\"qtrgqjbpfzfsinzg\",\"name\":{\"value\":\"jrwzox\",\"localizedValue\":\"tfell\"},\"availableLimit\":5924201566480225751,\"allocatedToSubscriptions\":{\"value\":[{},{},{},{}]}}},{\"properties\":{\"resourceName\":\"eqfpj\",\"limit\":8695706815258884351,\"comment\":\"fpdvhpfxxypi\",\"unit\":\"nmayhuybb\",\"name\":{\"value\":\"depoog\",\"localizedValue\":\"uvamiheognarxzxt\"},\"availableLimit\":955954291018869840,\"allocatedToSubscriptions\":{\"value\":[{},{},{},{}]}}},{\"properties\":{\"resourceName\":\"evcciqihnhun\",\"limit\":4957035002722095413,\"comment\":\"rnfygxgispem\",\"unit\":\"zfkufubljofx\",\"name\":{\"value\":\"fjaeq\",\"localizedValue\":\"qjbasvms\"},\"availableLimit\":8387185057930891317,\"allocatedToSubscriptions\":{\"value\":[{},{},{},{}]}}},{\"properties\":{\"resourceName\":\"tnb\",\"limit\":454639632917267725,\"comment\":\"cwrwclxxwrljdous\",\"unit\":\"qvkoc\",\"name\":{\"value\":\"dkwt\",\"localizedValue\":\"xbnjbiksq\"},\"availableLimit\":5232113112996361518,\"allocatedToSubscriptions\":{\"value\":[{},{},{}]}}}],\"nextLink\":\"qpjwnzlljfm\"},\"id\":\"eebvmgxsab\",\"name\":\"yqduujit\",\"type\":\"jczdzevndh\"}") - .toObject(GroupQuotaLimitListInner.class); - Assertions.assertEquals("xpaojakhmsbz", model.properties().value().get(0).properties().resourceName()); - Assertions.assertEquals(2192126563466196128L, model.properties().value().get(0).properties().limit()); - Assertions.assertEquals("evdphlxaol", model.properties().value().get(0).properties().comment()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GroupQuotaLimitListInner model - = new GroupQuotaLimitListInner().withProperties(new GroupQuotaLimitListProperties().withValue(Arrays.asList( - new GroupQuotaLimit().withProperties(new GroupQuotaLimitProperties().withResourceName("xpaojakhmsbz") - .withLimit(2192126563466196128L) - .withComment("evdphlxaol")), - new GroupQuotaLimit().withProperties(new GroupQuotaLimitProperties().withResourceName("eqfpj") - .withLimit(8695706815258884351L) - .withComment("fpdvhpfxxypi")), - new GroupQuotaLimit().withProperties(new GroupQuotaLimitProperties().withResourceName("evcciqihnhun") - .withLimit(4957035002722095413L) - .withComment("rnfygxgispem")), - new GroupQuotaLimit().withProperties(new GroupQuotaLimitProperties().withResourceName("tnb") - .withLimit(454639632917267725L) - .withComment("cwrwclxxwrljdous"))))); - model = BinaryData.fromObject(model).toObject(GroupQuotaLimitListInner.class); - Assertions.assertEquals("xpaojakhmsbz", model.properties().value().get(0).properties().resourceName()); - Assertions.assertEquals(2192126563466196128L, model.properties().value().get(0).properties().limit()); - Assertions.assertEquals("evdphlxaol", model.properties().value().get(0).properties().comment()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaLimitListPropertiesTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaLimitListPropertiesTests.java deleted file mode 100644 index 48eb8d175eab..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaLimitListPropertiesTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.models.GroupQuotaLimit; -import com.azure.resourcemanager.quota.models.GroupQuotaLimitListProperties; -import com.azure.resourcemanager.quota.models.GroupQuotaLimitProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class GroupQuotaLimitListPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GroupQuotaLimitListProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Succeeded\",\"value\":[{\"properties\":{\"resourceName\":\"p\",\"limit\":1133977935243283370,\"comment\":\"vwrwj\",\"unit\":\"usnhutje\",\"name\":{\"value\":\"rl\",\"localizedValue\":\"ugjzzdatqxhocdge\"},\"availableLimit\":5556090733611514478,\"allocatedToSubscriptions\":{\"value\":[{},{},{},{}]}}}],\"nextLink\":\"icndvkaozwyifty\"}") - .toObject(GroupQuotaLimitListProperties.class); - Assertions.assertEquals("p", model.value().get(0).properties().resourceName()); - Assertions.assertEquals(1133977935243283370L, model.value().get(0).properties().limit()); - Assertions.assertEquals("vwrwj", model.value().get(0).properties().comment()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GroupQuotaLimitListProperties model = new GroupQuotaLimitListProperties().withValue( - Arrays.asList(new GroupQuotaLimit().withProperties(new GroupQuotaLimitProperties().withResourceName("p") - .withLimit(1133977935243283370L) - .withComment("vwrwj")))); - model = BinaryData.fromObject(model).toObject(GroupQuotaLimitListProperties.class); - Assertions.assertEquals("p", model.value().get(0).properties().resourceName()); - Assertions.assertEquals(1133977935243283370L, model.value().get(0).properties().limit()); - Assertions.assertEquals("vwrwj", model.value().get(0).properties().comment()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaLimitPropertiesTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaLimitPropertiesTests.java deleted file mode 100644 index 943381ee92bf..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaLimitPropertiesTests.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.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.models.GroupQuotaLimitProperties; -import org.junit.jupiter.api.Assertions; - -public final class GroupQuotaLimitPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GroupQuotaLimitProperties model = BinaryData.fromString( - "{\"resourceName\":\"fgibmadgakeq\",\"limit\":4098961683533013138,\"comment\":\"zqqedq\",\"unit\":\"bciqfouflm\",\"name\":{\"value\":\"zsm\",\"localizedValue\":\"mglougpbkw\"},\"availableLimit\":7027727975634894937,\"allocatedToSubscriptions\":{\"value\":[{\"subscriptionId\":\"ta\",\"quotaAllocated\":52315490134475287},{\"subscriptionId\":\"cuertu\",\"quotaAllocated\":7897278653566127978},{\"subscriptionId\":\"vqwhbmdgbbjfd\",\"quotaAllocated\":1280362688253546892},{\"subscriptionId\":\"bexppb\",\"quotaAllocated\":907638754546671193}]}}") - .toObject(GroupQuotaLimitProperties.class); - Assertions.assertEquals("fgibmadgakeq", model.resourceName()); - Assertions.assertEquals(4098961683533013138L, model.limit()); - Assertions.assertEquals("zqqedq", model.comment()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GroupQuotaLimitProperties model = new GroupQuotaLimitProperties().withResourceName("fgibmadgakeq") - .withLimit(4098961683533013138L) - .withComment("zqqedq"); - model = BinaryData.fromObject(model).toObject(GroupQuotaLimitProperties.class); - Assertions.assertEquals("fgibmadgakeq", model.resourceName()); - Assertions.assertEquals(4098961683533013138L, model.limit()); - Assertions.assertEquals("zqqedq", model.comment()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaLimitTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaLimitTests.java deleted file mode 100644 index a4737c50c5a6..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaLimitTests.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.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.models.GroupQuotaLimit; -import com.azure.resourcemanager.quota.models.GroupQuotaLimitProperties; -import org.junit.jupiter.api.Assertions; - -public final class GroupQuotaLimitTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GroupQuotaLimit model = BinaryData.fromString( - "{\"properties\":{\"resourceName\":\"urokft\",\"limit\":3868150209180294588,\"comment\":\"iwpwcuk\",\"unit\":\"kgiawxklryplwck\",\"name\":{\"value\":\"yypnddhsgcbacphe\",\"localizedValue\":\"ot\"},\"availableLimit\":9089023115541451089,\"allocatedToSubscriptions\":{\"value\":[{\"subscriptionId\":\"ndlik\",\"quotaAllocated\":1140250228405168}]}}}") - .toObject(GroupQuotaLimit.class); - Assertions.assertEquals("urokft", model.properties().resourceName()); - Assertions.assertEquals(3868150209180294588L, model.properties().limit()); - Assertions.assertEquals("iwpwcuk", model.properties().comment()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GroupQuotaLimit model - = new GroupQuotaLimit().withProperties(new GroupQuotaLimitProperties().withResourceName("urokft") - .withLimit(3868150209180294588L) - .withComment("iwpwcuk")); - model = BinaryData.fromObject(model).toObject(GroupQuotaLimit.class); - Assertions.assertEquals("urokft", model.properties().resourceName()); - Assertions.assertEquals(3868150209180294588L, model.properties().limit()); - Assertions.assertEquals("iwpwcuk", model.properties().comment()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaLimitsListWithResponseMockTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaLimitsListWithResponseMockTests.java deleted file mode 100644 index ee5ea6748713..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaLimitsListWithResponseMockTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.quota.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.quota.QuotaManager; -import com.azure.resourcemanager.quota.models.GroupQuotaLimitList; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class GroupQuotaLimitsListWithResponseMockTests { - @Test - public void testListWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"value\":[{\"properties\":{\"resourceName\":\"wmbesldnkw\",\"limit\":1517331756853567290,\"comment\":\"flcxoga\",\"unit\":\"onz\",\"name\":{},\"availableLimit\":2991398819380628456,\"allocatedToSubscriptions\":{}}},{\"properties\":{\"resourceName\":\"qzeqqkdltfzxm\",\"limit\":740779033834050622,\"comment\":\"ur\",\"unit\":\"dkwobdagx\",\"name\":{},\"availableLimit\":7711420344128490365,\"allocatedToSubscriptions\":{}}},{\"properties\":{\"resourceName\":\"wakbogqxndl\",\"limit\":1285418562522553116,\"comment\":\"uriplbpodxunkb\",\"unit\":\"xmubyyntwlrbq\",\"name\":{},\"availableLimit\":5325989537009881693,\"allocatedToSubscriptions\":{}}}],\"nextLink\":\"eotg\"},\"id\":\"l\",\"name\":\"tmuwlauwzi\",\"type\":\"xbmp\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - QuotaManager manager = QuotaManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - GroupQuotaLimitList response = manager.groupQuotaLimits() - .listWithResponse("ofz", "yqsemwa", "n", "tshhszhedp", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("wmbesldnkw", response.properties().value().get(0).properties().resourceName()); - Assertions.assertEquals(1517331756853567290L, response.properties().value().get(0).properties().limit()); - Assertions.assertEquals("flcxoga", response.properties().value().get(0).properties().comment()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaLimitsRequestsUpdateMockTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaLimitsRequestsUpdateMockTests.java deleted file mode 100644 index e61ee40a8e52..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaLimitsRequestsUpdateMockTests.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.quota.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.quota.QuotaManager; -import com.azure.resourcemanager.quota.fluent.models.GroupQuotaLimitListInner; -import com.azure.resourcemanager.quota.models.GroupQuotaLimit; -import com.azure.resourcemanager.quota.models.GroupQuotaLimitList; -import com.azure.resourcemanager.quota.models.GroupQuotaLimitListProperties; -import com.azure.resourcemanager.quota.models.GroupQuotaLimitProperties; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class GroupQuotaLimitsRequestsUpdateMockTests { - @Test - public void testUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"value\":[{\"properties\":{\"resourceName\":\"n\",\"limit\":6645046241079336375,\"comment\":\"krtswbxqz\",\"unit\":\"zjf\",\"name\":{},\"availableLimit\":147411949012367890,\"allocatedToSubscriptions\":{}}},{\"properties\":{\"resourceName\":\"ivetvtcq\",\"limit\":3137986994872936614,\"comment\":\"qmcbxvwvxyslqbhs\",\"unit\":\"obl\",\"name\":{},\"availableLimit\":8821646723184751795,\"allocatedToSubscriptions\":{}}},{\"properties\":{\"resourceName\":\"wwwfbkr\",\"limit\":3908578506994645119,\"comment\":\"shqjohxcrsbf\",\"unit\":\"asrru\",\"name\":{},\"availableLimit\":9213990294223427282,\"allocatedToSubscriptions\":{}}}],\"nextLink\":\"sub\"},\"id\":\"jbi\",\"name\":\"xb\",\"type\":\"ybsrfbjfdtwss\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - QuotaManager manager = QuotaManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - GroupQuotaLimitList response = manager.groupQuotaLimitsRequests() - .update("tfolhbnx", "nalaulppg", "dtpnapnyiropuhp", "gvpgy", new GroupQuotaLimitListInner() - .withProperties(new GroupQuotaLimitListProperties().withValue(Arrays.asList( - new GroupQuotaLimit().withProperties(new GroupQuotaLimitProperties().withResourceName("edjvcslynqw") - .withLimit(1214544725492398973L) - .withComment("zhxgktrmgucn")), - new GroupQuotaLimit().withProperties(new GroupQuotaLimitProperties().withResourceName("ygpfqb") - .withLimit(7440392727703500605L) - .withComment("pzfqrhhuaoppp"))))), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("n", response.properties().value().get(0).properties().resourceName()); - Assertions.assertEquals(6645046241079336375L, response.properties().value().get(0).properties().limit()); - Assertions.assertEquals("krtswbxqz", response.properties().value().get(0).properties().comment()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaListTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaListTests.java deleted file mode 100644 index f90bf632eff8..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaListTests.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.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.fluent.models.GroupQuotasEntityInner; -import com.azure.resourcemanager.quota.models.GroupQuotaList; -import com.azure.resourcemanager.quota.models.GroupQuotasEntityProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class GroupQuotaListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GroupQuotaList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"displayName\":\"siznto\",\"provisioningState\":\"Failed\"},\"id\":\"ouajpsqucmpoyf\",\"name\":\"kfo\",\"type\":\"knygjofjddeq\"},{\"properties\":{\"displayName\":\"eupewnwreitjz\",\"provisioningState\":\"InProgress\"},\"id\":\"sarhmofc\",\"name\":\"hs\",\"type\":\"yurkdtmlxhekuksj\"},{\"properties\":{\"displayName\":\"kc\",\"provisioningState\":\"InProgress\"},\"id\":\"rcryuanzwuxzdxta\",\"name\":\"rlhm\",\"type\":\"hfpmrqobmtukknr\"},{\"properties\":{\"displayName\":\"ihfxtijbpzvgnwzs\",\"provisioningState\":\"Accepted\"},\"id\":\"zufcyzkohdbi\",\"name\":\"anufhfcbjysag\",\"type\":\"th\"}],\"nextLink\":\"hab\"}") - .toObject(GroupQuotaList.class); - Assertions.assertEquals("siznto", model.value().get(0).properties().displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GroupQuotaList model = new GroupQuotaList().withValue(Arrays.asList( - new GroupQuotasEntityInner().withProperties(new GroupQuotasEntityProperties().withDisplayName("siznto")), - new GroupQuotasEntityInner() - .withProperties(new GroupQuotasEntityProperties().withDisplayName("eupewnwreitjz")), - new GroupQuotasEntityInner().withProperties(new GroupQuotasEntityProperties().withDisplayName("kc")), - new GroupQuotasEntityInner() - .withProperties(new GroupQuotasEntityProperties().withDisplayName("ihfxtijbpzvgnwzs")))); - model = BinaryData.fromObject(model).toObject(GroupQuotaList.class); - Assertions.assertEquals("siznto", model.value().get(0).properties().displayName()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaRequestBasePropertiesNameTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaRequestBasePropertiesNameTests.java deleted file mode 100644 index 62cf1982903e..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaRequestBasePropertiesNameTests.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.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.fluent.models.GroupQuotaRequestBasePropertiesName; - -public final class GroupQuotaRequestBasePropertiesNameTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GroupQuotaRequestBasePropertiesName model - = BinaryData.fromString("{\"value\":\"c\",\"localizedValue\":\"ierhhbcsglummaj\"}") - .toObject(GroupQuotaRequestBasePropertiesName.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GroupQuotaRequestBasePropertiesName model = new GroupQuotaRequestBasePropertiesName(); - model = BinaryData.fromObject(model).toObject(GroupQuotaRequestBasePropertiesName.class); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaRequestBasePropertiesTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaRequestBasePropertiesTests.java deleted file mode 100644 index 5a43876e198d..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaRequestBasePropertiesTests.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.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.fluent.models.GroupQuotaRequestBaseProperties; -import org.junit.jupiter.api.Assertions; - -public final class GroupQuotaRequestBasePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GroupQuotaRequestBaseProperties model = BinaryData.fromString( - "{\"limit\":1000418976764057169,\"name\":{\"value\":\"idtqajzyu\",\"localizedValue\":\"kudjkrlkhb\"},\"region\":\"fepgzgq\",\"comments\":\"zloc\"}") - .toObject(GroupQuotaRequestBaseProperties.class); - Assertions.assertEquals(1000418976764057169L, model.limit()); - Assertions.assertEquals("fepgzgq", model.region()); - Assertions.assertEquals("zloc", model.comments()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GroupQuotaRequestBaseProperties model = new GroupQuotaRequestBaseProperties().withLimit(1000418976764057169L) - .withRegion("fepgzgq") - .withComments("zloc"); - model = BinaryData.fromObject(model).toObject(GroupQuotaRequestBaseProperties.class); - Assertions.assertEquals(1000418976764057169L, model.limit()); - Assertions.assertEquals("fepgzgq", model.region()); - Assertions.assertEquals("zloc", model.comments()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaRequestBaseTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaRequestBaseTests.java deleted file mode 100644 index 46ed9036c537..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaRequestBaseTests.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.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.models.GroupQuotaRequestBase; -import org.junit.jupiter.api.Assertions; - -public final class GroupQuotaRequestBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GroupQuotaRequestBase model = BinaryData.fromString( - "{\"properties\":{\"limit\":73742112490406036,\"name\":{\"value\":\"rjb\",\"localizedValue\":\"orcjxvsnby\"},\"region\":\"abnmocpcyshu\",\"comments\":\"afbljjgpbtoqcjmk\"}}") - .toObject(GroupQuotaRequestBase.class); - Assertions.assertEquals(73742112490406036L, model.limit()); - Assertions.assertEquals("abnmocpcyshu", model.region()); - Assertions.assertEquals("afbljjgpbtoqcjmk", model.comments()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GroupQuotaRequestBase model = new GroupQuotaRequestBase().withLimit(73742112490406036L) - .withRegion("abnmocpcyshu") - .withComments("afbljjgpbtoqcjmk"); - model = BinaryData.fromObject(model).toObject(GroupQuotaRequestBase.class); - Assertions.assertEquals(73742112490406036L, model.limit()); - Assertions.assertEquals("abnmocpcyshu", model.region()); - Assertions.assertEquals("afbljjgpbtoqcjmk", model.comments()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaSubscriptionAllocationRequestsUpdateMockTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaSubscriptionAllocationRequestsUpdateMockTests.java deleted file mode 100644 index c2281d67319a..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaSubscriptionAllocationRequestsUpdateMockTests.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.quota.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.quota.QuotaManager; -import com.azure.resourcemanager.quota.fluent.models.SubscriptionQuotaAllocationsListInner; -import com.azure.resourcemanager.quota.models.SubscriptionQuotaAllocations; -import com.azure.resourcemanager.quota.models.SubscriptionQuotaAllocationsList; -import com.azure.resourcemanager.quota.models.SubscriptionQuotaAllocationsListProperties; -import com.azure.resourcemanager.quota.models.SubscriptionQuotaAllocationsProperties; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class GroupQuotaSubscriptionAllocationRequestsUpdateMockTests { - @Test - public void testUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"value\":[{\"properties\":{\"resourceName\":\"xyjrxsagafcnih\",\"limit\":3130876298104392093,\"shareableQuota\":7972426552267245030,\"name\":{}}},{\"properties\":{\"resourceName\":\"bcvkcvqvpkeq\",\"limit\":7022646379651256978,\"shareableQuota\":5404644626428061791,\"name\":{}}},{\"properties\":{\"resourceName\":\"sotbob\",\"limit\":288160158988796372,\"shareableQuota\":510217030550797810,\"name\":{}}},{\"properties\":{\"resourceName\":\"dldwmgxc\",\"limit\":521643942642292025,\"shareableQuota\":7930800985951614116,\"name\":{}}}],\"nextLink\":\"uoegrpkhjwniyqs\"},\"id\":\"i\",\"name\":\"pdggkzzlvm\",\"type\":\"mpaxmodfvuefywsb\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - QuotaManager manager = QuotaManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - SubscriptionQuotaAllocationsList response = manager.groupQuotaSubscriptionAllocationRequests() - .update("cjefuzmu", "pbttdum", "rp", "xe", new SubscriptionQuotaAllocationsListInner() - .withProperties(new SubscriptionQuotaAllocationsListProperties().withValue(Arrays.asList( - new SubscriptionQuotaAllocations() - .withProperties(new SubscriptionQuotaAllocationsProperties().withResourceName("jpglkfgohdne") - .withLimit(7022736295865930419L)), - new SubscriptionQuotaAllocations() - .withProperties(new SubscriptionQuotaAllocationsProperties().withResourceName("t") - .withLimit(960595332999400866L)), - new SubscriptionQuotaAllocations() - .withProperties(new SubscriptionQuotaAllocationsProperties().withResourceName("uuvxz") - .withLimit(6214959618688242083L)), - new SubscriptionQuotaAllocations() - .withProperties(new SubscriptionQuotaAllocationsProperties().withResourceName("o") - .withLimit(2084595584241101757L))))), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("xyjrxsagafcnih", response.properties().value().get(0).properties().resourceName()); - Assertions.assertEquals(3130876298104392093L, response.properties().value().get(0).properties().limit()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaSubscriptionAllocationsListWithResponseMockTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaSubscriptionAllocationsListWithResponseMockTests.java deleted file mode 100644 index 467747cb7188..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaSubscriptionAllocationsListWithResponseMockTests.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.quota.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.quota.QuotaManager; -import com.azure.resourcemanager.quota.models.SubscriptionQuotaAllocationsList; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class GroupQuotaSubscriptionAllocationsListWithResponseMockTests { - @Test - public void testListWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"provisioningState\":\"Succeeded\",\"value\":[{\"properties\":{\"resourceName\":\"vfbtkuwh\",\"limit\":8532271889690426142,\"shareableQuota\":2308997283285722741,\"name\":{}}}],\"nextLink\":\"afnn\"},\"id\":\"pichkoymkcdy\",\"name\":\"bpkkpwdre\",\"type\":\"novvqfovljxy\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - QuotaManager manager = QuotaManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - SubscriptionQuotaAllocationsList response = manager.groupQuotaSubscriptionAllocations() - .listWithResponse("p", "kulpiujwaasi", "qiiobyuqer", "qlpqwcciuq", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("vfbtkuwh", response.properties().value().get(0).properties().resourceName()); - Assertions.assertEquals(8532271889690426142L, response.properties().value().get(0).properties().limit()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaSubscriptionIdInnerTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaSubscriptionIdInnerTests.java deleted file mode 100644 index c1d14e9a4f04..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaSubscriptionIdInnerTests.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.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.fluent.models.GroupQuotaSubscriptionIdInner; -import com.azure.resourcemanager.quota.models.GroupQuotaSubscriptionIdProperties; -import org.junit.jupiter.api.Assertions; - -public final class GroupQuotaSubscriptionIdInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GroupQuotaSubscriptionIdInner model = BinaryData.fromString( - "{\"properties\":{\"subscriptionId\":\"ikxwc\",\"provisioningState\":\"Accepted\"},\"id\":\"cnpqxuhivyqniwby\",\"name\":\"rkxvdum\",\"type\":\"grtfwvu\"}") - .toObject(GroupQuotaSubscriptionIdInner.class); - Assertions.assertEquals("ikxwc", model.properties().subscriptionId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GroupQuotaSubscriptionIdInner model = new GroupQuotaSubscriptionIdInner() - .withProperties(new GroupQuotaSubscriptionIdProperties().withSubscriptionId("ikxwc")); - model = BinaryData.fromObject(model).toObject(GroupQuotaSubscriptionIdInner.class); - Assertions.assertEquals("ikxwc", model.properties().subscriptionId()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaSubscriptionIdListTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaSubscriptionIdListTests.java deleted file mode 100644 index 58d2aa62f059..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaSubscriptionIdListTests.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.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.fluent.models.GroupQuotaSubscriptionIdInner; -import com.azure.resourcemanager.quota.models.GroupQuotaSubscriptionIdList; -import com.azure.resourcemanager.quota.models.GroupQuotaSubscriptionIdProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class GroupQuotaSubscriptionIdListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GroupQuotaSubscriptionIdList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"subscriptionId\":\"yejhk\",\"provisioningState\":\"Invalid\"},\"id\":\"napczwlokjy\",\"name\":\"mkkvnip\",\"type\":\"oxzjnchgejspod\"}],\"nextLink\":\"ilzyd\"}") - .toObject(GroupQuotaSubscriptionIdList.class); - Assertions.assertEquals("yejhk", model.value().get(0).properties().subscriptionId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GroupQuotaSubscriptionIdList model - = new GroupQuotaSubscriptionIdList().withValue(Arrays.asList(new GroupQuotaSubscriptionIdInner() - .withProperties(new GroupQuotaSubscriptionIdProperties().withSubscriptionId("yejhk")))); - model = BinaryData.fromObject(model).toObject(GroupQuotaSubscriptionIdList.class); - Assertions.assertEquals("yejhk", model.value().get(0).properties().subscriptionId()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaSubscriptionIdPropertiesTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaSubscriptionIdPropertiesTests.java deleted file mode 100644 index 676d3eefa2d5..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaSubscriptionIdPropertiesTests.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.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.models.GroupQuotaSubscriptionIdProperties; -import org.junit.jupiter.api.Assertions; - -public final class GroupQuotaSubscriptionIdPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GroupQuotaSubscriptionIdProperties model - = BinaryData.fromString("{\"subscriptionId\":\"gaudcc\",\"provisioningState\":\"Accepted\"}") - .toObject(GroupQuotaSubscriptionIdProperties.class); - Assertions.assertEquals("gaudcc", model.subscriptionId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GroupQuotaSubscriptionIdProperties model - = new GroupQuotaSubscriptionIdProperties().withSubscriptionId("gaudcc"); - model = BinaryData.fromObject(model).toObject(GroupQuotaSubscriptionIdProperties.class); - Assertions.assertEquals("gaudcc", model.subscriptionId()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaSubscriptionRequestStatusInnerTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaSubscriptionRequestStatusInnerTests.java deleted file mode 100644 index 7f8fb806ef80..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaSubscriptionRequestStatusInnerTests.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.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.fluent.models.GroupQuotaSubscriptionRequestStatusInner; -import com.azure.resourcemanager.quota.models.GroupQuotaSubscriptionRequestStatusProperties; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class GroupQuotaSubscriptionRequestStatusInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GroupQuotaSubscriptionRequestStatusInner model = BinaryData.fromString( - "{\"properties\":{\"subscriptionId\":\"hulsuuvmkjozkrwf\",\"requestSubmitTime\":\"2021-02-17T13:52:13Z\",\"provisioningState\":\"Succeeded\"},\"id\":\"pslwejdpvw\",\"name\":\"yoqpsoaccta\",\"type\":\"akl\"}") - .toObject(GroupQuotaSubscriptionRequestStatusInner.class); - Assertions.assertEquals("hulsuuvmkjozkrwf", model.properties().subscriptionId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-17T13:52:13Z"), model.properties().requestSubmitTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GroupQuotaSubscriptionRequestStatusInner model = new GroupQuotaSubscriptionRequestStatusInner() - .withProperties(new GroupQuotaSubscriptionRequestStatusProperties().withSubscriptionId("hulsuuvmkjozkrwf") - .withRequestSubmitTime(OffsetDateTime.parse("2021-02-17T13:52:13Z"))); - model = BinaryData.fromObject(model).toObject(GroupQuotaSubscriptionRequestStatusInner.class); - Assertions.assertEquals("hulsuuvmkjozkrwf", model.properties().subscriptionId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-17T13:52:13Z"), model.properties().requestSubmitTime()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaSubscriptionRequestStatusListTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaSubscriptionRequestStatusListTests.java deleted file mode 100644 index acfbd3e18772..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaSubscriptionRequestStatusListTests.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.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.fluent.models.GroupQuotaSubscriptionRequestStatusInner; -import com.azure.resourcemanager.quota.models.GroupQuotaSubscriptionRequestStatusList; -import com.azure.resourcemanager.quota.models.GroupQuotaSubscriptionRequestStatusProperties; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class GroupQuotaSubscriptionRequestStatusListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GroupQuotaSubscriptionRequestStatusList model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"subscriptionId\":\"yahux\",\"requestSubmitTime\":\"2021-07-08T12:15:19Z\",\"provisioningState\":\"InProgress\"},\"id\":\"jaqwixjsp\",\"name\":\"ozvcput\",\"type\":\"gjvw\"}],\"nextLink\":\"datscmd\"}") - .toObject(GroupQuotaSubscriptionRequestStatusList.class); - Assertions.assertEquals("yahux", model.value().get(0).properties().subscriptionId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-08T12:15:19Z"), - model.value().get(0).properties().requestSubmitTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GroupQuotaSubscriptionRequestStatusList model = new GroupQuotaSubscriptionRequestStatusList() - .withValue(Arrays.asList(new GroupQuotaSubscriptionRequestStatusInner() - .withProperties(new GroupQuotaSubscriptionRequestStatusProperties().withSubscriptionId("yahux") - .withRequestSubmitTime(OffsetDateTime.parse("2021-07-08T12:15:19Z"))))); - model = BinaryData.fromObject(model).toObject(GroupQuotaSubscriptionRequestStatusList.class); - Assertions.assertEquals("yahux", model.value().get(0).properties().subscriptionId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-08T12:15:19Z"), - model.value().get(0).properties().requestSubmitTime()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaSubscriptionRequestStatusPropertiesTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaSubscriptionRequestStatusPropertiesTests.java deleted file mode 100644 index bd46d91614a1..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaSubscriptionRequestStatusPropertiesTests.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.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.models.GroupQuotaSubscriptionRequestStatusProperties; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; - -public final class GroupQuotaSubscriptionRequestStatusPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GroupQuotaSubscriptionRequestStatusProperties model = BinaryData.fromString( - "{\"subscriptionId\":\"ahbc\",\"requestSubmitTime\":\"2021-05-25T21:39:12Z\",\"provisioningState\":\"Created\"}") - .toObject(GroupQuotaSubscriptionRequestStatusProperties.class); - Assertions.assertEquals("ahbc", model.subscriptionId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-25T21:39:12Z"), model.requestSubmitTime()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GroupQuotaSubscriptionRequestStatusProperties model - = new GroupQuotaSubscriptionRequestStatusProperties().withSubscriptionId("ahbc") - .withRequestSubmitTime(OffsetDateTime.parse("2021-05-25T21:39:12Z")); - model = BinaryData.fromObject(model).toObject(GroupQuotaSubscriptionRequestStatusProperties.class); - Assertions.assertEquals("ahbc", model.subscriptionId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-05-25T21:39:12Z"), model.requestSubmitTime()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaSubscriptionRequestsGetWithResponseMockTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaSubscriptionRequestsGetWithResponseMockTests.java deleted file mode 100644 index d2911ed4dd88..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaSubscriptionRequestsGetWithResponseMockTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.quota.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.quota.QuotaManager; -import com.azure.resourcemanager.quota.models.GroupQuotaSubscriptionRequestStatus; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class GroupQuotaSubscriptionRequestsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"subscriptionId\":\"xwyjsflhhc\",\"requestSubmitTime\":\"2021-07-31T18:32:18Z\",\"provisioningState\":\"Canceled\"},\"id\":\"xisxyawjoyaqcsl\",\"name\":\"jpkiidzyexznelix\",\"type\":\"nr\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - QuotaManager manager = QuotaManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - GroupQuotaSubscriptionRequestStatus response = manager.groupQuotaSubscriptionRequests() - .getWithResponse("uusdttouwa", "oekqvk", "lns", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("xwyjsflhhc", response.properties().subscriptionId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-31T18:32:18Z"), - response.properties().requestSubmitTime()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaSubscriptionRequestsListMockTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaSubscriptionRequestsListMockTests.java deleted file mode 100644 index 3442ce8bcfa1..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaSubscriptionRequestsListMockTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.quota.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.quota.QuotaManager; -import com.azure.resourcemanager.quota.models.GroupQuotaSubscriptionRequestStatus; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class GroupQuotaSubscriptionRequestsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"subscriptionId\":\"peilpjzuaejxdu\",\"requestSubmitTime\":\"2021-04-04T06:42:49Z\",\"provisioningState\":\"Invalid\"},\"id\":\"btdzumveekg\",\"name\":\"wozuhkf\",\"type\":\"bsjyofdx\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - QuotaManager manager = QuotaManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response - = manager.groupQuotaSubscriptionRequests().list("vawjvzunlu", "hnnpr", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("peilpjzuaejxdu", response.iterator().next().properties().subscriptionId()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-04T06:42:49Z"), - response.iterator().next().properties().requestSubmitTime()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaSubscriptionsCreateOrUpdateMockTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaSubscriptionsCreateOrUpdateMockTests.java deleted file mode 100644 index bbc51048c129..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaSubscriptionsCreateOrUpdateMockTests.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.quota.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.quota.QuotaManager; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class GroupQuotaSubscriptionsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr = "{\"id\":\"klwndnhjdauwhv\",\"name\":\"l\",\"type\":\"zbtd\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - QuotaManager manager = QuotaManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - ProxyResource response = manager.groupQuotaSubscriptions() - .createOrUpdate("nrjawgqwg", "hniskxfbkpyc", com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaSubscriptionsGetWithResponseMockTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaSubscriptionsGetWithResponseMockTests.java deleted file mode 100644 index af9f99e2379b..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaSubscriptionsGetWithResponseMockTests.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.quota.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.quota.QuotaManager; -import com.azure.resourcemanager.quota.models.GroupQuotaSubscriptionId; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class GroupQuotaSubscriptionsGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"subscriptionId\":\"gwyzm\",\"provisioningState\":\"InProgress\"},\"id\":\"ngmtsavjcb\",\"name\":\"wxqpsrknftguvri\",\"type\":\"hprwmdyv\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - QuotaManager manager = QuotaManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - GroupQuotaSubscriptionId response = manager.groupQuotaSubscriptions() - .getWithResponse("nmxiebwwaloayqc", "wrtz", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("gwyzm", response.properties().subscriptionId()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaSubscriptionsListMockTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaSubscriptionsListMockTests.java deleted file mode 100644 index 238f225958ce..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaSubscriptionsListMockTests.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.quota.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.quota.QuotaManager; -import com.azure.resourcemanager.quota.models.GroupQuotaSubscriptionId; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class GroupQuotaSubscriptionsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"subscriptionId\":\"cnojvknmefqsg\",\"provisioningState\":\"Canceled\"},\"id\":\"apj\",\"name\":\"zhpvgqzcjrvxd\",\"type\":\"zlmwlxkvugfhz\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - QuotaManager manager = QuotaManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response - = manager.groupQuotaSubscriptions().list("qtayri", "wroyqbexrmcq", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("cnojvknmefqsg", response.iterator().next().properties().subscriptionId()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaSubscriptionsUpdateMockTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaSubscriptionsUpdateMockTests.java deleted file mode 100644 index 986b346c38bd..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotaSubscriptionsUpdateMockTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.quota.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.quota.QuotaManager; -import com.azure.resourcemanager.quota.models.GroupQuotaSubscriptionId; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class GroupQuotaSubscriptionsUpdateMockTests { - @Test - public void testUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"subscriptionId\":\"pjmkhfxobbc\",\"provisioningState\":\"Succeeded\"},\"id\":\"tjrip\",\"name\":\"rbpbewtghfgblcg\",\"type\":\"xzvlvqhjkbegib\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - QuotaManager manager = QuotaManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - GroupQuotaSubscriptionId response - = manager.groupQuotaSubscriptions().update("xujznbmpowu", "przqlveu", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("pjmkhfxobbc", response.properties().subscriptionId()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotasCreateOrUpdateMockTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotasCreateOrUpdateMockTests.java deleted file mode 100644 index 2168e289de3a..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotasCreateOrUpdateMockTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.quota.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.ProxyResource; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.quota.QuotaManager; -import com.azure.resourcemanager.quota.fluent.models.GroupQuotasEntityInner; -import com.azure.resourcemanager.quota.models.GroupQuotasEntityProperties; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class GroupQuotasCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr = "{\"id\":\"fudwpznt\",\"name\":\"hdzhlrqj\",\"type\":\"hckfrlhrx\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - QuotaManager manager = QuotaManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - ProxyResource response - = manager.groupQuotas() - .createOrUpdate("bgyepsbj", "azqugxywpmueefj", - new GroupQuotasEntityInner() - .withProperties(new GroupQuotasEntityProperties().withDisplayName("qkqujidsu")), - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotasEntityBasePatchTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotasEntityBasePatchTests.java deleted file mode 100644 index f19aa7461628..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotasEntityBasePatchTests.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.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.models.GroupQuotasEntityBasePatch; -import org.junit.jupiter.api.Assertions; - -public final class GroupQuotasEntityBasePatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GroupQuotasEntityBasePatch model - = BinaryData.fromString("{\"displayName\":\"f\",\"provisioningState\":\"Failed\"}") - .toObject(GroupQuotasEntityBasePatch.class); - Assertions.assertEquals("f", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GroupQuotasEntityBasePatch model = new GroupQuotasEntityBasePatch().withDisplayName("f"); - model = BinaryData.fromObject(model).toObject(GroupQuotasEntityBasePatch.class); - Assertions.assertEquals("f", model.displayName()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotasEntityBaseTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotasEntityBaseTests.java deleted file mode 100644 index 539a9d198533..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotasEntityBaseTests.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.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.models.GroupQuotasEntityBase; -import org.junit.jupiter.api.Assertions; - -public final class GroupQuotasEntityBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GroupQuotasEntityBase model - = BinaryData.fromString("{\"displayName\":\"msxaobhd\",\"provisioningState\":\"Succeeded\"}") - .toObject(GroupQuotasEntityBase.class); - Assertions.assertEquals("msxaobhd", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GroupQuotasEntityBase model = new GroupQuotasEntityBase().withDisplayName("msxaobhd"); - model = BinaryData.fromObject(model).toObject(GroupQuotasEntityBase.class); - Assertions.assertEquals("msxaobhd", model.displayName()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotasEntityInnerTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotasEntityInnerTests.java deleted file mode 100644 index 1eccc1b3d3a3..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotasEntityInnerTests.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.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.fluent.models.GroupQuotasEntityInner; -import com.azure.resourcemanager.quota.models.GroupQuotasEntityProperties; -import org.junit.jupiter.api.Assertions; - -public final class GroupQuotasEntityInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GroupQuotasEntityInner model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"hq\",\"provisioningState\":\"InProgress\"},\"id\":\"xpyb\",\"name\":\"zm\",\"type\":\"hmtzopbsphrup\"}") - .toObject(GroupQuotasEntityInner.class); - Assertions.assertEquals("hq", model.properties().displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GroupQuotasEntityInner model - = new GroupQuotasEntityInner().withProperties(new GroupQuotasEntityProperties().withDisplayName("hq")); - model = BinaryData.fromObject(model).toObject(GroupQuotasEntityInner.class); - Assertions.assertEquals("hq", model.properties().displayName()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotasEntityPatchPropertiesTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotasEntityPatchPropertiesTests.java deleted file mode 100644 index 5f9f63a16d74..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotasEntityPatchPropertiesTests.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.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.models.GroupQuotasEntityPatchProperties; -import org.junit.jupiter.api.Assertions; - -public final class GroupQuotasEntityPatchPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GroupQuotasEntityPatchProperties model - = BinaryData.fromString("{\"displayName\":\"fsqesaagdfmglzlh\",\"provisioningState\":\"Failed\"}") - .toObject(GroupQuotasEntityPatchProperties.class); - Assertions.assertEquals("fsqesaagdfmglzlh", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GroupQuotasEntityPatchProperties model - = new GroupQuotasEntityPatchProperties().withDisplayName("fsqesaagdfmglzlh"); - model = BinaryData.fromObject(model).toObject(GroupQuotasEntityPatchProperties.class); - Assertions.assertEquals("fsqesaagdfmglzlh", model.displayName()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotasEntityPatchTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotasEntityPatchTests.java deleted file mode 100644 index 73fbe5222d9c..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotasEntityPatchTests.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.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.models.GroupQuotasEntityPatch; -import com.azure.resourcemanager.quota.models.GroupQuotasEntityPatchProperties; -import org.junit.jupiter.api.Assertions; - -public final class GroupQuotasEntityPatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GroupQuotasEntityPatch model = BinaryData.fromString( - "{\"properties\":{\"displayName\":\"oqijgkdmbpaz\",\"provisioningState\":\"Failed\"},\"id\":\"ufpdznrbtcqq\",\"name\":\"nq\",\"type\":\"lhqgnufooojy\"}") - .toObject(GroupQuotasEntityPatch.class); - Assertions.assertEquals("oqijgkdmbpaz", model.properties().displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GroupQuotasEntityPatch model = new GroupQuotasEntityPatch() - .withProperties(new GroupQuotasEntityPatchProperties().withDisplayName("oqijgkdmbpaz")); - model = BinaryData.fromObject(model).toObject(GroupQuotasEntityPatch.class); - Assertions.assertEquals("oqijgkdmbpaz", model.properties().displayName()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotasEntityPropertiesTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotasEntityPropertiesTests.java deleted file mode 100644 index 60643387118e..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotasEntityPropertiesTests.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.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.models.GroupQuotasEntityProperties; -import org.junit.jupiter.api.Assertions; - -public final class GroupQuotasEntityPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GroupQuotasEntityProperties model - = BinaryData.fromString("{\"displayName\":\"gsybbejhp\",\"provisioningState\":\"Accepted\"}") - .toObject(GroupQuotasEntityProperties.class); - Assertions.assertEquals("gsybbejhp", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GroupQuotasEntityProperties model = new GroupQuotasEntityProperties().withDisplayName("gsybbejhp"); - model = BinaryData.fromObject(model).toObject(GroupQuotasEntityProperties.class); - Assertions.assertEquals("gsybbejhp", model.displayName()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotasGetWithResponseMockTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotasGetWithResponseMockTests.java deleted file mode 100644 index 94d75cc7331b..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotasGetWithResponseMockTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.quota.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.quota.QuotaManager; -import com.azure.resourcemanager.quota.models.GroupQuotasEntity; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class GroupQuotasGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"displayName\":\"gwb\",\"provisioningState\":\"Canceled\"},\"id\":\"ldawkzbaliourqha\",\"name\":\"auhashsfwx\",\"type\":\"sowzxcugi\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - QuotaManager manager = QuotaManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - GroupQuotasEntity response - = manager.groupQuotas().getWithResponse("crgvxpvgom", "lf", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("gwb", response.properties().displayName()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotasListMockTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotasListMockTests.java deleted file mode 100644 index d55e6eb69e1f..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotasListMockTests.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.quota.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.quota.QuotaManager; -import com.azure.resourcemanager.quota.models.GroupQuotasEntity; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class GroupQuotasListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"displayName\":\"wwfvov\",\"provisioningState\":\"Created\"},\"id\":\"uecivyhz\",\"name\":\"euojgjrwju\",\"type\":\"iotwmcdytdxwit\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - QuotaManager manager = QuotaManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response - = manager.groupQuotas().list("jooxdjebw", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("wwfvov", response.iterator().next().properties().displayName()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotasUpdateMockTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotasUpdateMockTests.java deleted file mode 100644 index 7bad4aa2a7d8..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/GroupQuotasUpdateMockTests.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.quota.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.quota.QuotaManager; -import com.azure.resourcemanager.quota.models.GroupQuotasEntity; -import com.azure.resourcemanager.quota.models.GroupQuotasEntityPatch; -import com.azure.resourcemanager.quota.models.GroupQuotasEntityPatchProperties; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class GroupQuotasUpdateMockTests { - @Test - public void testUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"displayName\":\"krh\",\"provisioningState\":\"Succeeded\"},\"id\":\"juahaquhcdhmdual\",\"name\":\"exq\",\"type\":\"vfadmws\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - QuotaManager manager = QuotaManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - GroupQuotasEntity response = manager.groupQuotas() - .update("bkyvp", "ca", - new GroupQuotasEntityPatch() - .withProperties(new GroupQuotasEntityPatchProperties().withDisplayName("bpzkafkuwbc")), - com.azure.core.util.Context.NONE); - - Assertions.assertEquals("krh", response.properties().displayName()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/LimitJsonObjectTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/LimitJsonObjectTests.java deleted file mode 100644 index ccb672b72195..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/LimitJsonObjectTests.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.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.models.LimitJsonObject; - -public final class LimitJsonObjectTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LimitJsonObject model - = BinaryData.fromString("{\"limitObjectType\":\"LimitJsonObject\"}").toObject(LimitJsonObject.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LimitJsonObject model = new LimitJsonObject(); - model = BinaryData.fromObject(model).toObject(LimitJsonObject.class); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/LimitObjectTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/LimitObjectTests.java deleted file mode 100644 index 7088e763be7e..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/LimitObjectTests.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.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.models.LimitObject; -import com.azure.resourcemanager.quota.models.QuotaLimitTypes; -import org.junit.jupiter.api.Assertions; - -public final class LimitObjectTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LimitObject model = BinaryData - .fromString("{\"limitObjectType\":\"LimitValue\",\"value\":1106219716,\"limitType\":\"Independent\"}") - .toObject(LimitObject.class); - Assertions.assertEquals(1106219716, model.value()); - Assertions.assertEquals(QuotaLimitTypes.INDEPENDENT, model.limitType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LimitObject model = new LimitObject().withValue(1106219716).withLimitType(QuotaLimitTypes.INDEPENDENT); - model = BinaryData.fromObject(model).toObject(LimitObject.class); - Assertions.assertEquals(1106219716, model.value()); - Assertions.assertEquals(QuotaLimitTypes.INDEPENDENT, model.limitType()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/LroResponseInnerTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/LroResponseInnerTests.java deleted file mode 100644 index 7d94a1e1ba48..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/LroResponseInnerTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.fluent.models.LroResponseInner; -import com.azure.resourcemanager.quota.models.LroResponseProperties; - -public final class LroResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LroResponseInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Succeeded\"},\"id\":\"qj\",\"name\":\"ehtbm\",\"type\":\"fpownoizhwlr\"}") - .toObject(LroResponseInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LroResponseInner model = new LroResponseInner().withProperties(new LroResponseProperties()); - model = BinaryData.fromObject(model).toObject(LroResponseInner.class); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/LroResponsePropertiesTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/LroResponsePropertiesTests.java deleted file mode 100644 index 8cc31b815e43..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/LroResponsePropertiesTests.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.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.models.LroResponseProperties; - -public final class LroResponsePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LroResponseProperties model - = BinaryData.fromString("{\"provisioningState\":\"Accepted\"}").toObject(LroResponseProperties.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LroResponseProperties model = new LroResponseProperties(); - model = BinaryData.fromObject(model).toObject(LroResponseProperties.class); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/OperationDisplayTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/OperationDisplayTests.java deleted file mode 100644 index 55a1f50550ce..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/OperationDisplayTests.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.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.models.OperationDisplay; -import org.junit.jupiter.api.Assertions; - -public final class OperationDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDisplay model = BinaryData.fromString( - "{\"provider\":\"fj\",\"resource\":\"njbkcnxdhbttkph\",\"operation\":\"pnvjtoqnermclf\",\"description\":\"phoxus\"}") - .toObject(OperationDisplay.class); - Assertions.assertEquals("fj", model.provider()); - Assertions.assertEquals("njbkcnxdhbttkph", model.resource()); - Assertions.assertEquals("pnvjtoqnermclf", model.operation()); - Assertions.assertEquals("phoxus", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = new OperationDisplay().withProvider("fj") - .withResource("njbkcnxdhbttkph") - .withOperation("pnvjtoqnermclf") - .withDescription("phoxus"); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - Assertions.assertEquals("fj", model.provider()); - Assertions.assertEquals("njbkcnxdhbttkph", model.resource()); - Assertions.assertEquals("pnvjtoqnermclf", model.operation()); - Assertions.assertEquals("phoxus", model.description()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/OperationListTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/OperationListTests.java deleted file mode 100644 index c01c35d20a84..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/OperationListTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.fluent.models.OperationResponseInner; -import com.azure.resourcemanager.quota.models.OperationDisplay; -import com.azure.resourcemanager.quota.models.OperationList; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OperationListTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationList model = BinaryData.fromString( - "{\"value\":[{\"name\":\"qukkfp\",\"display\":{\"provider\":\"gsxnkjzkdeslpv\",\"resource\":\"pwiyig\",\"operation\":\"pkdwzbai\",\"description\":\"bbaumnyquped\"},\"origin\":\"jn\"}],\"nextLink\":\"ckhsmtxpsieb\"}") - .toObject(OperationList.class); - Assertions.assertEquals("qukkfp", model.value().get(0).name()); - Assertions.assertEquals("gsxnkjzkdeslpv", model.value().get(0).display().provider()); - Assertions.assertEquals("pwiyig", model.value().get(0).display().resource()); - Assertions.assertEquals("pkdwzbai", model.value().get(0).display().operation()); - Assertions.assertEquals("bbaumnyquped", model.value().get(0).display().description()); - Assertions.assertEquals("jn", model.value().get(0).origin()); - Assertions.assertEquals("ckhsmtxpsieb", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationList model - = new OperationList().withValue(Arrays.asList(new OperationResponseInner().withName("qukkfp") - .withDisplay(new OperationDisplay().withProvider("gsxnkjzkdeslpv") - .withResource("pwiyig") - .withOperation("pkdwzbai") - .withDescription("bbaumnyquped")) - .withOrigin("jn"))).withNextLink("ckhsmtxpsieb"); - model = BinaryData.fromObject(model).toObject(OperationList.class); - Assertions.assertEquals("qukkfp", model.value().get(0).name()); - Assertions.assertEquals("gsxnkjzkdeslpv", model.value().get(0).display().provider()); - Assertions.assertEquals("pwiyig", model.value().get(0).display().resource()); - Assertions.assertEquals("pkdwzbai", model.value().get(0).display().operation()); - Assertions.assertEquals("bbaumnyquped", model.value().get(0).display().description()); - Assertions.assertEquals("jn", model.value().get(0).origin()); - Assertions.assertEquals("ckhsmtxpsieb", model.nextLink()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/OperationResponseInnerTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/OperationResponseInnerTests.java deleted file mode 100644 index 96b87faae405..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/OperationResponseInnerTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.fluent.models.OperationResponseInner; -import com.azure.resourcemanager.quota.models.OperationDisplay; -import org.junit.jupiter.api.Assertions; - -public final class OperationResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationResponseInner model = BinaryData.fromString( - "{\"name\":\"hvpesapskrdqm\",\"display\":{\"provider\":\"dhtldwkyz\",\"resource\":\"utknc\",\"operation\":\"cwsvlxotog\",\"description\":\"rupqsxvnmicy\"},\"origin\":\"ceoveilovno\"}") - .toObject(OperationResponseInner.class); - Assertions.assertEquals("hvpesapskrdqm", model.name()); - Assertions.assertEquals("dhtldwkyz", model.display().provider()); - Assertions.assertEquals("utknc", model.display().resource()); - Assertions.assertEquals("cwsvlxotog", model.display().operation()); - Assertions.assertEquals("rupqsxvnmicy", model.display().description()); - Assertions.assertEquals("ceoveilovno", model.origin()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationResponseInner model = new OperationResponseInner().withName("hvpesapskrdqm") - .withDisplay(new OperationDisplay().withProvider("dhtldwkyz") - .withResource("utknc") - .withOperation("cwsvlxotog") - .withDescription("rupqsxvnmicy")) - .withOrigin("ceoveilovno"); - model = BinaryData.fromObject(model).toObject(OperationResponseInner.class); - Assertions.assertEquals("hvpesapskrdqm", model.name()); - Assertions.assertEquals("dhtldwkyz", model.display().provider()); - Assertions.assertEquals("utknc", model.display().resource()); - Assertions.assertEquals("cwsvlxotog", model.display().operation()); - Assertions.assertEquals("rupqsxvnmicy", model.display().description()); - Assertions.assertEquals("ceoveilovno", model.origin()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotaAllocationRequestBasePropertiesNameTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotaAllocationRequestBasePropertiesNameTests.java deleted file mode 100644 index b54055725a55..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotaAllocationRequestBasePropertiesNameTests.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.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.fluent.models.QuotaAllocationRequestBasePropertiesName; - -public final class QuotaAllocationRequestBasePropertiesNameTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - QuotaAllocationRequestBasePropertiesName model - = BinaryData.fromString("{\"value\":\"zrkgqhcjrefovg\",\"localizedValue\":\"qsl\"}") - .toObject(QuotaAllocationRequestBasePropertiesName.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - QuotaAllocationRequestBasePropertiesName model = new QuotaAllocationRequestBasePropertiesName(); - model = BinaryData.fromObject(model).toObject(QuotaAllocationRequestBasePropertiesName.class); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotaAllocationRequestBasePropertiesTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotaAllocationRequestBasePropertiesTests.java deleted file mode 100644 index 905f230abf45..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotaAllocationRequestBasePropertiesTests.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.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.fluent.models.QuotaAllocationRequestBaseProperties; -import org.junit.jupiter.api.Assertions; - -public final class QuotaAllocationRequestBasePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - QuotaAllocationRequestBaseProperties model = BinaryData.fromString( - "{\"limit\":6472421771400984812,\"name\":{\"value\":\"yvdcsitynnaa\",\"localizedValue\":\"ectehf\"},\"region\":\"scjeypv\"}") - .toObject(QuotaAllocationRequestBaseProperties.class); - Assertions.assertEquals(6472421771400984812L, model.limit()); - Assertions.assertEquals("scjeypv", model.region()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - QuotaAllocationRequestBaseProperties model - = new QuotaAllocationRequestBaseProperties().withLimit(6472421771400984812L).withRegion("scjeypv"); - model = BinaryData.fromObject(model).toObject(QuotaAllocationRequestBaseProperties.class); - Assertions.assertEquals(6472421771400984812L, model.limit()); - Assertions.assertEquals("scjeypv", model.region()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotaAllocationRequestBaseTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotaAllocationRequestBaseTests.java deleted file mode 100644 index 059cba592193..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotaAllocationRequestBaseTests.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.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.models.QuotaAllocationRequestBase; -import org.junit.jupiter.api.Assertions; - -public final class QuotaAllocationRequestBaseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - QuotaAllocationRequestBase model = BinaryData.fromString( - "{\"properties\":{\"limit\":753338547504300720,\"name\":{\"value\":\"hslazjdyggdtj\",\"localizedValue\":\"hbkuofqwey\"},\"region\":\"menevfyexfwh\"}}") - .toObject(QuotaAllocationRequestBase.class); - Assertions.assertEquals(753338547504300720L, model.limit()); - Assertions.assertEquals("menevfyexfwh", model.region()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - QuotaAllocationRequestBase model - = new QuotaAllocationRequestBase().withLimit(753338547504300720L).withRegion("menevfyexfwh"); - model = BinaryData.fromObject(model).toObject(QuotaAllocationRequestBase.class); - Assertions.assertEquals(753338547504300720L, model.limit()); - Assertions.assertEquals("menevfyexfwh", model.region()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotaLimitsTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotaLimitsTests.java deleted file mode 100644 index 18a34fe6d6fa..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotaLimitsTests.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.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.fluent.models.CurrentQuotaLimitBaseInner; -import com.azure.resourcemanager.quota.models.LimitJsonObject; -import com.azure.resourcemanager.quota.models.QuotaLimits; -import com.azure.resourcemanager.quota.models.QuotaProperties; -import com.azure.resourcemanager.quota.models.ResourceName; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class QuotaLimitsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - QuotaLimits model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"limit\":{\"limitObjectType\":\"LimitJsonObject\"},\"unit\":\"idokgjlj\",\"name\":{\"value\":\"gvcl\",\"localizedValue\":\"gsncghkjeszz\"},\"resourceType\":\"ijhtxf\",\"quotaPeriod\":\"xbf\",\"isQuotaApplicable\":true,\"properties\":\"dataeh\"},\"id\":\"pvecxgodeb\",\"name\":\"qkkrb\",\"type\":\"pukgriwflzlfb\"},{\"properties\":{\"limit\":{\"limitObjectType\":\"LimitJsonObject\"},\"unit\":\"zycispn\",\"name\":{\"value\":\"hmgkbrpyy\",\"localizedValue\":\"ibnuqqkpik\"},\"resourceType\":\"rgvtqag\",\"quotaPeriod\":\"uynhijg\",\"isQuotaApplicable\":false,\"properties\":\"datafsiarbutr\"},\"id\":\"vpnazzm\",\"name\":\"jrunmpxtt\",\"type\":\"bh\"}],\"nextLink\":\"nlankxmyskpb\"}") - .toObject(QuotaLimits.class); - Assertions.assertEquals("gvcl", model.value().get(0).properties().name().value()); - Assertions.assertEquals("ijhtxf", model.value().get(0).properties().resourceType()); - Assertions.assertEquals("nlankxmyskpb", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - QuotaLimits model = new QuotaLimits().withValue(Arrays.asList( - new CurrentQuotaLimitBaseInner().withProperties(new QuotaProperties().withLimit(new LimitJsonObject()) - .withName(new ResourceName().withValue("gvcl")) - .withResourceType("ijhtxf") - .withProperties("dataeh")), - new CurrentQuotaLimitBaseInner().withProperties(new QuotaProperties().withLimit(new LimitJsonObject()) - .withName(new ResourceName().withValue("hmgkbrpyy")) - .withResourceType("rgvtqag") - .withProperties("datafsiarbutr")))) - .withNextLink("nlankxmyskpb"); - model = BinaryData.fromObject(model).toObject(QuotaLimits.class); - Assertions.assertEquals("gvcl", model.value().get(0).properties().name().value()); - Assertions.assertEquals("ijhtxf", model.value().get(0).properties().resourceType()); - Assertions.assertEquals("nlankxmyskpb", model.nextLink()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotaOperationsListMockTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotaOperationsListMockTests.java deleted file mode 100644 index 6950b9c99e57..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotaOperationsListMockTests.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.quota.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.quota.QuotaManager; -import com.azure.resourcemanager.quota.models.OperationResponse; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class QuotaOperationsListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"name\":\"nsj\",\"display\":{\"provider\":\"tiagx\",\"resource\":\"sz\",\"operation\":\"mpsbzkfzbeyv\",\"description\":\"qi\"},\"origin\":\"invkjjxdxrbuu\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - QuotaManager manager = QuotaManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response = manager.quotaOperations().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("nsj", response.iterator().next().name()); - Assertions.assertEquals("tiagx", response.iterator().next().display().provider()); - Assertions.assertEquals("sz", response.iterator().next().display().resource()); - Assertions.assertEquals("mpsbzkfzbeyv", response.iterator().next().display().operation()); - Assertions.assertEquals("qi", response.iterator().next().display().description()); - Assertions.assertEquals("invkjjxdxrbuu", response.iterator().next().origin()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotaPropertiesTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotaPropertiesTests.java deleted file mode 100644 index b79bdebe2233..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotaPropertiesTests.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.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.models.LimitJsonObject; -import com.azure.resourcemanager.quota.models.QuotaProperties; -import com.azure.resourcemanager.quota.models.ResourceName; -import org.junit.jupiter.api.Assertions; - -public final class QuotaPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - QuotaProperties model = BinaryData.fromString( - "{\"limit\":{\"limitObjectType\":\"LimitJsonObject\"},\"unit\":\"ivfsnk\",\"name\":{\"value\":\"ctq\",\"localizedValue\":\"fbebrjcxer\"},\"resourceType\":\"wutttxfvjrbi\",\"quotaPeriod\":\"hxepcyvahfnlj\",\"isQuotaApplicable\":false,\"properties\":\"dataj\"}") - .toObject(QuotaProperties.class); - Assertions.assertEquals("ctq", model.name().value()); - Assertions.assertEquals("wutttxfvjrbi", model.resourceType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - QuotaProperties model = new QuotaProperties().withLimit(new LimitJsonObject()) - .withName(new ResourceName().withValue("ctq")) - .withResourceType("wutttxfvjrbi") - .withProperties("dataj"); - model = BinaryData.fromObject(model).toObject(QuotaProperties.class); - Assertions.assertEquals("ctq", model.name().value()); - Assertions.assertEquals("wutttxfvjrbi", model.resourceType()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotasCreateOrUpdateMockTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotasCreateOrUpdateMockTests.java deleted file mode 100644 index 848c8a556a54..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotasCreateOrUpdateMockTests.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.quota.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.quota.QuotaManager; -import com.azure.resourcemanager.quota.models.CurrentQuotaLimitBase; -import com.azure.resourcemanager.quota.models.LimitJsonObject; -import com.azure.resourcemanager.quota.models.QuotaProperties; -import com.azure.resourcemanager.quota.models.ResourceName; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class QuotasCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - String responseStr - = "{\"properties\":{\"limit\":{\"limitObjectType\":\"LimitJsonObject\"},\"unit\":\"wqm\",\"name\":{\"value\":\"lkrm\",\"localizedValue\":\"i\"},\"resourceType\":\"xacqqudfnbyx\",\"quotaPeriod\":\"aabjyvayffimrz\",\"isQuotaApplicable\":true,\"properties\":\"dataqogsexnevfd\"},\"id\":\"wnwmewzs\",\"name\":\"yceuzsoib\",\"type\":\"ud\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - QuotaManager manager = QuotaManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - CurrentQuotaLimitBase response = manager.quotas() - .define("tcs") - .withExistingScope("fcktqumiekke") - .withProperties(new QuotaProperties().withLimit(new LimitJsonObject()) - .withName(new ResourceName().withValue("unygaeqid")) - .withResourceType("uvarmywdmjsjq") - .withProperties("dataduhpk")) - .create(); - - Assertions.assertEquals("lkrm", response.properties().name().value()); - Assertions.assertEquals("xacqqudfnbyx", response.properties().resourceType()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotasGetWithResponseMockTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotasGetWithResponseMockTests.java deleted file mode 100644 index 53d7c0b956cc..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotasGetWithResponseMockTests.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.quota.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.quota.QuotaManager; -import com.azure.resourcemanager.quota.models.CurrentQuotaLimitBase; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class QuotasGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"limit\":{\"limitObjectType\":\"LimitJsonObject\"},\"unit\":\"fmtdaaygdvwvgp\",\"name\":{\"value\":\"g\",\"localizedValue\":\"rtfudxepxg\"},\"resourceType\":\"agvrvmnpkuk\",\"quotaPeriod\":\"i\",\"isQuotaApplicable\":false,\"properties\":\"dataxgwim\"},\"id\":\"njhf\",\"name\":\"xw\",\"type\":\"szkkfoqre\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - QuotaManager manager = QuotaManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - CurrentQuotaLimitBase response = manager.quotas() - .getWithResponse("nayrhyrnxxmueedn", "rdvstkwqqtch", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("g", response.properties().name().value()); - Assertions.assertEquals("agvrvmnpkuk", response.properties().resourceType()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotasListMockTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotasListMockTests.java deleted file mode 100644 index 409e1cf08b9c..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/QuotasListMockTests.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.quota.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.quota.QuotaManager; -import com.azure.resourcemanager.quota.models.CurrentQuotaLimitBase; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class QuotasListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"limit\":{\"limitObjectType\":\"LimitJsonObject\"},\"unit\":\"a\",\"name\":{\"value\":\"wczelpci\",\"localizedValue\":\"lsfeaenwabfatkld\"},\"resourceType\":\"bjhwuaan\",\"quotaPeriod\":\"jos\",\"isQuotaApplicable\":false,\"properties\":\"dataulpjr\"},\"id\":\"xagl\",\"name\":\"vimjwos\",\"type\":\"tx\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - QuotaManager manager = QuotaManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response - = manager.quotas().list("fkzikfj", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("wczelpci", response.iterator().next().properties().name().value()); - Assertions.assertEquals("bjhwuaan", response.iterator().next().properties().resourceType()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/ResourceNameTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/ResourceNameTests.java deleted file mode 100644 index 1555309cad76..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/ResourceNameTests.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.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.models.ResourceName; -import org.junit.jupiter.api.Assertions; - -public final class ResourceNameTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ResourceName model = BinaryData.fromString("{\"value\":\"bq\",\"localizedValue\":\"sovmyokacspkwl\"}") - .toObject(ResourceName.class); - Assertions.assertEquals("bq", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ResourceName model = new ResourceName().withValue("bq"); - model = BinaryData.fromObject(model).toObject(ResourceName.class); - Assertions.assertEquals("bq", model.value()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/SubRequestTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/SubRequestTests.java deleted file mode 100644 index b0993d4b2b8f..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/SubRequestTests.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.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.models.LimitJsonObject; -import com.azure.resourcemanager.quota.models.ResourceName; -import com.azure.resourcemanager.quota.models.SubRequest; -import org.junit.jupiter.api.Assertions; - -public final class SubRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SubRequest model = BinaryData.fromString( - "{\"name\":{\"value\":\"yueaxibxujwb\",\"localizedValue\":\"walm\"},\"resourceType\":\"yoxa\",\"unit\":\"dkzjancuxrh\",\"provisioningState\":\"InProgress\",\"message\":\"v\",\"subRequestId\":\"niwdjsw\",\"limit\":{\"limitObjectType\":\"LimitJsonObject\"}}") - .toObject(SubRequest.class); - Assertions.assertEquals("yueaxibxujwb", model.name().value()); - Assertions.assertEquals("dkzjancuxrh", model.unit()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SubRequest model = new SubRequest().withName(new ResourceName().withValue("yueaxibxujwb")) - .withUnit("dkzjancuxrh") - .withLimit(new LimitJsonObject()); - model = BinaryData.fromObject(model).toObject(SubRequest.class); - Assertions.assertEquals("yueaxibxujwb", model.name().value()); - Assertions.assertEquals("dkzjancuxrh", model.unit()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/SubscriptionQuotaAllocationsListInnerTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/SubscriptionQuotaAllocationsListInnerTests.java deleted file mode 100644 index 24498fa556c2..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/SubscriptionQuotaAllocationsListInnerTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.fluent.models.SubscriptionQuotaAllocationsListInner; -import com.azure.resourcemanager.quota.models.SubscriptionQuotaAllocations; -import com.azure.resourcemanager.quota.models.SubscriptionQuotaAllocationsListProperties; -import com.azure.resourcemanager.quota.models.SubscriptionQuotaAllocationsProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SubscriptionQuotaAllocationsListInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SubscriptionQuotaAllocationsListInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Created\",\"value\":[{\"properties\":{\"resourceName\":\"jctbza\",\"limit\":3226770590349878189,\"shareableQuota\":7357191703099930404,\"name\":{\"value\":\"fkgukdkexxppof\",\"localizedValue\":\"axcfjpgddtocjjx\"}}},{\"properties\":{\"resourceName\":\"mouexhdzx\",\"limit\":7433658867107362465,\"shareableQuota\":4614606581389875358,\"name\":{\"value\":\"bzv\",\"localizedValue\":\"ntwndeicbtwnpzao\"}}},{\"properties\":{\"resourceName\":\"hrhcffcyddglmjth\",\"limit\":2053663471357654885,\"shareableQuota\":6580467149244298104,\"name\":{\"value\":\"xmqci\",\"localizedValue\":\"vhkhixu\"}}}],\"nextLink\":\"dtopbob\"},\"id\":\"ghmewuam\",\"name\":\"uhrzayvvt\",\"type\":\"gvdfgiotkftutq\"}") - .toObject(SubscriptionQuotaAllocationsListInner.class); - Assertions.assertEquals("jctbza", model.properties().value().get(0).properties().resourceName()); - Assertions.assertEquals(3226770590349878189L, model.properties().value().get(0).properties().limit()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SubscriptionQuotaAllocationsListInner model = new SubscriptionQuotaAllocationsListInner() - .withProperties(new SubscriptionQuotaAllocationsListProperties().withValue(Arrays.asList( - new SubscriptionQuotaAllocations() - .withProperties(new SubscriptionQuotaAllocationsProperties().withResourceName("jctbza") - .withLimit(3226770590349878189L)), - new SubscriptionQuotaAllocations() - .withProperties(new SubscriptionQuotaAllocationsProperties().withResourceName("mouexhdzx") - .withLimit(7433658867107362465L)), - new SubscriptionQuotaAllocations() - .withProperties(new SubscriptionQuotaAllocationsProperties().withResourceName("hrhcffcyddglmjth") - .withLimit(2053663471357654885L))))); - model = BinaryData.fromObject(model).toObject(SubscriptionQuotaAllocationsListInner.class); - Assertions.assertEquals("jctbza", model.properties().value().get(0).properties().resourceName()); - Assertions.assertEquals(3226770590349878189L, model.properties().value().get(0).properties().limit()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/SubscriptionQuotaAllocationsListPropertiesTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/SubscriptionQuotaAllocationsListPropertiesTests.java deleted file mode 100644 index a1c335698418..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/SubscriptionQuotaAllocationsListPropertiesTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.models.SubscriptionQuotaAllocations; -import com.azure.resourcemanager.quota.models.SubscriptionQuotaAllocationsListProperties; -import com.azure.resourcemanager.quota.models.SubscriptionQuotaAllocationsProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class SubscriptionQuotaAllocationsListPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SubscriptionQuotaAllocationsListProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Failed\",\"value\":[{\"properties\":{\"resourceName\":\"fgugnxkrxdqmid\",\"limit\":6800420676916675082,\"shareableQuota\":4984174641988559486,\"name\":{\"value\":\"abhjybi\",\"localizedValue\":\"h\"}}},{\"properties\":{\"resourceName\":\"bowsk\",\"limit\":4187351799054769848,\"shareableQuota\":8321881464692032483,\"name\":{\"value\":\"iywgqywgndrvynh\",\"localizedValue\":\"pphrcgynco\"}}},{\"properties\":{\"resourceName\":\"cfvmmco\",\"limit\":3154425840860812324,\"shareableQuota\":5004526075994942910,\"name\":{\"value\":\"bmqj\",\"localizedValue\":\"bcypmi\"}}}],\"nextLink\":\"w\"}") - .toObject(SubscriptionQuotaAllocationsListProperties.class); - Assertions.assertEquals("fgugnxkrxdqmid", model.value().get(0).properties().resourceName()); - Assertions.assertEquals(6800420676916675082L, model.value().get(0).properties().limit()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SubscriptionQuotaAllocationsListProperties model - = new SubscriptionQuotaAllocationsListProperties().withValue(Arrays.asList( - new SubscriptionQuotaAllocations() - .withProperties(new SubscriptionQuotaAllocationsProperties().withResourceName("fgugnxkrxdqmid") - .withLimit(6800420676916675082L)), - new SubscriptionQuotaAllocations() - .withProperties(new SubscriptionQuotaAllocationsProperties().withResourceName("bowsk") - .withLimit(4187351799054769848L)), - new SubscriptionQuotaAllocations() - .withProperties(new SubscriptionQuotaAllocationsProperties().withResourceName("cfvmmco") - .withLimit(3154425840860812324L)))); - model = BinaryData.fromObject(model).toObject(SubscriptionQuotaAllocationsListProperties.class); - Assertions.assertEquals("fgugnxkrxdqmid", model.value().get(0).properties().resourceName()); - Assertions.assertEquals(6800420676916675082L, model.value().get(0).properties().limit()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/SubscriptionQuotaAllocationsPropertiesTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/SubscriptionQuotaAllocationsPropertiesTests.java deleted file mode 100644 index 0ff248d8d373..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/SubscriptionQuotaAllocationsPropertiesTests.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.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.models.SubscriptionQuotaAllocationsProperties; -import org.junit.jupiter.api.Assertions; - -public final class SubscriptionQuotaAllocationsPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SubscriptionQuotaAllocationsProperties model = BinaryData.fromString( - "{\"resourceName\":\"eallnwsubisnj\",\"limit\":4579526250927488523,\"shareableQuota\":1760019269315707973,\"name\":{\"value\":\"c\",\"localizedValue\":\"qwoochcbon\"}}") - .toObject(SubscriptionQuotaAllocationsProperties.class); - Assertions.assertEquals("eallnwsubisnj", model.resourceName()); - Assertions.assertEquals(4579526250927488523L, model.limit()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SubscriptionQuotaAllocationsProperties model - = new SubscriptionQuotaAllocationsProperties().withResourceName("eallnwsubisnj") - .withLimit(4579526250927488523L); - model = BinaryData.fromObject(model).toObject(SubscriptionQuotaAllocationsProperties.class); - Assertions.assertEquals("eallnwsubisnj", model.resourceName()); - Assertions.assertEquals(4579526250927488523L, model.limit()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/SubscriptionQuotaAllocationsTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/SubscriptionQuotaAllocationsTests.java deleted file mode 100644 index ff0851e0ba73..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/SubscriptionQuotaAllocationsTests.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.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.models.SubscriptionQuotaAllocations; -import com.azure.resourcemanager.quota.models.SubscriptionQuotaAllocationsProperties; -import org.junit.jupiter.api.Assertions; - -public final class SubscriptionQuotaAllocationsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SubscriptionQuotaAllocations model = BinaryData.fromString( - "{\"properties\":{\"resourceName\":\"vccfw\",\"limit\":5806791582914319234,\"shareableQuota\":6738955803467738605,\"name\":{\"value\":\"nlebxetqgtzxd\",\"localizedValue\":\"qbqqwxr\"}}}") - .toObject(SubscriptionQuotaAllocations.class); - Assertions.assertEquals("vccfw", model.properties().resourceName()); - Assertions.assertEquals(5806791582914319234L, model.properties().limit()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SubscriptionQuotaAllocations model = new SubscriptionQuotaAllocations().withProperties( - new SubscriptionQuotaAllocationsProperties().withResourceName("vccfw").withLimit(5806791582914319234L)); - model = BinaryData.fromObject(model).toObject(SubscriptionQuotaAllocations.class); - Assertions.assertEquals("vccfw", model.properties().resourceName()); - Assertions.assertEquals(5806791582914319234L, model.properties().limit()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/SubscriptionQuotaDetailsNameTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/SubscriptionQuotaDetailsNameTests.java deleted file mode 100644 index 801cc0a315a3..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/SubscriptionQuotaDetailsNameTests.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.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.fluent.models.SubscriptionQuotaDetailsName; - -public final class SubscriptionQuotaDetailsNameTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SubscriptionQuotaDetailsName model - = BinaryData.fromString("{\"value\":\"pj\",\"localizedValue\":\"asxazjpqyegualhb\"}") - .toObject(SubscriptionQuotaDetailsName.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SubscriptionQuotaDetailsName model = new SubscriptionQuotaDetailsName(); - model = BinaryData.fromObject(model).toObject(SubscriptionQuotaDetailsName.class); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/SubscriptionQuotaDetailsTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/SubscriptionQuotaDetailsTests.java deleted file mode 100644 index af4ff85daaa2..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/SubscriptionQuotaDetailsTests.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.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.models.SubscriptionQuotaDetails; -import org.junit.jupiter.api.Assertions; - -public final class SubscriptionQuotaDetailsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - SubscriptionQuotaDetails model = BinaryData.fromString( - "{\"resourceName\":\"pkvlrxn\",\"limit\":2730192604247648868,\"shareableQuota\":7721443017261516589,\"name\":{\"value\":\"oflokey\",\"localizedValue\":\"enjbdlwtgrhp\"}}") - .toObject(SubscriptionQuotaDetails.class); - Assertions.assertEquals("pkvlrxn", model.resourceName()); - Assertions.assertEquals(2730192604247648868L, model.limit()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - SubscriptionQuotaDetails model - = new SubscriptionQuotaDetails().withResourceName("pkvlrxn").withLimit(2730192604247648868L); - model = BinaryData.fromObject(model).toObject(SubscriptionQuotaDetails.class); - Assertions.assertEquals("pkvlrxn", model.resourceName()); - Assertions.assertEquals(2730192604247648868L, model.limit()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/UsagesGetWithResponseMockTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/UsagesGetWithResponseMockTests.java deleted file mode 100644 index 61e109575148..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/UsagesGetWithResponseMockTests.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.quota.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.quota.QuotaManager; -import com.azure.resourcemanager.quota.models.CurrentUsagesBase; -import com.azure.resourcemanager.quota.models.UsagesTypes; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class UsagesGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - String responseStr - = "{\"properties\":{\"usages\":{\"value\":596140767,\"usagesType\":\"Combined\"},\"unit\":\"wlquuijfqkace\",\"name\":{\"value\":\"pfpubjibww\",\"localizedValue\":\"tohqkvpuvksgp\"},\"resourceType\":\"aknynfsynljphuop\",\"quotaPeriod\":\"dlqiyntorzih\",\"isQuotaApplicable\":false,\"properties\":\"datajswsrmslyz\"},\"id\":\"pzbchck\",\"name\":\"qzqioxiysuiizy\",\"type\":\"ked\"}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - QuotaManager manager = QuotaManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - CurrentUsagesBase response = manager.usages() - .getWithResponse("suwsyrsnds", "tgadgvraeaen", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(596140767, response.properties().usages().value()); - Assertions.assertEquals(UsagesTypes.COMBINED, response.properties().usages().usagesType()); - Assertions.assertEquals("pfpubjibww", response.properties().name().value()); - Assertions.assertEquals("aknynfsynljphuop", response.properties().resourceType()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/UsagesLimitsTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/UsagesLimitsTests.java deleted file mode 100644 index 1951a1a0ac27..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/UsagesLimitsTests.java +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.fluent.models.CurrentUsagesBaseInner; -import com.azure.resourcemanager.quota.models.ResourceName; -import com.azure.resourcemanager.quota.models.UsagesLimits; -import com.azure.resourcemanager.quota.models.UsagesObject; -import com.azure.resourcemanager.quota.models.UsagesProperties; -import com.azure.resourcemanager.quota.models.UsagesTypes; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class UsagesLimitsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UsagesLimits model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"usages\":{\"value\":682758161,\"usagesType\":\"Combined\"},\"unit\":\"zjuqkhrsaj\",\"name\":{\"value\":\"uo\",\"localizedValue\":\"skghsauuimj\"},\"resourceType\":\"xieduugidyjrr\",\"quotaPeriod\":\"y\",\"isQuotaApplicable\":true,\"properties\":\"datae\"},\"id\":\"csonpclhoco\",\"name\":\"slkevle\",\"type\":\"gz\"},{\"properties\":{\"usages\":{\"value\":635098272,\"usagesType\":\"Combined\"},\"unit\":\"faxkffeii\",\"name\":{\"value\":\"vmezy\",\"localizedValue\":\"hxmzsbbzoggig\"},\"resourceType\":\"wburvjxxjnspydpt\",\"quotaPeriod\":\"enkouknvudw\",\"isQuotaApplicable\":true,\"properties\":\"databldngkpoc\"},\"id\":\"pazyxoegukg\",\"name\":\"npiucgygevqznty\",\"type\":\"mrbpizcdrqj\"},{\"properties\":{\"usages\":{\"value\":1305658178,\"usagesType\":\"Individual\"},\"unit\":\"yhxdeoejzicwi\",\"name\":{\"value\":\"ttgzfbis\",\"localizedValue\":\"bkh\"},\"resourceType\":\"deyeamdphagalpbu\",\"quotaPeriod\":\"gipwhonowkg\",\"isQuotaApplicable\":true,\"properties\":\"datankixzbinj\"},\"id\":\"pu\",\"name\":\"tmryw\",\"type\":\"uzoqft\"}],\"nextLink\":\"qzrnkcqvyxlwhz\"}") - .toObject(UsagesLimits.class); - Assertions.assertEquals(682758161, model.value().get(0).properties().usages().value()); - Assertions.assertEquals(UsagesTypes.COMBINED, model.value().get(0).properties().usages().usagesType()); - Assertions.assertEquals("uo", model.value().get(0).properties().name().value()); - Assertions.assertEquals("xieduugidyjrr", model.value().get(0).properties().resourceType()); - Assertions.assertEquals("qzrnkcqvyxlwhz", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UsagesLimits model - = new UsagesLimits() - .withValue( - Arrays - .asList( - new CurrentUsagesBaseInner().withProperties( - new UsagesProperties() - .withUsages( - new UsagesObject().withValue(682758161).withUsagesType(UsagesTypes.COMBINED)) - .withName(new ResourceName().withValue("uo")) - .withResourceType("xieduugidyjrr") - .withProperties("datae")), - new CurrentUsagesBaseInner().withProperties(new UsagesProperties() - .withUsages( - new UsagesObject().withValue(635098272).withUsagesType(UsagesTypes.COMBINED)) - .withName(new ResourceName().withValue("vmezy")) - .withResourceType("wburvjxxjnspydpt") - .withProperties("databldngkpoc")), - new CurrentUsagesBaseInner().withProperties(new UsagesProperties() - .withUsages( - new UsagesObject().withValue(1305658178).withUsagesType(UsagesTypes.INDIVIDUAL)) - .withName(new ResourceName().withValue("ttgzfbis")) - .withResourceType("deyeamdphagalpbu") - .withProperties("datankixzbinj")))) - .withNextLink("qzrnkcqvyxlwhz"); - model = BinaryData.fromObject(model).toObject(UsagesLimits.class); - Assertions.assertEquals(682758161, model.value().get(0).properties().usages().value()); - Assertions.assertEquals(UsagesTypes.COMBINED, model.value().get(0).properties().usages().usagesType()); - Assertions.assertEquals("uo", model.value().get(0).properties().name().value()); - Assertions.assertEquals("xieduugidyjrr", model.value().get(0).properties().resourceType()); - Assertions.assertEquals("qzrnkcqvyxlwhz", model.nextLink()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/UsagesListMockTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/UsagesListMockTests.java deleted file mode 100644 index 4f46aaadc6d3..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/UsagesListMockTests.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.quota.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.models.AzureCloud; -import com.azure.core.test.http.MockHttpResponse; -import com.azure.resourcemanager.quota.QuotaManager; -import com.azure.resourcemanager.quota.models.CurrentUsagesBase; -import com.azure.resourcemanager.quota.models.UsagesTypes; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import reactor.core.publisher.Mono; - -public final class UsagesListMockTests { - @Test - public void testList() throws Exception { - String responseStr - = "{\"value\":[{\"properties\":{\"usages\":{\"value\":159300714,\"usagesType\":\"Combined\"},\"unit\":\"yynpcdpumnzgmwz\",\"name\":{\"value\":\"biknsorgjhxbld\",\"localizedValue\":\"wwrlkdmtncv\"},\"resourceType\":\"otllxdyhgsyo\",\"quotaPeriod\":\"gjltdtbnnhado\",\"isQuotaApplicable\":true,\"properties\":\"datavcikhnvpamqgx\"},\"id\":\"queziky\",\"name\":\"ggxkallatmelwuip\",\"type\":\"ccjzkzivgvv\"}]}"; - - HttpClient httpClient - = response -> Mono.just(new MockHttpResponse(response, 200, responseStr.getBytes(StandardCharsets.UTF_8))); - QuotaManager manager = QuotaManager.configure() - .withHttpClient(httpClient) - .authenticate(tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureCloud.AZURE_PUBLIC_CLOUD)); - - PagedIterable response - = manager.usages().list("atrwyhqmibzyh", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(159300714, response.iterator().next().properties().usages().value()); - Assertions.assertEquals(UsagesTypes.COMBINED, response.iterator().next().properties().usages().usagesType()); - Assertions.assertEquals("biknsorgjhxbld", response.iterator().next().properties().name().value()); - Assertions.assertEquals("otllxdyhgsyo", response.iterator().next().properties().resourceType()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/UsagesObjectTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/UsagesObjectTests.java deleted file mode 100644 index a275831761da..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/UsagesObjectTests.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.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.models.UsagesObject; -import com.azure.resourcemanager.quota.models.UsagesTypes; -import org.junit.jupiter.api.Assertions; - -public final class UsagesObjectTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UsagesObject model - = BinaryData.fromString("{\"value\":1520989721,\"usagesType\":\"Combined\"}").toObject(UsagesObject.class); - Assertions.assertEquals(1520989721, model.value()); - Assertions.assertEquals(UsagesTypes.COMBINED, model.usagesType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UsagesObject model = new UsagesObject().withValue(1520989721).withUsagesType(UsagesTypes.COMBINED); - model = BinaryData.fromObject(model).toObject(UsagesObject.class); - Assertions.assertEquals(1520989721, model.value()); - Assertions.assertEquals(UsagesTypes.COMBINED, model.usagesType()); - } -} diff --git a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/UsagesPropertiesTests.java b/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/UsagesPropertiesTests.java deleted file mode 100644 index 182ac06fcee5..000000000000 --- a/sdk/quota/azure-resourcemanager-quota/src/test/java/com/azure/resourcemanager/quota/generated/UsagesPropertiesTests.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.quota.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.quota.models.ResourceName; -import com.azure.resourcemanager.quota.models.UsagesObject; -import com.azure.resourcemanager.quota.models.UsagesProperties; -import com.azure.resourcemanager.quota.models.UsagesTypes; -import org.junit.jupiter.api.Assertions; - -public final class UsagesPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UsagesProperties model = BinaryData.fromString( - "{\"usages\":{\"value\":1010959661,\"usagesType\":\"Combined\"},\"unit\":\"fksymddystki\",\"name\":{\"value\":\"hqyudxorrqnbpoc\",\"localizedValue\":\"yifqrvkdvjsllrmv\"},\"resourceType\":\"f\",\"quotaPeriod\":\"t\",\"isQuotaApplicable\":false,\"properties\":\"dataulexxbczwtr\"}") - .toObject(UsagesProperties.class); - Assertions.assertEquals(1010959661, model.usages().value()); - Assertions.assertEquals(UsagesTypes.COMBINED, model.usages().usagesType()); - Assertions.assertEquals("hqyudxorrqnbpoc", model.name().value()); - Assertions.assertEquals("f", model.resourceType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UsagesProperties model = new UsagesProperties() - .withUsages(new UsagesObject().withValue(1010959661).withUsagesType(UsagesTypes.COMBINED)) - .withName(new ResourceName().withValue("hqyudxorrqnbpoc")) - .withResourceType("f") - .withProperties("dataulexxbczwtr"); - model = BinaryData.fromObject(model).toObject(UsagesProperties.class); - Assertions.assertEquals(1010959661, model.usages().value()); - Assertions.assertEquals(UsagesTypes.COMBINED, model.usages().usagesType()); - Assertions.assertEquals("hqyudxorrqnbpoc", model.name().value()); - Assertions.assertEquals("f", model.resourceType()); - } -}