// 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.UriFileJobInput;
import org.junit.jupiter.api.Assertions;

public final class UriFileJobInputTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        UriFileJobInput model =
            BinaryData
                .fromString(
                    "{\"jobInputType\":\"uri_file\",\"mode\":\"ReadOnlyMount\",\"uri\":\"qgrvg\",\"description\":\"mxpu\"}")
                .toObject(UriFileJobInput.class);
        Assertions.assertEquals("mxpu", model.description());
        Assertions.assertEquals(InputDeliveryMode.READ_ONLY_MOUNT, model.mode());
        Assertions.assertEquals("qgrvg", model.uri());
    }

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