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

package com.azure.resourcemanager.reservations.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.reservations.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\":\"qsrxybzqqed\",\"managementGroupId\":\"tbciqfouflmm\",\"subscriptionId\":\"zsm\",\"resourceGroupId\":\"mglougpbkw\",\"displayName\":\"utduqktapspwgcu\"}")
                .toObject(AppliedScopeProperties.class);
        Assertions.assertEquals("qsrxybzqqed", model.tenantId());
        Assertions.assertEquals("tbciqfouflmm", model.managementGroupId());
        Assertions.assertEquals("zsm", model.subscriptionId());
        Assertions.assertEquals("mglougpbkw", model.resourceGroupId());
        Assertions.assertEquals("utduqktapspwgcu", model.displayName());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        AppliedScopeProperties model =
            new AppliedScopeProperties()
                .withTenantId("qsrxybzqqed")
                .withManagementGroupId("tbciqfouflmm")
                .withSubscriptionId("zsm")
                .withResourceGroupId("mglougpbkw")
                .withDisplayName("utduqktapspwgcu");
        model = BinaryData.fromObject(model).toObject(AppliedScopeProperties.class);
        Assertions.assertEquals("qsrxybzqqed", model.tenantId());
        Assertions.assertEquals("tbciqfouflmm", model.managementGroupId());
        Assertions.assertEquals("zsm", model.subscriptionId());
        Assertions.assertEquals("mglougpbkw", model.resourceGroupId());
        Assertions.assertEquals("utduqktapspwgcu", model.displayName());
    }
}
