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

package com.azure.resourcemanager.billingbenefits.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.billingbenefits.models.AppliedScopeProperties;
import org.junit.jupiter.api.Assertions;

public final class AppliedScopePropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        AppliedScopeProperties model =
            BinaryData
                .fromString(
                    "{\"tenantId\":\"paojakhmsbzjh\",\"managementGroupId\":\"zevdphlx\",\"subscriptionId\":\"lthqtrgqjbp\",\"resourceGroupId\":\"fsinzgvfcjrwzoxx\",\"displayName\":\"felluwfzitonpe\"}")
                .toObject(AppliedScopeProperties.class);
        Assertions.assertEquals("paojakhmsbzjh", model.tenantId());
        Assertions.assertEquals("zevdphlx", model.managementGroupId());
        Assertions.assertEquals("lthqtrgqjbp", model.subscriptionId());
        Assertions.assertEquals("fsinzgvfcjrwzoxx", model.resourceGroupId());
        Assertions.assertEquals("felluwfzitonpe", model.displayName());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        AppliedScopeProperties model =
            new AppliedScopeProperties()
                .withTenantId("paojakhmsbzjh")
                .withManagementGroupId("zevdphlx")
                .withSubscriptionId("lthqtrgqjbp")
                .withResourceGroupId("fsinzgvfcjrwzoxx")
                .withDisplayName("felluwfzitonpe");
        model = BinaryData.fromObject(model).toObject(AppliedScopeProperties.class);
        Assertions.assertEquals("paojakhmsbzjh", model.tenantId());
        Assertions.assertEquals("zevdphlx", model.managementGroupId());
        Assertions.assertEquals("lthqtrgqjbp", model.subscriptionId());
        Assertions.assertEquals("fsinzgvfcjrwzoxx", model.resourceGroupId());
        Assertions.assertEquals("felluwfzitonpe", model.displayName());
    }
}
