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

package com.azure.resourcemanager.synapse.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.synapse.fluent.models.IntegrationRuntimeOperationStatusInner;
import com.azure.resourcemanager.synapse.models.WorkspaceStatus;
import org.junit.jupiter.api.Assertions;

public final class IntegrationRuntimeOperationStatusInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        IntegrationRuntimeOperationStatusInner model =
            BinaryData
                .fromString(
                    "{\"status\":\"InProgress\",\"name\":\"uughtuqfecjxeyg\",\"properties\":\"datahxuicbuewmrs\",\"error\":\"jlxuz\"}")
                .toObject(IntegrationRuntimeOperationStatusInner.class);
        Assertions.assertEquals(WorkspaceStatus.IN_PROGRESS, model.status());
        Assertions.assertEquals("uughtuqfecjxeyg", model.name());
        Assertions.assertEquals("jlxuz", model.error());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        IntegrationRuntimeOperationStatusInner model =
            new IntegrationRuntimeOperationStatusInner()
                .withStatus(WorkspaceStatus.IN_PROGRESS)
                .withName("uughtuqfecjxeyg")
                .withProperties("datahxuicbuewmrs")
                .withError("jlxuz");
        model = BinaryData.fromObject(model).toObject(IntegrationRuntimeOperationStatusInner.class);
        Assertions.assertEquals(WorkspaceStatus.IN_PROGRESS, model.status());
        Assertions.assertEquals("uughtuqfecjxeyg", model.name());
        Assertions.assertEquals("jlxuz", model.error());
    }
}
