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

public final class SsisEnvironmentReferenceTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        SsisEnvironmentReference model =
            BinaryData
                .fromString(
                    "{\"id\":6838146046681775912,\"environmentFolderName\":\"iqch\",\"environmentName\":\"tuicds\",\"referenceType\":\"dfmmpzhzzwvy\"}")
                .toObject(SsisEnvironmentReference.class);
        Assertions.assertEquals(6838146046681775912L, model.id());
        Assertions.assertEquals("iqch", model.environmentFolderName());
        Assertions.assertEquals("tuicds", model.environmentName());
        Assertions.assertEquals("dfmmpzhzzwvy", model.referenceType());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        SsisEnvironmentReference model =
            new SsisEnvironmentReference()
                .withId(6838146046681775912L)
                .withEnvironmentFolderName("iqch")
                .withEnvironmentName("tuicds")
                .withReferenceType("dfmmpzhzzwvy");
        model = BinaryData.fromObject(model).toObject(SsisEnvironmentReference.class);
        Assertions.assertEquals(6838146046681775912L, model.id());
        Assertions.assertEquals("iqch", model.environmentFolderName());
        Assertions.assertEquals("tuicds", model.environmentName());
        Assertions.assertEquals("dfmmpzhzzwvy", model.referenceType());
    }
}
