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

package com.azure.resourcemanager.elasticsan.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.elasticsan.models.SourceCreationData;
import com.azure.resourcemanager.elasticsan.models.VolumeCreateOption;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public final class SourceCreationDataTests {
    @Test
    public void testDeserialize() {
        SourceCreationData model =
            BinaryData
                .fromString("{\"createSource\":\"None\",\"sourceUri\":\"lokeyy\"}")
                .toObject(SourceCreationData.class);
        Assertions.assertEquals(VolumeCreateOption.NONE, model.createSource());
        Assertions.assertEquals("lokeyy", model.sourceUri());
    }

    @Test
    public void testSerialize() {
        SourceCreationData model =
            new SourceCreationData().withCreateSource(VolumeCreateOption.NONE).withSourceUri("lokeyy");
        model = BinaryData.fromObject(model).toObject(SourceCreationData.class);
        Assertions.assertEquals(VolumeCreateOption.NONE, model.createSource());
        Assertions.assertEquals("lokeyy", model.sourceUri());
    }
}
