// 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.DataConnectionInner;
import com.azure.resourcemanager.synapse.fluent.models.DataConnectionValidationInner;
import org.junit.jupiter.api.Assertions;

public final class DataConnectionValidationInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        DataConnectionValidationInner model =
            BinaryData
                .fromString(
                    "{\"dataConnectionName\":\"mbltoo\",\"properties\":{\"kind\":\"DataConnection\",\"location\":\"fqlwxldykalsy\",\"id\":\"olnjpnnbmjksibj\",\"name\":\"sjjx\",\"type\":\"ahmrnadzyqegxyi\"}}")
                .toObject(DataConnectionValidationInner.class);
        Assertions.assertEquals("mbltoo", model.dataConnectionName());
        Assertions.assertEquals("fqlwxldykalsy", model.properties().location());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        DataConnectionValidationInner model =
            new DataConnectionValidationInner()
                .withDataConnectionName("mbltoo")
                .withProperties(new DataConnectionInner().withLocation("fqlwxldykalsy"));
        model = BinaryData.fromObject(model).toObject(DataConnectionValidationInner.class);
        Assertions.assertEquals("mbltoo", model.dataConnectionName());
        Assertions.assertEquals("fqlwxldykalsy", model.properties().location());
    }
}
