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

package com.azure.resourcemanager.synapse.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.synapse.models.ConfigurationType;
import com.azure.resourcemanager.synapse.models.SparkConfigProperties;
import org.junit.jupiter.api.Assertions;

public final class SparkConfigPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        SparkConfigProperties model =
            BinaryData
                .fromString(
                    "{\"time\":\"2021-10-16T17:09:06Z\",\"content\":\"tmzlbiojlv\",\"filename\":\"rbbpneqvcwwyy\",\"configurationType\":\"Artifact\"}")
                .toObject(SparkConfigProperties.class);
        Assertions.assertEquals("tmzlbiojlv", model.content());
        Assertions.assertEquals("rbbpneqvcwwyy", model.filename());
        Assertions.assertEquals(ConfigurationType.ARTIFACT, model.configurationType());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        SparkConfigProperties model =
            new SparkConfigProperties()
                .withContent("tmzlbiojlv")
                .withFilename("rbbpneqvcwwyy")
                .withConfigurationType(ConfigurationType.ARTIFACT);
        model = BinaryData.fromObject(model).toObject(SparkConfigProperties.class);
        Assertions.assertEquals("tmzlbiojlv", model.content());
        Assertions.assertEquals("rbbpneqvcwwyy", model.filename());
        Assertions.assertEquals(ConfigurationType.ARTIFACT, model.configurationType());
    }
}
