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

package com.azure.resourcemanager.appcontainers.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.appcontainers.fluent.models.WorkloadProfileStatesInner;
import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStatesProperties;
import org.junit.jupiter.api.Assertions;

public final class WorkloadProfileStatesInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        WorkloadProfileStatesInner model =
            BinaryData
                .fromString(
                    "{\"properties\":{\"minimumCount\":842063408,\"maximumCount\":1640256851,\"currentCount\":1918007053},\"id\":\"rbdkelvidiz\",\"name\":\"zsdbccxjmon\",\"type\":\"dgnwncypuuwwlt\"}")
                .toObject(WorkloadProfileStatesInner.class);
        Assertions.assertEquals(842063408, model.properties().minimumCount());
        Assertions.assertEquals(1640256851, model.properties().maximumCount());
        Assertions.assertEquals(1918007053, model.properties().currentCount());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        WorkloadProfileStatesInner model =
            new WorkloadProfileStatesInner()
                .withProperties(
                    new WorkloadProfileStatesProperties()
                        .withMinimumCount(842063408)
                        .withMaximumCount(1640256851)
                        .withCurrentCount(1918007053));
        model = BinaryData.fromObject(model).toObject(WorkloadProfileStatesInner.class);
        Assertions.assertEquals(842063408, model.properties().minimumCount());
        Assertions.assertEquals(1640256851, model.properties().maximumCount());
        Assertions.assertEquals(1918007053, model.properties().currentCount());
    }
}
