// 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.SwaggerCustomDynamicTreeParameter;
import org.junit.jupiter.api.Assertions;

public final class SwaggerCustomDynamicTreeParameterTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        SwaggerCustomDynamicTreeParameter model =
            BinaryData
                .fromString(
                    "{\"selectedItemValuePath\":\"jn\",\"value\":\"dataljdjuskbrreqy\",\"parameterReference\":\"ceysfaqeg\",\"required\":false}")
                .toObject(SwaggerCustomDynamicTreeParameter.class);
        Assertions.assertEquals("jn", model.selectedItemValuePath());
        Assertions.assertEquals("ceysfaqeg", model.parameterReference());
        Assertions.assertEquals(false, model.required());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        SwaggerCustomDynamicTreeParameter model =
            new SwaggerCustomDynamicTreeParameter()
                .withSelectedItemValuePath("jn")
                .withValue("dataljdjuskbrreqy")
                .withParameterReference("ceysfaqeg")
                .withRequired(false);
        model = BinaryData.fromObject(model).toObject(SwaggerCustomDynamicTreeParameter.class);
        Assertions.assertEquals("jn", model.selectedItemValuePath());
        Assertions.assertEquals("ceysfaqeg", model.parameterReference());
        Assertions.assertEquals(false, model.required());
    }
}
