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

package com.azure.resourcemanager.resourcemover.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.resourcemover.models.SqlDatabaseResourceSettings;
import com.azure.resourcemanager.resourcemover.models.ZoneRedundant;
import org.junit.jupiter.api.Assertions;

public final class SqlDatabaseResourceSettingsTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        SqlDatabaseResourceSettings model =
            BinaryData
                .fromString(
                    "{\"resourceType\":\"Microsoft.Sql/servers/databases\",\"zoneRedundant\":\"Disable\",\"targetResourceName\":\"c\"}")
                .toObject(SqlDatabaseResourceSettings.class);
        Assertions.assertEquals("c", model.targetResourceName());
        Assertions.assertEquals(ZoneRedundant.DISABLE, model.zoneRedundant());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        SqlDatabaseResourceSettings model =
            new SqlDatabaseResourceSettings().withTargetResourceName("c").withZoneRedundant(ZoneRedundant.DISABLE);
        model = BinaryData.fromObject(model).toObject(SqlDatabaseResourceSettings.class);
        Assertions.assertEquals("c", model.targetResourceName());
        Assertions.assertEquals(ZoneRedundant.DISABLE, model.zoneRedundant());
    }
}
