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

package com.azure.resourcemanager.avs.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovement;
import com.azure.resourcemanager.avs.models.VirtualMachineRestrictMovementState;
import org.junit.jupiter.api.Assertions;

public final class VirtualMachineRestrictMovementTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        VirtualMachineRestrictMovement model =
            BinaryData.fromString("{\"restrictMovement\":\"Disabled\"}").toObject(VirtualMachineRestrictMovement.class);
        Assertions.assertEquals(VirtualMachineRestrictMovementState.DISABLED, model.restrictMovement());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        VirtualMachineRestrictMovement model =
            new VirtualMachineRestrictMovement().withRestrictMovement(VirtualMachineRestrictMovementState.DISABLED);
        model = BinaryData.fromObject(model).toObject(VirtualMachineRestrictMovement.class);
        Assertions.assertEquals(VirtualMachineRestrictMovementState.DISABLED, model.restrictMovement());
    }
}
