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

package com.azure.resourcemanager.sqlvirtualmachine.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.sqlvirtualmachine.models.SqlStorageSettings;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class SqlStorageSettingsTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        SqlStorageSettings model =
            BinaryData
                .fromString("{\"luns\":[186143874,2120884016],\"defaultFilePath\":\"qn\"}")
                .toObject(SqlStorageSettings.class);
        Assertions.assertEquals(186143874, model.luns().get(0));
        Assertions.assertEquals("qn", model.defaultFilePath());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        SqlStorageSettings model =
            new SqlStorageSettings().withLuns(Arrays.asList(186143874, 2120884016)).withDefaultFilePath("qn");
        model = BinaryData.fromObject(model).toObject(SqlStorageSettings.class);
        Assertions.assertEquals(186143874, model.luns().get(0));
        Assertions.assertEquals("qn", model.defaultFilePath());
    }
}
