// 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.IntegrationServiceEnvironmentSku;
import com.azure.resourcemanager.logic.models.IntegrationServiceEnvironmentSkuName;
import org.junit.jupiter.api.Assertions;

public final class IntegrationServiceEnvironmentSkuTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        IntegrationServiceEnvironmentSku model =
            BinaryData
                .fromString("{\"name\":\"Premium\",\"capacity\":1775201606}")
                .toObject(IntegrationServiceEnvironmentSku.class);
        Assertions.assertEquals(IntegrationServiceEnvironmentSkuName.PREMIUM, model.name());
        Assertions.assertEquals(1775201606, model.capacity());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        IntegrationServiceEnvironmentSku model =
            new IntegrationServiceEnvironmentSku()
                .withName(IntegrationServiceEnvironmentSkuName.PREMIUM)
                .withCapacity(1775201606);
        model = BinaryData.fromObject(model).toObject(IntegrationServiceEnvironmentSku.class);
        Assertions.assertEquals(IntegrationServiceEnvironmentSkuName.PREMIUM, model.name());
        Assertions.assertEquals(1775201606, model.capacity());
    }
}
