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

package com.azure.resourcemanager.policyinsights.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.policyinsights.models.CheckRestrictionsResourceDetails;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public final class CheckRestrictionsResourceDetailsTests {
    @Test
    public void testDeserialize() {
        CheckRestrictionsResourceDetails model =
            BinaryData
                .fromString("{\"apiVersion\":\"qreyfkzi\",\"scope\":\"jawneaiv\"}")
                .toObject(CheckRestrictionsResourceDetails.class);
        Assertions.assertEquals("qreyfkzi", model.apiVersion());
        Assertions.assertEquals("jawneaiv", model.scope());
    }

    @Test
    public void testSerialize() {
        CheckRestrictionsResourceDetails model =
            new CheckRestrictionsResourceDetails().withApiVersion("qreyfkzi").withScope("jawneaiv");
        model = BinaryData.fromObject(model).toObject(CheckRestrictionsResourceDetails.class);
        Assertions.assertEquals("qreyfkzi", model.apiVersion());
        Assertions.assertEquals("jawneaiv", model.scope());
    }
}
