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

package com.azure.resourcemanager.hdinsight.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.hdinsight.models.NetworkProperties;
import com.azure.resourcemanager.hdinsight.models.PrivateLink;
import com.azure.resourcemanager.hdinsight.models.ResourceProviderConnection;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public final class NetworkPropertiesTests {
    @Test
    public void testDeserialize() {
        NetworkProperties model =
            BinaryData
                .fromString("{\"resourceProviderConnection\":\"Inbound\",\"privateLink\":\"Disabled\"}")
                .toObject(NetworkProperties.class);
        Assertions.assertEquals(ResourceProviderConnection.INBOUND, model.resourceProviderConnection());
        Assertions.assertEquals(PrivateLink.DISABLED, model.privateLink());
    }

    @Test
    public void testSerialize() {
        NetworkProperties model =
            new NetworkProperties()
                .withResourceProviderConnection(ResourceProviderConnection.INBOUND)
                .withPrivateLink(PrivateLink.DISABLED);
        model = BinaryData.fromObject(model).toObject(NetworkProperties.class);
        Assertions.assertEquals(ResourceProviderConnection.INBOUND, model.resourceProviderConnection());
        Assertions.assertEquals(PrivateLink.DISABLED, model.privateLink());
    }
}
