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

public final class UriFolderJobOutputTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        UriFolderJobOutput model =
            BinaryData
                .fromString(
                    "{\"jobOutputType\":\"uri_folder\",\"mode\":\"ReadWriteMount\",\"uri\":\"caatsdohzniucbda\",\"description\":\"b\"}")
                .toObject(UriFolderJobOutput.class);
        Assertions.assertEquals("b", model.description());
        Assertions.assertEquals(OutputDeliveryMode.READ_WRITE_MOUNT, model.mode());
        Assertions.assertEquals("caatsdohzniucbda", model.uri());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        UriFolderJobOutput model =
            new UriFolderJobOutput()
                .withDescription("b")
                .withMode(OutputDeliveryMode.READ_WRITE_MOUNT)
                .withUri("caatsdohzniucbda");
        model = BinaryData.fromObject(model).toObject(UriFolderJobOutput.class);
        Assertions.assertEquals("b", model.description());
        Assertions.assertEquals(OutputDeliveryMode.READ_WRITE_MOUNT, model.mode());
        Assertions.assertEquals("caatsdohzniucbda", model.uri());
    }
}
