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

package com.azure.resourcemanager.resourcemover.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.resourcemover.models.MoveResourceInputType;
import com.azure.resourcemanager.resourcemover.models.ResourceMoveRequest;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class ResourceMoveRequestTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ResourceMoveRequest model =
            BinaryData
                .fromString(
                    "{\"validateOnly\":false,\"moveResources\":[\"gvfcj\",\"wzo\",\"xjtfelluwfzit\"],\"moveResourceInputType\":\"MoveResourceSourceId\"}")
                .toObject(ResourceMoveRequest.class);
        Assertions.assertEquals(false, model.validateOnly());
        Assertions.assertEquals("gvfcj", model.moveResources().get(0));
        Assertions.assertEquals(MoveResourceInputType.MOVE_RESOURCE_SOURCE_ID, model.moveResourceInputType());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ResourceMoveRequest model =
            new ResourceMoveRequest()
                .withValidateOnly(false)
                .withMoveResources(Arrays.asList("gvfcj", "wzo", "xjtfelluwfzit"))
                .withMoveResourceInputType(MoveResourceInputType.MOVE_RESOURCE_SOURCE_ID);
        model = BinaryData.fromObject(model).toObject(ResourceMoveRequest.class);
        Assertions.assertEquals(false, model.validateOnly());
        Assertions.assertEquals("gvfcj", model.moveResources().get(0));
        Assertions.assertEquals(MoveResourceInputType.MOVE_RESOURCE_SOURCE_ID, model.moveResourceInputType());
    }
}
