// 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.fluent.models.VolumeQuotaRulesProperties;
import com.azure.resourcemanager.netapp.models.Type;
import org.junit.jupiter.api.Assertions;

public final class VolumeQuotaRulesPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        VolumeQuotaRulesProperties model =
            BinaryData
                .fromString(
                    "{\"provisioningState\":\"Accepted\",\"quotaSizeInKiBs\":5184068931876509479,\"quotaType\":\"DefaultGroupQuota\",\"quotaTarget\":\"hqxujxukndxdi\"}")
                .toObject(VolumeQuotaRulesProperties.class);
        Assertions.assertEquals(5184068931876509479L, model.quotaSizeInKiBs());
        Assertions.assertEquals(Type.DEFAULT_GROUP_QUOTA, model.quotaType());
        Assertions.assertEquals("hqxujxukndxdi", model.quotaTarget());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        VolumeQuotaRulesProperties model =
            new VolumeQuotaRulesProperties()
                .withQuotaSizeInKiBs(5184068931876509479L)
                .withQuotaType(Type.DEFAULT_GROUP_QUOTA)
                .withQuotaTarget("hqxujxukndxdi");
        model = BinaryData.fromObject(model).toObject(VolumeQuotaRulesProperties.class);
        Assertions.assertEquals(5184068931876509479L, model.quotaSizeInKiBs());
        Assertions.assertEquals(Type.DEFAULT_GROUP_QUOTA, model.quotaType());
        Assertions.assertEquals("hqxujxukndxdi", model.quotaTarget());
    }
}
