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

package com.azure.resourcemanager.machinelearning.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.machinelearning.models.ScriptReference;
import org.junit.jupiter.api.Assertions;

public final class ScriptReferenceTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ScriptReference model =
            BinaryData
                .fromString(
                    "{\"scriptSource\":\"z\",\"scriptData\":\"blkujrllfojuidjp\",\"scriptArguments\":\"yjucejikzoeo\",\"timeout\":\"tzejetjklnt\"}")
                .toObject(ScriptReference.class);
        Assertions.assertEquals("z", model.scriptSource());
        Assertions.assertEquals("blkujrllfojuidjp", model.scriptData());
        Assertions.assertEquals("yjucejikzoeo", model.scriptArguments());
        Assertions.assertEquals("tzejetjklnt", model.timeout());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ScriptReference model =
            new ScriptReference()
                .withScriptSource("z")
                .withScriptData("blkujrllfojuidjp")
                .withScriptArguments("yjucejikzoeo")
                .withTimeout("tzejetjklnt");
        model = BinaryData.fromObject(model).toObject(ScriptReference.class);
        Assertions.assertEquals("z", model.scriptSource());
        Assertions.assertEquals("blkujrllfojuidjp", model.scriptData());
        Assertions.assertEquals("yjucejikzoeo", model.scriptArguments());
        Assertions.assertEquals("tzejetjklnt", model.timeout());
    }
}
