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

package com.azure.resourcemanager.synapse.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.synapse.models.OptimizedAutoscale;
import org.junit.jupiter.api.Assertions;

public final class OptimizedAutoscaleTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        OptimizedAutoscale model =
            BinaryData
                .fromString("{\"version\":1324330930,\"isEnabled\":true,\"minimum\":1273890373,\"maximum\":1963006150}")
                .toObject(OptimizedAutoscale.class);
        Assertions.assertEquals(1324330930, model.version());
        Assertions.assertEquals(true, model.isEnabled());
        Assertions.assertEquals(1273890373, model.minimum());
        Assertions.assertEquals(1963006150, model.maximum());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        OptimizedAutoscale model =
            new OptimizedAutoscale()
                .withVersion(1324330930)
                .withIsEnabled(true)
                .withMinimum(1273890373)
                .withMaximum(1963006150);
        model = BinaryData.fromObject(model).toObject(OptimizedAutoscale.class);
        Assertions.assertEquals(1324330930, model.version());
        Assertions.assertEquals(true, model.isEnabled());
        Assertions.assertEquals(1273890373, model.minimum());
        Assertions.assertEquals(1963006150, model.maximum());
    }
}
