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

package com.azure.resourcemanager.appconfiguration.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.appconfiguration.models.OperationDefinitionDisplay;
import org.junit.jupiter.api.Assertions;

public final class OperationDefinitionDisplayTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        OperationDefinitionDisplay model =
            BinaryData
                .fromString(
                    "{\"provider\":\"fcyddg\",\"resource\":\"jthjqkwpyei\",\"operation\":\"mqc\",\"description\":\"q\"}")
                .toObject(OperationDefinitionDisplay.class);
        Assertions.assertEquals("jthjqkwpyei", model.resource());
        Assertions.assertEquals("mqc", model.operation());
        Assertions.assertEquals("q", model.description());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        OperationDefinitionDisplay model =
            new OperationDefinitionDisplay().withResource("jthjqkwpyei").withOperation("mqc").withDescription("q");
        model = BinaryData.fromObject(model).toObject(OperationDefinitionDisplay.class);
        Assertions.assertEquals("jthjqkwpyei", model.resource());
        Assertions.assertEquals("mqc", model.operation());
        Assertions.assertEquals("q", model.description());
    }
}
