// 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.AutoScaleVCoreSku;
import com.azure.resourcemanager.powerbidedicated.models.VCoreSkuTier;
import org.junit.jupiter.api.Assertions;

public final class AutoScaleVCoreSkuTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        AutoScaleVCoreSku model =
            BinaryData
                .fromString("{\"name\":\"watkpnpulexxb\",\"tier\":\"AutoScale\",\"capacity\":1309614398}")
                .toObject(AutoScaleVCoreSku.class);
        Assertions.assertEquals("watkpnpulexxb", model.name());
        Assertions.assertEquals(VCoreSkuTier.AUTO_SCALE, model.tier());
        Assertions.assertEquals(1309614398, model.capacity());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        AutoScaleVCoreSku model =
            new AutoScaleVCoreSku()
                .withName("watkpnpulexxb")
                .withTier(VCoreSkuTier.AUTO_SCALE)
                .withCapacity(1309614398);
        model = BinaryData.fromObject(model).toObject(AutoScaleVCoreSku.class);
        Assertions.assertEquals("watkpnpulexxb", model.name());
        Assertions.assertEquals(VCoreSkuTier.AUTO_SCALE, model.tier());
        Assertions.assertEquals(1309614398, model.capacity());
    }
}
