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

package com.azure.resourcemanager.cognitiveservices.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.cognitiveservices.models.DeploymentScaleSettings;
import com.azure.resourcemanager.cognitiveservices.models.DeploymentScaleType;
import org.junit.jupiter.api.Assertions;

public final class DeploymentScaleSettingsTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        DeploymentScaleSettings model =
            BinaryData
                .fromString("{\"scaleType\":\"Standard\",\"capacity\":812505700,\"activeCapacity\":1391684752}")
                .toObject(DeploymentScaleSettings.class);
        Assertions.assertEquals(DeploymentScaleType.STANDARD, model.scaleType());
        Assertions.assertEquals(812505700, model.capacity());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        DeploymentScaleSettings model =
            new DeploymentScaleSettings().withScaleType(DeploymentScaleType.STANDARD).withCapacity(812505700);
        model = BinaryData.fromObject(model).toObject(DeploymentScaleSettings.class);
        Assertions.assertEquals(DeploymentScaleType.STANDARD, model.scaleType());
        Assertions.assertEquals(812505700, model.capacity());
    }
}
