// 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.InputDeliveryMode;
import com.azure.resourcemanager.machinelearning.models.MLTableJobInput;
import org.junit.jupiter.api.Assertions;

public final class MLTableJobInputTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        MLTableJobInput model =
            BinaryData
                .fromString(
                    "{\"jobInputType\":\"mltable\",\"mode\":\"Direct\",\"uri\":\"pqinf\",\"description\":\"pyglqdhmrjzral\"}")
                .toObject(MLTableJobInput.class);
        Assertions.assertEquals("pyglqdhmrjzral", model.description());
        Assertions.assertEquals(InputDeliveryMode.DIRECT, model.mode());
        Assertions.assertEquals("pqinf", model.uri());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        MLTableJobInput model =
            new MLTableJobInput().withDescription("pyglqdhmrjzral").withMode(InputDeliveryMode.DIRECT).withUri("pqinf");
        model = BinaryData.fromObject(model).toObject(MLTableJobInput.class);
        Assertions.assertEquals("pyglqdhmrjzral", model.description());
        Assertions.assertEquals(InputDeliveryMode.DIRECT, model.mode());
        Assertions.assertEquals("pqinf", model.uri());
    }
}
