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

package com.azure.resourcemanager.signalr.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.signalr.models.OperationDisplay;
import org.junit.jupiter.api.Assertions;

public final class OperationDisplayTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        OperationDisplay model =
            BinaryData
                .fromString(
                    "{\"provider\":\"tihfx\",\"resource\":\"jbpzvgnwzsymg\",\"operation\":\"uf\",\"description\":\"zk\"}")
                .toObject(OperationDisplay.class);
        Assertions.assertEquals("tihfx", model.provider());
        Assertions.assertEquals("jbpzvgnwzsymg", model.resource());
        Assertions.assertEquals("uf", model.operation());
        Assertions.assertEquals("zk", model.description());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        OperationDisplay model =
            new OperationDisplay()
                .withProvider("tihfx")
                .withResource("jbpzvgnwzsymg")
                .withOperation("uf")
                .withDescription("zk");
        model = BinaryData.fromObject(model).toObject(OperationDisplay.class);
        Assertions.assertEquals("tihfx", model.provider());
        Assertions.assertEquals("jbpzvgnwzsymg", model.resource());
        Assertions.assertEquals("uf", model.operation());
        Assertions.assertEquals("zk", model.description());
    }
}
