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

package com.azure.resourcemanager.workloads.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.workloads.models.OperationsDefinitionDisplay;
import org.junit.jupiter.api.Assertions;

public final class OperationsDefinitionDisplayTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        OperationsDefinitionDisplay model =
            BinaryData
                .fromString(
                    "{\"provider\":\"lihhyuspskasdvlm\",\"resource\":\"wdgzxulucv\",\"operation\":\"amrsreuzv\",\"description\":\"urisjnhnytxifqj\"}")
                .toObject(OperationsDefinitionDisplay.class);
        Assertions.assertEquals("lihhyuspskasdvlm", model.provider());
        Assertions.assertEquals("wdgzxulucv", model.resource());
        Assertions.assertEquals("amrsreuzv", model.operation());
        Assertions.assertEquals("urisjnhnytxifqj", model.description());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        OperationsDefinitionDisplay model =
            new OperationsDefinitionDisplay()
                .withProvider("lihhyuspskasdvlm")
                .withResource("wdgzxulucv")
                .withOperation("amrsreuzv")
                .withDescription("urisjnhnytxifqj");
        model = BinaryData.fromObject(model).toObject(OperationsDefinitionDisplay.class);
        Assertions.assertEquals("lihhyuspskasdvlm", model.provider());
        Assertions.assertEquals("wdgzxulucv", model.resource());
        Assertions.assertEquals("amrsreuzv", model.operation());
        Assertions.assertEquals("urisjnhnytxifqj", model.description());
    }
}
