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

package com.azure.resourcemanager.appcontainers.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.appcontainers.models.AzureActiveDirectoryLogin;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class AzureActiveDirectoryLoginTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        AzureActiveDirectoryLogin model =
            BinaryData
                .fromString(
                    "{\"loginParameters\":[\"jkjlxofpdvhpfx\",\"ypininm\",\"yhuybbkpod\"],\"disableWWWAuthenticate\":true}")
                .toObject(AzureActiveDirectoryLogin.class);
        Assertions.assertEquals("jkjlxofpdvhpfx", model.loginParameters().get(0));
        Assertions.assertEquals(true, model.disableWwwAuthenticate());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        AzureActiveDirectoryLogin model =
            new AzureActiveDirectoryLogin()
                .withLoginParameters(Arrays.asList("jkjlxofpdvhpfx", "ypininm", "yhuybbkpod"))
                .withDisableWwwAuthenticate(true);
        model = BinaryData.fromObject(model).toObject(AzureActiveDirectoryLogin.class);
        Assertions.assertEquals("jkjlxofpdvhpfx", model.loginParameters().get(0));
        Assertions.assertEquals(true, model.disableWwwAuthenticate());
    }
}
