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

package com.azure.resourcemanager.datamigration.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.datamigration.fluent.models.ProjectTaskInner;
import com.azure.resourcemanager.datamigration.models.ProjectTaskProperties;
import org.junit.jupiter.api.Assertions;

public final class ProjectTaskInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ProjectTaskInner model =
            BinaryData
                .fromString(
                    "{\"etag\":\"sszdnru\",\"properties\":{\"taskType\":\"ProjectTaskProperties\",\"errors\":[],\"state\":\"Canceled\",\"commands\":[{\"commandType\":\"CommandProperties\",\"errors\":[],\"state\":\"Accepted\"},{\"commandType\":\"CommandProperties\",\"errors\":[],\"state\":\"Failed\"}]},\"id\":\"zw\",\"name\":\"nguitnwuizgazxu\",\"type\":\"izuckyfihrfidfvz\"}")
                .toObject(ProjectTaskInner.class);
        Assertions.assertEquals("sszdnru", model.etag());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ProjectTaskInner model = new ProjectTaskInner().withEtag("sszdnru").withProperties(new ProjectTaskProperties());
        model = BinaryData.fromObject(model).toObject(ProjectTaskInner.class);
        Assertions.assertEquals("sszdnru", model.etag());
    }
}
