// 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.DiskConfigurationType;
import com.azure.resourcemanager.sqlvirtualmachine.models.SqlStorageUpdateSettings;
import org.junit.jupiter.api.Assertions;

public final class SqlStorageUpdateSettingsTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        SqlStorageUpdateSettings model =
            BinaryData
                .fromString(
                    "{\"diskCount\":738552235,\"startingDeviceId\":1698610201,\"diskConfigurationType\":\"EXTEND\"}")
                .toObject(SqlStorageUpdateSettings.class);
        Assertions.assertEquals(738552235, model.diskCount());
        Assertions.assertEquals(1698610201, model.startingDeviceId());
        Assertions.assertEquals(DiskConfigurationType.EXTEND, model.diskConfigurationType());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        SqlStorageUpdateSettings model =
            new SqlStorageUpdateSettings()
                .withDiskCount(738552235)
                .withStartingDeviceId(1698610201)
                .withDiskConfigurationType(DiskConfigurationType.EXTEND);
        model = BinaryData.fromObject(model).toObject(SqlStorageUpdateSettings.class);
        Assertions.assertEquals(738552235, model.diskCount());
        Assertions.assertEquals(1698610201, model.startingDeviceId());
        Assertions.assertEquals(DiskConfigurationType.EXTEND, model.diskConfigurationType());
    }
}
