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

package com.azure.resourcemanager.desktopvirtualization.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.desktopvirtualization.fluent.models.WorkspaceProperties;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class WorkspacePropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        WorkspaceProperties model =
            BinaryData
                .fromString(
                    "{\"objectId\":\"jofxqe\",\"description\":\"jaeq\",\"friendlyName\":\"qjbasvms\",\"applicationGroupReferences\":[\"ulngsntn\",\"ybkzgcwr\",\"clxxwrljdo\",\"skcqvkocrcjd\"],\"cloudPcResource\":false}")
                .toObject(WorkspaceProperties.class);
        Assertions.assertEquals("jaeq", model.description());
        Assertions.assertEquals("qjbasvms", model.friendlyName());
        Assertions.assertEquals("ulngsntn", model.applicationGroupReferences().get(0));
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        WorkspaceProperties model =
            new WorkspaceProperties()
                .withDescription("jaeq")
                .withFriendlyName("qjbasvms")
                .withApplicationGroupReferences(Arrays.asList("ulngsntn", "ybkzgcwr", "clxxwrljdo", "skcqvkocrcjd"));
        model = BinaryData.fromObject(model).toObject(WorkspaceProperties.class);
        Assertions.assertEquals("jaeq", model.description());
        Assertions.assertEquals("qjbasvms", model.friendlyName());
        Assertions.assertEquals("ulngsntn", model.applicationGroupReferences().get(0));
    }
}
