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

package com.azure.resourcemanager.quantum.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.quantum.models.QuantumWorkspaceIdentity;
import com.azure.resourcemanager.quantum.models.ResourceIdentityType;
import org.junit.jupiter.api.Assertions;

public final class QuantumWorkspaceIdentityTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        QuantumWorkspaceIdentity model =
            BinaryData
                .fromString("{\"principalId\":\"git\",\"tenantId\":\"qhabifpikxwcz\",\"type\":\"None\"}")
                .toObject(QuantumWorkspaceIdentity.class);
        Assertions.assertEquals(ResourceIdentityType.NONE, model.type());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        QuantumWorkspaceIdentity model = new QuantumWorkspaceIdentity().withType(ResourceIdentityType.NONE);
        model = BinaryData.fromObject(model).toObject(QuantumWorkspaceIdentity.class);
        Assertions.assertEquals(ResourceIdentityType.NONE, model.type());
    }
}
