// 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.BulkRemoveRequest;
import com.azure.resourcemanager.resourcemover.models.MoveResourceInputType;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class BulkRemoveRequestTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        BulkRemoveRequest model =
            BinaryData
                .fromString(
                    "{\"validateOnly\":false,\"moveResources\":[\"u\"],\"moveResourceInputType\":\"MoveResourceId\"}")
                .toObject(BulkRemoveRequest.class);
        Assertions.assertEquals(false, model.validateOnly());
        Assertions.assertEquals("u", model.moveResources().get(0));
        Assertions.assertEquals(MoveResourceInputType.MOVE_RESOURCE_ID, model.moveResourceInputType());
    }

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