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

public final class AmlOperationDisplayTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        AmlOperationDisplay model =
            BinaryData
                .fromString(
                    "{\"provider\":\"gjofjd\",\"resource\":\"qs\",\"operation\":\"eupewnwreitjz\",\"description\":\"lusarh\"}")
                .toObject(AmlOperationDisplay.class);
        Assertions.assertEquals("gjofjd", model.provider());
        Assertions.assertEquals("qs", model.resource());
        Assertions.assertEquals("eupewnwreitjz", model.operation());
        Assertions.assertEquals("lusarh", model.description());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        AmlOperationDisplay model =
            new AmlOperationDisplay()
                .withProvider("gjofjd")
                .withResource("qs")
                .withOperation("eupewnwreitjz")
                .withDescription("lusarh");
        model = BinaryData.fromObject(model).toObject(AmlOperationDisplay.class);
        Assertions.assertEquals("gjofjd", model.provider());
        Assertions.assertEquals("qs", model.resource());
        Assertions.assertEquals("eupewnwreitjz", model.operation());
        Assertions.assertEquals("lusarh", model.description());
    }
}
