// 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.models.ShareablePrivateLinkResourceProperties;
import com.azure.resourcemanager.signalr.models.ShareablePrivateLinkResourceType;
import org.junit.jupiter.api.Assertions;

public final class ShareablePrivateLinkResourceTypeTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ShareablePrivateLinkResourceType model =
            BinaryData
                .fromString(
                    "{\"name\":\"oz\",\"properties\":{\"description\":\"helxprglya\",\"groupId\":\"dckcbc\",\"type\":\"jrjxgciqibrhosx\"}}")
                .toObject(ShareablePrivateLinkResourceType.class);
        Assertions.assertEquals("oz", model.name());
        Assertions.assertEquals("helxprglya", model.properties().description());
        Assertions.assertEquals("dckcbc", model.properties().groupId());
        Assertions.assertEquals("jrjxgciqibrhosx", model.properties().type());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ShareablePrivateLinkResourceType model =
            new ShareablePrivateLinkResourceType()
                .withName("oz")
                .withProperties(
                    new ShareablePrivateLinkResourceProperties()
                        .withDescription("helxprglya")
                        .withGroupId("dckcbc")
                        .withType("jrjxgciqibrhosx"));
        model = BinaryData.fromObject(model).toObject(ShareablePrivateLinkResourceType.class);
        Assertions.assertEquals("oz", model.name());
        Assertions.assertEquals("helxprglya", model.properties().description());
        Assertions.assertEquals("dckcbc", model.properties().groupId());
        Assertions.assertEquals("jrjxgciqibrhosx", model.properties().type());
    }
}
