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

public final class SqlPoolConnectionPolicyInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        SqlPoolConnectionPolicyInner model =
            BinaryData
                .fromString(
                    "{\"kind\":\"botzingamvppho\",\"location\":\"qzudphq\",\"properties\":{\"securityEnabledAccess\":\"dkfw\",\"proxyDnsName\":\"wcvtbvkayhmtnvyq\",\"proxyPort\":\"tkzwpcnpwzc\",\"visibility\":\"esgvvsccyaj\",\"useServerDefault\":\"qfhwyg\",\"redirectionState\":\"vdnkfxusem\",\"state\":\"zrmuhapfcqdps\"},\"id\":\"xqv\",\"name\":\"svuo\",\"type\":\"mgccelvezrypq\"}")
                .toObject(SqlPoolConnectionPolicyInner.class);
        Assertions.assertEquals("dkfw", model.securityEnabledAccess());
        Assertions.assertEquals("wcvtbvkayhmtnvyq", model.proxyDnsName());
        Assertions.assertEquals("tkzwpcnpwzc", model.proxyPort());
        Assertions.assertEquals("esgvvsccyaj", model.visibility());
        Assertions.assertEquals("qfhwyg", model.useServerDefault());
        Assertions.assertEquals("vdnkfxusem", model.redirectionState());
        Assertions.assertEquals("zrmuhapfcqdps", model.state());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        SqlPoolConnectionPolicyInner model =
            new SqlPoolConnectionPolicyInner()
                .withSecurityEnabledAccess("dkfw")
                .withProxyDnsName("wcvtbvkayhmtnvyq")
                .withProxyPort("tkzwpcnpwzc")
                .withVisibility("esgvvsccyaj")
                .withUseServerDefault("qfhwyg")
                .withRedirectionState("vdnkfxusem")
                .withState("zrmuhapfcqdps");
        model = BinaryData.fromObject(model).toObject(SqlPoolConnectionPolicyInner.class);
        Assertions.assertEquals("dkfw", model.securityEnabledAccess());
        Assertions.assertEquals("wcvtbvkayhmtnvyq", model.proxyDnsName());
        Assertions.assertEquals("tkzwpcnpwzc", model.proxyPort());
        Assertions.assertEquals("esgvvsccyaj", model.visibility());
        Assertions.assertEquals("qfhwyg", model.useServerDefault());
        Assertions.assertEquals("vdnkfxusem", model.redirectionState());
        Assertions.assertEquals("zrmuhapfcqdps", model.state());
    }
}
