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

package com.azure.resourcemanager.newrelicobservability.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.newrelicobservability.models.NewRelicSingleSignOnProperties;
import com.azure.resourcemanager.newrelicobservability.models.ProvisioningState;
import com.azure.resourcemanager.newrelicobservability.models.SingleSignOnStates;
import org.junit.jupiter.api.Assertions;

public final class NewRelicSingleSignOnPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        NewRelicSingleSignOnProperties model =
            BinaryData
                .fromString(
                    "{\"singleSignOnState\":\"Initial\",\"enterpriseAppId\":\"itnwuizgazxufi\",\"singleSignOnUrl\":\"ckyfih\",\"provisioningState\":\"NotSpecified\"}")
                .toObject(NewRelicSingleSignOnProperties.class);
        Assertions.assertEquals(SingleSignOnStates.INITIAL, model.singleSignOnState());
        Assertions.assertEquals("itnwuizgazxufi", model.enterpriseAppId());
        Assertions.assertEquals("ckyfih", model.singleSignOnUrl());
        Assertions.assertEquals(ProvisioningState.NOT_SPECIFIED, model.provisioningState());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        NewRelicSingleSignOnProperties model =
            new NewRelicSingleSignOnProperties()
                .withSingleSignOnState(SingleSignOnStates.INITIAL)
                .withEnterpriseAppId("itnwuizgazxufi")
                .withSingleSignOnUrl("ckyfih")
                .withProvisioningState(ProvisioningState.NOT_SPECIFIED);
        model = BinaryData.fromObject(model).toObject(NewRelicSingleSignOnProperties.class);
        Assertions.assertEquals(SingleSignOnStates.INITIAL, model.singleSignOnState());
        Assertions.assertEquals("itnwuizgazxufi", model.enterpriseAppId());
        Assertions.assertEquals("ckyfih", model.singleSignOnUrl());
        Assertions.assertEquals(ProvisioningState.NOT_SPECIFIED, model.provisioningState());
    }
}
