// 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.AutoScaleProperties;
import org.junit.jupiter.api.Assertions;

public final class AutoScalePropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        AutoScaleProperties model =
            BinaryData
                .fromString("{\"minNodeCount\":814110880,\"enabled\":true,\"maxNodeCount\":1557135644}")
                .toObject(AutoScaleProperties.class);
        Assertions.assertEquals(814110880, model.minNodeCount());
        Assertions.assertEquals(true, model.enabled());
        Assertions.assertEquals(1557135644, model.maxNodeCount());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        AutoScaleProperties model =
            new AutoScaleProperties().withMinNodeCount(814110880).withEnabled(true).withMaxNodeCount(1557135644);
        model = BinaryData.fromObject(model).toObject(AutoScaleProperties.class);
        Assertions.assertEquals(814110880, model.minNodeCount());
        Assertions.assertEquals(true, model.enabled());
        Assertions.assertEquals(1557135644, model.maxNodeCount());
    }
}
