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

package com.azure.resourcemanager.dashboard.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.dashboard.models.PrivateEndpointServiceConnectionStatus;
import com.azure.resourcemanager.dashboard.models.PrivateLinkServiceConnectionState;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public final class PrivateLinkServiceConnectionStateTests {
    @Test
    public void testDeserialize() {
        PrivateLinkServiceConnectionState model =
            BinaryData
                .fromString("{\"status\":\"Rejected\",\"description\":\"opvkmijcm\",\"actionsRequired\":\"dcuf\"}")
                .toObject(PrivateLinkServiceConnectionState.class);
        Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, model.status());
        Assertions.assertEquals("opvkmijcm", model.description());
        Assertions.assertEquals("dcuf", model.actionsRequired());
    }

    @Test
    public void testSerialize() {
        PrivateLinkServiceConnectionState model =
            new PrivateLinkServiceConnectionState()
                .withStatus(PrivateEndpointServiceConnectionStatus.REJECTED)
                .withDescription("opvkmijcm")
                .withActionsRequired("dcuf");
        model = BinaryData.fromObject(model).toObject(PrivateLinkServiceConnectionState.class);
        Assertions.assertEquals(PrivateEndpointServiceConnectionStatus.REJECTED, model.status());
        Assertions.assertEquals("opvkmijcm", model.description());
        Assertions.assertEquals("dcuf", model.actionsRequired());
    }
}
