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

package com.azure.resourcemanager.recoveryservicesbackup.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.recoveryservicesbackup.models.AzureSqlContainer;
import com.azure.resourcemanager.recoveryservicesbackup.models.BackupManagementType;
import org.junit.jupiter.api.Assertions;

public final class AzureSqlContainerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        AzureSqlContainer model =
            BinaryData
                .fromString(
                    "{\"containerType\":\"AzureSqlContainer\",\"friendlyName\":\"tswfpfmdgycxnms\",\"backupManagementType\":\"AzureStorage\",\"registrationStatus\":\"jjyslurlps\",\"healthStatus\":\"kvp\",\"protectableObjectType\":\"wqslsrhmpqvw\"}")
                .toObject(AzureSqlContainer.class);
        Assertions.assertEquals("tswfpfmdgycxnms", model.friendlyName());
        Assertions.assertEquals(BackupManagementType.AZURE_STORAGE, model.backupManagementType());
        Assertions.assertEquals("jjyslurlps", model.registrationStatus());
        Assertions.assertEquals("kvp", model.healthStatus());
        Assertions.assertEquals("wqslsrhmpqvw", model.protectableObjectType());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        AzureSqlContainer model =
            new AzureSqlContainer()
                .withFriendlyName("tswfpfmdgycxnms")
                .withBackupManagementType(BackupManagementType.AZURE_STORAGE)
                .withRegistrationStatus("jjyslurlps")
                .withHealthStatus("kvp")
                .withProtectableObjectType("wqslsrhmpqvw");
        model = BinaryData.fromObject(model).toObject(AzureSqlContainer.class);
        Assertions.assertEquals("tswfpfmdgycxnms", model.friendlyName());
        Assertions.assertEquals(BackupManagementType.AZURE_STORAGE, model.backupManagementType());
        Assertions.assertEquals("jjyslurlps", model.registrationStatus());
        Assertions.assertEquals("kvp", model.healthStatus());
        Assertions.assertEquals("wqslsrhmpqvw", model.protectableObjectType());
    }
}
