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

public final class ContainerResourceSettingsTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ContainerResourceSettings model =
            BinaryData
                .fromString("{\"cpu\":\"ustcpoq\",\"gpu\":\"vnwqjwgo\",\"memory\":\"lejjjkxy\"}")
                .toObject(ContainerResourceSettings.class);
        Assertions.assertEquals("ustcpoq", model.cpu());
        Assertions.assertEquals("vnwqjwgo", model.gpu());
        Assertions.assertEquals("lejjjkxy", model.memory());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ContainerResourceSettings model =
            new ContainerResourceSettings().withCpu("ustcpoq").withGpu("vnwqjwgo").withMemory("lejjjkxy");
        model = BinaryData.fromObject(model).toObject(ContainerResourceSettings.class);
        Assertions.assertEquals("ustcpoq", model.cpu());
        Assertions.assertEquals("vnwqjwgo", model.gpu());
        Assertions.assertEquals("lejjjkxy", model.memory());
    }
}
