// 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.SkuCapacity;
import com.azure.resourcemanager.machinelearning.models.SkuScaleType;
import org.junit.jupiter.api.Assertions;

public final class SkuCapacityTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        SkuCapacity model =
            BinaryData
                .fromString(
                    "{\"default\":179999920,\"maximum\":2087309055,\"minimum\":498585791,\"scaleType\":\"Automatic\"}")
                .toObject(SkuCapacity.class);
        Assertions.assertEquals(179999920, model.defaultProperty());
        Assertions.assertEquals(2087309055, model.maximum());
        Assertions.assertEquals(498585791, model.minimum());
        Assertions.assertEquals(SkuScaleType.AUTOMATIC, model.scaleType());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        SkuCapacity model =
            new SkuCapacity()
                .withDefaultProperty(179999920)
                .withMaximum(2087309055)
                .withMinimum(498585791)
                .withScaleType(SkuScaleType.AUTOMATIC);
        model = BinaryData.fromObject(model).toObject(SkuCapacity.class);
        Assertions.assertEquals(179999920, model.defaultProperty());
        Assertions.assertEquals(2087309055, model.maximum());
        Assertions.assertEquals(498585791, model.minimum());
        Assertions.assertEquals(SkuScaleType.AUTOMATIC, model.scaleType());
    }
}
