// 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.models.Sku;
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 SkuTests {
    @Test
    public void testDeserialize() {
        Sku model = BinaryData.fromString("{\"name\":\"Premium_ZRS\",\"tier\":\"Premium\"}").toObject(Sku.class);
        Assertions.assertEquals(SkuName.PREMIUM_ZRS, model.name());
        Assertions.assertEquals(SkuTier.PREMIUM, model.tier());
    }

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