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

package com.azure.resourcemanager.mediaservices.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.mediaservices.fluent.models.AsyncOperationResultInner;
import com.azure.resourcemanager.mediaservices.models.AsyncOperationStatus;
import org.junit.jupiter.api.Assertions;

public final class AsyncOperationResultInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        AsyncOperationResultInner model =
            BinaryData
                .fromString("{\"name\":\"hmouwqlgzrfze\",\"status\":\"InProgress\"}")
                .toObject(AsyncOperationResultInner.class);
        Assertions.assertEquals("hmouwqlgzrfze", model.name());
        Assertions.assertEquals(AsyncOperationStatus.IN_PROGRESS, model.status());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        AsyncOperationResultInner model =
            new AsyncOperationResultInner().withName("hmouwqlgzrfze").withStatus(AsyncOperationStatus.IN_PROGRESS);
        model = BinaryData.fromObject(model).toObject(AsyncOperationResultInner.class);
        Assertions.assertEquals("hmouwqlgzrfze", model.name());
        Assertions.assertEquals(AsyncOperationStatus.IN_PROGRESS, model.status());
    }
}
