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

package com.azure.resourcemanager.datamigration.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.datamigration.models.AvailableServiceSkuCapacity;
import com.azure.resourcemanager.datamigration.models.ServiceScalability;
import org.junit.jupiter.api.Assertions;

public final class AvailableServiceSkuCapacityTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        AvailableServiceSkuCapacity model =
            BinaryData
                .fromString(
                    "{\"minimum\":159244134,\"maximum\":191482446,\"default\":1189352281,\"scaleType\":\"none\"}")
                .toObject(AvailableServiceSkuCapacity.class);
        Assertions.assertEquals(159244134, model.minimum());
        Assertions.assertEquals(191482446, model.maximum());
        Assertions.assertEquals(1189352281, model.defaultProperty());
        Assertions.assertEquals(ServiceScalability.NONE, model.scaleType());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        AvailableServiceSkuCapacity model =
            new AvailableServiceSkuCapacity()
                .withMinimum(159244134)
                .withMaximum(191482446)
                .withDefaultProperty(1189352281)
                .withScaleType(ServiceScalability.NONE);
        model = BinaryData.fromObject(model).toObject(AvailableServiceSkuCapacity.class);
        Assertions.assertEquals(159244134, model.minimum());
        Assertions.assertEquals(191482446, model.maximum());
        Assertions.assertEquals(1189352281, model.defaultProperty());
        Assertions.assertEquals(ServiceScalability.NONE, model.scaleType());
    }
}
