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

package com.azure.resourcemanager.machinelearning.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.machinelearning.models.SkuSetting;
import com.azure.resourcemanager.machinelearning.models.SkuTier;
import org.junit.jupiter.api.Assertions;

public final class SkuSettingTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        SkuSetting model =
            BinaryData.fromString("{\"name\":\"nnbsoqeqa\",\"tier\":\"Premium\"}").toObject(SkuSetting.class);
        Assertions.assertEquals("nnbsoqeqa", model.name());
        Assertions.assertEquals(SkuTier.PREMIUM, model.tier());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        SkuSetting model = new SkuSetting().withName("nnbsoqeqa").withTier(SkuTier.PREMIUM);
        model = BinaryData.fromObject(model).toObject(SkuSetting.class);
        Assertions.assertEquals("nnbsoqeqa", model.name());
        Assertions.assertEquals(SkuTier.PREMIUM, model.tier());
    }
}
