// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.netapp.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.netapp.models.CheckQuotaNameResourceTypes;
import com.azure.resourcemanager.netapp.models.QuotaAvailabilityRequest;
import org.junit.jupiter.api.Assertions;

public final class QuotaAvailabilityRequestTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        QuotaAvailabilityRequest model =
            BinaryData
                .fromString(
                    "{\"name\":\"gqexzlocxs\",\"type\":\"Microsoft.NetApp/netAppAccounts/capacityPools\",\"resourceGroup\":\"aierhhb\"}")
                .toObject(QuotaAvailabilityRequest.class);
        Assertions.assertEquals("gqexzlocxs", model.name());
        Assertions
            .assertEquals(CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS, model.type());
        Assertions.assertEquals("aierhhb", model.resourceGroup());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        QuotaAvailabilityRequest model =
            new QuotaAvailabilityRequest()
                .withName("gqexzlocxs")
                .withType(CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS)
                .withResourceGroup("aierhhb");
        model = BinaryData.fromObject(model).toObject(QuotaAvailabilityRequest.class);
        Assertions.assertEquals("gqexzlocxs", model.name());
        Assertions
            .assertEquals(CheckQuotaNameResourceTypes.MICROSOFT_NET_APP_NET_APP_ACCOUNTS_CAPACITY_POOLS, model.type());
        Assertions.assertEquals("aierhhb", model.resourceGroup());
    }
}
