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

package com.azure.resourcemanager.signalr.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.signalr.fluent.models.SharedPrivateLinkResourceProperties;
import org.junit.jupiter.api.Assertions;

public final class SharedPrivateLinkResourcePropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        SharedPrivateLinkResourceProperties model =
            BinaryData
                .fromString(
                    "{\"groupId\":\"fmisg\",\"privateLinkResourceId\":\"bnbbeldawkz\",\"provisioningState\":\"Running\",\"requestMessage\":\"ourqhakau\",\"status\":\"Approved\"}")
                .toObject(SharedPrivateLinkResourceProperties.class);
        Assertions.assertEquals("fmisg", model.groupId());
        Assertions.assertEquals("bnbbeldawkz", model.privateLinkResourceId());
        Assertions.assertEquals("ourqhakau", model.requestMessage());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        SharedPrivateLinkResourceProperties model =
            new SharedPrivateLinkResourceProperties()
                .withGroupId("fmisg")
                .withPrivateLinkResourceId("bnbbeldawkz")
                .withRequestMessage("ourqhakau");
        model = BinaryData.fromObject(model).toObject(SharedPrivateLinkResourceProperties.class);
        Assertions.assertEquals("fmisg", model.groupId());
        Assertions.assertEquals("bnbbeldawkz", model.privateLinkResourceId());
        Assertions.assertEquals("ourqhakau", model.requestMessage());
    }
}
