// 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.fluent.models.LogzSingleSignOnResourceInner;
import com.azure.resourcemanager.logz.models.LogzSingleSignOnProperties;
import com.azure.resourcemanager.logz.models.SingleSignOnStates;
import org.junit.jupiter.api.Assertions;

public final class LogzSingleSignOnResourceInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        LogzSingleSignOnResourceInner model =
            BinaryData
                .fromString(
                    "{\"properties\":{\"singleSignOnState\":\"Enable\",\"enterpriseAppId\":\"wska\",\"singleSignOnUrl\":\"ktzlcuiywg\",\"provisioningState\":\"Deleting\"},\"id\":\"gndrvynh\",\"name\":\"gpphrcgyn\",\"type\":\"ocpecfvmmco\"}")
                .toObject(LogzSingleSignOnResourceInner.class);
        Assertions.assertEquals(SingleSignOnStates.ENABLE, model.properties().singleSignOnState());
        Assertions.assertEquals("wska", model.properties().enterpriseAppId());
        Assertions.assertEquals("ktzlcuiywg", model.properties().singleSignOnUrl());
    }

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