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

public final class CustomModelJobInputTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        CustomModelJobInput model =
            BinaryData
                .fromString(
                    "{\"jobInputType\":\"custom_model\",\"mode\":\"Direct\",\"uri\":\"bkjbz\",\"description\":\"nsvk\"}")
                .toObject(CustomModelJobInput.class);
        Assertions.assertEquals("nsvk", model.description());
        Assertions.assertEquals(InputDeliveryMode.DIRECT, model.mode());
        Assertions.assertEquals("bkjbz", model.uri());
    }

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