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

package com.azure.resourcemanager.synapse.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.synapse.models.AvailableRpOperationDisplayInfo;
import org.junit.jupiter.api.Assertions;

public final class AvailableRpOperationDisplayInfoTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        AvailableRpOperationDisplayInfo model =
            BinaryData
                .fromString(
                    "{\"description\":\"odjpslwejd\",\"resource\":\"wryoqpsoacc\",\"provider\":\"zakljlahbc\",\"operation\":\"ffdfdosygexpa\"}")
                .toObject(AvailableRpOperationDisplayInfo.class);
        Assertions.assertEquals("odjpslwejd", model.description());
        Assertions.assertEquals("wryoqpsoacc", model.resource());
        Assertions.assertEquals("zakljlahbc", model.provider());
        Assertions.assertEquals("ffdfdosygexpa", model.operation());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        AvailableRpOperationDisplayInfo model =
            new AvailableRpOperationDisplayInfo()
                .withDescription("odjpslwejd")
                .withResource("wryoqpsoacc")
                .withProvider("zakljlahbc")
                .withOperation("ffdfdosygexpa");
        model = BinaryData.fromObject(model).toObject(AvailableRpOperationDisplayInfo.class);
        Assertions.assertEquals("odjpslwejd", model.description());
        Assertions.assertEquals("wryoqpsoacc", model.resource());
        Assertions.assertEquals("zakljlahbc", model.provider());
        Assertions.assertEquals("ffdfdosygexpa", model.operation());
    }
}
