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

package com.azure.resourcemanager.elasticsan.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.elasticsan.fluent.models.SkuInformationInner;
import com.azure.resourcemanager.elasticsan.models.SkuName;
import com.azure.resourcemanager.elasticsan.models.SkuTier;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public final class SkuInformationInnerTests {
    @Test
    public void testDeserialize() {
        SkuInformationInner model =
            BinaryData
                .fromString(
                    "{\"name\":\"Premium_ZRS\",\"tier\":\"Premium\",\"resourceType\":\"ihfxtijbpzvgnwzs\",\"locations\":[\"lzufcyzkohdbi\",\"anufhfcbjysag\"],\"locationInfo\":[{\"location\":\"qhabifpikxwcz\",\"zones\":[\"cnpqxuhivyqniwby\",\"rkxvdum\",\"grtfwvu\"]}],\"capabilities\":[{\"name\":\"udccsnhsjc\",\"value\":\"ejhkry\"},{\"name\":\"napczwlokjy\",\"value\":\"kkvnipjox\"}]}")
                .toObject(SkuInformationInner.class);
        Assertions.assertEquals(SkuName.PREMIUM_ZRS, model.name());
        Assertions.assertEquals(SkuTier.PREMIUM, model.tier());
    }

    @Test
    public void testSerialize() {
        SkuInformationInner model = new SkuInformationInner().withName(SkuName.PREMIUM_ZRS).withTier(SkuTier.PREMIUM);
        model = BinaryData.fromObject(model).toObject(SkuInformationInner.class);
        Assertions.assertEquals(SkuName.PREMIUM_ZRS, model.name());
        Assertions.assertEquals(SkuTier.PREMIUM, model.tier());
    }
}
