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

public final class SelfHostedIntegrationRuntimeTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        SelfHostedIntegrationRuntime model =
            BinaryData
                .fromString(
                    "{\"type\":\"SelfHosted\",\"typeProperties\":{\"linkedInfo\":{\"authorizationType\":\"LinkedIntegrationRuntimeType\"}},\"description\":\"txeqi\",\"\":{\"sfayorpravkjoges\":\"datazdyi\",\"wynqxaekqsykvwj\":\"dataabnsmj\",\"spxklu\":\"dataqpkevmyltjc\",\"ytzpo\":\"datacclfgxannn\"}}")
                .toObject(SelfHostedIntegrationRuntime.class);
        Assertions.assertEquals("txeqi", model.description());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        SelfHostedIntegrationRuntime model =
            new SelfHostedIntegrationRuntime()
                .withDescription("txeqi")
                .withLinkedInfo(new LinkedIntegrationRuntimeType());
        model = BinaryData.fromObject(model).toObject(SelfHostedIntegrationRuntime.class);
        Assertions.assertEquals("txeqi", model.description());
    }
}
