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

package com.azure.resourcemanager.storageimportexport.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.storageimportexport.fluent.models.OperationInner;
import org.junit.jupiter.api.Assertions;

public final class OperationInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        OperationInner model =
            BinaryData
                .fromString(
                    "{\"name\":\"dgwdslfhot\",\"display\":{\"provider\":\"cynpwlbjnp\",\"resource\":\"cftadeh\",\"operation\":\"ltyfsop\",\"description\":\"suesnzw\"}}")
                .toObject(OperationInner.class);
        Assertions.assertEquals("dgwdslfhot", model.name());
        Assertions.assertEquals("cynpwlbjnp", model.provider());
        Assertions.assertEquals("cftadeh", model.resource());
        Assertions.assertEquals("ltyfsop", model.operation());
        Assertions.assertEquals("suesnzw", model.description());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        OperationInner model =
            new OperationInner()
                .withName("dgwdslfhot")
                .withProvider("cynpwlbjnp")
                .withResource("cftadeh")
                .withOperation("ltyfsop")
                .withDescription("suesnzw");
        model = BinaryData.fromObject(model).toObject(OperationInner.class);
        Assertions.assertEquals("dgwdslfhot", model.name());
        Assertions.assertEquals("cynpwlbjnp", model.provider());
        Assertions.assertEquals("cftadeh", model.resource());
        Assertions.assertEquals("ltyfsop", model.operation());
        Assertions.assertEquals("suesnzw", model.description());
    }
}
