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

package com.azure.resourcemanager.powerbidedicated.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.powerbidedicated.models.CapacitySku;
import com.azure.resourcemanager.powerbidedicated.models.CapacitySkuTier;
import org.junit.jupiter.api.Assertions;

public final class CapacitySkuTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        CapacitySku model =
            BinaryData
                .fromString("{\"name\":\"zyf\",\"tier\":\"Premium\",\"capacity\":272665329}")
                .toObject(CapacitySku.class);
        Assertions.assertEquals("zyf", model.name());
        Assertions.assertEquals(CapacitySkuTier.PREMIUM, model.tier());
        Assertions.assertEquals(272665329, model.capacity());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        CapacitySku model = new CapacitySku().withName("zyf").withTier(CapacitySkuTier.PREMIUM).withCapacity(272665329);
        model = BinaryData.fromObject(model).toObject(CapacitySku.class);
        Assertions.assertEquals("zyf", model.name());
        Assertions.assertEquals(CapacitySkuTier.PREMIUM, model.tier());
        Assertions.assertEquals(272665329, model.capacity());
    }
}
