// 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.SqlElasticPoolResourceSettings;
import com.azure.resourcemanager.resourcemover.models.ZoneRedundant;
import org.junit.jupiter.api.Assertions;

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

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