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

package com.azure.resourcemanager.logic.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.logic.models.IntegrationServiceEnvironmentSkuCapacity;
import com.azure.resourcemanager.logic.models.IntegrationServiceEnvironmentSkuScaleType;
import org.junit.jupiter.api.Assertions;

public final class IntegrationServiceEnvironmentSkuCapacityTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        IntegrationServiceEnvironmentSkuCapacity model =
            BinaryData
                .fromString(
                    "{\"minimum\":1824653896,\"maximum\":1269284441,\"default\":1221518768,\"scaleType\":\"Manual\"}")
                .toObject(IntegrationServiceEnvironmentSkuCapacity.class);
        Assertions.assertEquals(1824653896, model.minimum());
        Assertions.assertEquals(1269284441, model.maximum());
        Assertions.assertEquals(1221518768, model.defaultProperty());
        Assertions.assertEquals(IntegrationServiceEnvironmentSkuScaleType.MANUAL, model.scaleType());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        IntegrationServiceEnvironmentSkuCapacity model =
            new IntegrationServiceEnvironmentSkuCapacity()
                .withMinimum(1824653896)
                .withMaximum(1269284441)
                .withDefaultProperty(1221518768)
                .withScaleType(IntegrationServiceEnvironmentSkuScaleType.MANUAL);
        model = BinaryData.fromObject(model).toObject(IntegrationServiceEnvironmentSkuCapacity.class);
        Assertions.assertEquals(1824653896, model.minimum());
        Assertions.assertEquals(1269284441, model.maximum());
        Assertions.assertEquals(1221518768, model.defaultProperty());
        Assertions.assertEquals(IntegrationServiceEnvironmentSkuScaleType.MANUAL, model.scaleType());
    }
}
