// 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.models.Applicability;
import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfileProperties;
import org.junit.jupiter.api.Assertions;

public final class AvailableWorkloadProfilePropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        AvailableWorkloadProfileProperties model =
            BinaryData
                .fromString(
                    "{\"category\":\"ivkwlzuvccfwnfnb\",\"applicability\":\"LocationDefault\",\"cores\":2055969856,\"memoryGiB\":198217735,\"displayName\":\"bxetqgtzxdpn\"}")
                .toObject(AvailableWorkloadProfileProperties.class);
        Assertions.assertEquals("ivkwlzuvccfwnfnb", model.category());
        Assertions.assertEquals(Applicability.LOCATION_DEFAULT, model.applicability());
        Assertions.assertEquals(2055969856, model.cores());
        Assertions.assertEquals(198217735, model.memoryGiB());
        Assertions.assertEquals("bxetqgtzxdpn", model.displayName());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        AvailableWorkloadProfileProperties model =
            new AvailableWorkloadProfileProperties()
                .withCategory("ivkwlzuvccfwnfnb")
                .withApplicability(Applicability.LOCATION_DEFAULT)
                .withCores(2055969856)
                .withMemoryGiB(198217735)
                .withDisplayName("bxetqgtzxdpn");
        model = BinaryData.fromObject(model).toObject(AvailableWorkloadProfileProperties.class);
        Assertions.assertEquals("ivkwlzuvccfwnfnb", model.category());
        Assertions.assertEquals(Applicability.LOCATION_DEFAULT, model.applicability());
        Assertions.assertEquals(2055969856, model.cores());
        Assertions.assertEquals(198217735, model.memoryGiB());
        Assertions.assertEquals("bxetqgtzxdpn", model.displayName());
    }
}
