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

package com.azure.resourcemanager.datadog.generated;

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

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

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