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

package com.azure.resourcemanager.logz.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.logz.models.LogzSingleSignOnProperties;
import com.azure.resourcemanager.logz.models.SingleSignOnStates;
import org.junit.jupiter.api.Assertions;

public final class LogzSingleSignOnPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        LogzSingleSignOnProperties model =
            BinaryData
                .fromString(
                    "{\"singleSignOnState\":\"Disable\",\"enterpriseAppId\":\"lzevgbmqjqab\",\"singleSignOnUrl\":\"pmivkwlzu\",\"provisioningState\":\"Deleting\"}")
                .toObject(LogzSingleSignOnProperties.class);
        Assertions.assertEquals(SingleSignOnStates.DISABLE, model.singleSignOnState());
        Assertions.assertEquals("lzevgbmqjqab", model.enterpriseAppId());
        Assertions.assertEquals("pmivkwlzu", model.singleSignOnUrl());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        LogzSingleSignOnProperties model =
            new LogzSingleSignOnProperties()
                .withSingleSignOnState(SingleSignOnStates.DISABLE)
                .withEnterpriseAppId("lzevgbmqjqab")
                .withSingleSignOnUrl("pmivkwlzu");
        model = BinaryData.fromObject(model).toObject(LogzSingleSignOnProperties.class);
        Assertions.assertEquals(SingleSignOnStates.DISABLE, model.singleSignOnState());
        Assertions.assertEquals("lzevgbmqjqab", model.enterpriseAppId());
        Assertions.assertEquals("pmivkwlzu", model.singleSignOnUrl());
    }
}
