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

public final class SqlPoolConnectionPolicyPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        SqlPoolConnectionPolicyProperties model =
            BinaryData
                .fromString(
                    "{\"securityEnabledAccess\":\"feo\",\"proxyDnsName\":\"rqwky\",\"proxyPort\":\"ob\",\"visibility\":\"gxedkow\",\"useServerDefault\":\"bqpc\",\"redirectionState\":\"kbwcc\",\"state\":\"jvcdwxlpqekf\"}")
                .toObject(SqlPoolConnectionPolicyProperties.class);
        Assertions.assertEquals("feo", model.securityEnabledAccess());
        Assertions.assertEquals("rqwky", model.proxyDnsName());
        Assertions.assertEquals("ob", model.proxyPort());
        Assertions.assertEquals("gxedkow", model.visibility());
        Assertions.assertEquals("bqpc", model.useServerDefault());
        Assertions.assertEquals("kbwcc", model.redirectionState());
        Assertions.assertEquals("jvcdwxlpqekf", model.state());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        SqlPoolConnectionPolicyProperties model =
            new SqlPoolConnectionPolicyProperties()
                .withSecurityEnabledAccess("feo")
                .withProxyDnsName("rqwky")
                .withProxyPort("ob")
                .withVisibility("gxedkow")
                .withUseServerDefault("bqpc")
                .withRedirectionState("kbwcc")
                .withState("jvcdwxlpqekf");
        model = BinaryData.fromObject(model).toObject(SqlPoolConnectionPolicyProperties.class);
        Assertions.assertEquals("feo", model.securityEnabledAccess());
        Assertions.assertEquals("rqwky", model.proxyDnsName());
        Assertions.assertEquals("ob", model.proxyPort());
        Assertions.assertEquals("gxedkow", model.visibility());
        Assertions.assertEquals("bqpc", model.useServerDefault());
        Assertions.assertEquals("kbwcc", model.redirectionState());
        Assertions.assertEquals("jvcdwxlpqekf", model.state());
    }
}
