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

package com.azure.resourcemanager.logic.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.logic.models.ParameterType;
import com.azure.resourcemanager.logic.models.WorkflowParameter;
import org.junit.jupiter.api.Assertions;

public final class WorkflowParameterTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        WorkflowParameter model =
            BinaryData
                .fromString(
                    "{\"type\":\"Object\",\"value\":\"datanpzaoq\",\"metadata\":\"datahrhcffcyddglmjth\",\"description\":\"kw\"}")
                .toObject(WorkflowParameter.class);
        Assertions.assertEquals(ParameterType.OBJECT, model.type());
        Assertions.assertEquals("kw", model.description());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        WorkflowParameter model =
            new WorkflowParameter()
                .withType(ParameterType.OBJECT)
                .withValue("datanpzaoq")
                .withMetadata("datahrhcffcyddglmjth")
                .withDescription("kw");
        model = BinaryData.fromObject(model).toObject(WorkflowParameter.class);
        Assertions.assertEquals(ParameterType.OBJECT, model.type());
        Assertions.assertEquals("kw", model.description());
    }
}
