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

package com.azure.resourcemanager.storagecache.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.storagecache.models.ApiOperationDisplay;
import org.junit.jupiter.api.Assertions;

public final class ApiOperationDisplayTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ApiOperationDisplay model =
            BinaryData
                .fromString(
                    "{\"operation\":\"gddtocj\",\"provider\":\"hvpmoue\",\"resource\":\"dzxibqeojnxqbzvd\",\"description\":\"t\"}")
                .toObject(ApiOperationDisplay.class);
        Assertions.assertEquals("gddtocj", model.operation());
        Assertions.assertEquals("hvpmoue", model.provider());
        Assertions.assertEquals("dzxibqeojnxqbzvd", model.resource());
        Assertions.assertEquals("t", model.description());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ApiOperationDisplay model =
            new ApiOperationDisplay()
                .withOperation("gddtocj")
                .withProvider("hvpmoue")
                .withResource("dzxibqeojnxqbzvd")
                .withDescription("t");
        model = BinaryData.fromObject(model).toObject(ApiOperationDisplay.class);
        Assertions.assertEquals("gddtocj", model.operation());
        Assertions.assertEquals("hvpmoue", model.provider());
        Assertions.assertEquals("dzxibqeojnxqbzvd", model.resource());
        Assertions.assertEquals("t", model.description());
    }
}
