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

package com.azure.resourcemanager.kusto.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.kusto.fluent.models.FollowerDatabaseDefinitionInner;
import org.junit.jupiter.api.Assertions;

public final class FollowerDatabaseDefinitionInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        FollowerDatabaseDefinitionInner model =
            BinaryData
                .fromString(
                    "{\"clusterResourceId\":\"pzaoqvuhr\",\"attachedDatabaseConfigurationName\":\"cffcyddglmj\",\"databaseName\":\"jqkwpyeicx\",\"tableLevelSharingProperties\":{\"tablesToInclude\":[\"wqvhkhixuigdt\",\"pbobjo\"],\"tablesToExclude\":[\"e\"],\"externalTablesToInclude\":[\"m\"],\"externalTablesToExclude\":[\"rzayv\",\"t\",\"gvdfgiotkftutq\",\"ln\"],\"materializedViewsToInclude\":[\"efgugnxk\",\"xdqmidtthzrvqdra\",\"hjybigehoqfbo\"],\"materializedViewsToExclude\":[\"anyktzlcuiywg\",\"ywgndrv\",\"nhzgpphrcgyn\",\"ocpecfvmmco\"],\"functionsToInclude\":[\"xlzevgbmqjqabcy\",\"mivkwlzuvcc\",\"wnfnbacf\"],\"functionsToExclude\":[\"l\",\"bxetqgtzxdpn\",\"bqqwxrj\",\"eallnwsubisnj\"]},\"databaseShareOrigin\":\"DataShare\"}")
                .toObject(FollowerDatabaseDefinitionInner.class);
        Assertions.assertEquals("pzaoqvuhr", model.clusterResourceId());
        Assertions.assertEquals("cffcyddglmj", model.attachedDatabaseConfigurationName());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        FollowerDatabaseDefinitionInner model =
            new FollowerDatabaseDefinitionInner()
                .withClusterResourceId("pzaoqvuhr")
                .withAttachedDatabaseConfigurationName("cffcyddglmj");
        model = BinaryData.fromObject(model).toObject(FollowerDatabaseDefinitionInner.class);
        Assertions.assertEquals("pzaoqvuhr", model.clusterResourceId());
        Assertions.assertEquals("cffcyddglmj", model.attachedDatabaseConfigurationName());
    }
}
