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

package com.azure.resourcemanager.networkcloud.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.networkcloud.models.BareMetalMachineRunCommandParameters;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class BareMetalMachineRunCommandParametersTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        BareMetalMachineRunCommandParameters model =
            BinaryData
                .fromString(
                    "{\"arguments\":[\"nfwqzdzgtilaxhn\",\"hqlyvijo\",\"wivkxo\"],\"limitTimeSeconds\":6975043128466071943,\"script\":\"nbixxrti\"}")
                .toObject(BareMetalMachineRunCommandParameters.class);
        Assertions.assertEquals("nfwqzdzgtilaxhn", model.arguments().get(0));
        Assertions.assertEquals(6975043128466071943L, model.limitTimeSeconds());
        Assertions.assertEquals("nbixxrti", model.script());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        BareMetalMachineRunCommandParameters model =
            new BareMetalMachineRunCommandParameters()
                .withArguments(Arrays.asList("nfwqzdzgtilaxhn", "hqlyvijo", "wivkxo"))
                .withLimitTimeSeconds(6975043128466071943L)
                .withScript("nbixxrti");
        model = BinaryData.fromObject(model).toObject(BareMetalMachineRunCommandParameters.class);
        Assertions.assertEquals("nfwqzdzgtilaxhn", model.arguments().get(0));
        Assertions.assertEquals(6975043128466071943L, model.limitTimeSeconds());
        Assertions.assertEquals("nbixxrti", model.script());
    }
}
