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

public final class SqlWorkloadTypeUpdateSettingsTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        SqlWorkloadTypeUpdateSettings model =
            BinaryData.fromString("{\"sqlWorkloadType\":\"OLTP\"}").toObject(SqlWorkloadTypeUpdateSettings.class);
        Assertions.assertEquals(SqlWorkloadType.OLTP, model.sqlWorkloadType());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        SqlWorkloadTypeUpdateSettings model =
            new SqlWorkloadTypeUpdateSettings().withSqlWorkloadType(SqlWorkloadType.OLTP);
        model = BinaryData.fromObject(model).toObject(SqlWorkloadTypeUpdateSettings.class);
        Assertions.assertEquals(SqlWorkloadType.OLTP, model.sqlWorkloadType());
    }
}
