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

package com.azure.resourcemanager.devtestlabs.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.devtestlabs.models.EvaluatePoliciesProperties;
import org.junit.jupiter.api.Assertions;

public final class EvaluatePoliciesPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        EvaluatePoliciesProperties model =
            BinaryData
                .fromString(
                    "{\"factName\":\"zzbtdcqvpniyujvi\",\"factData\":\"wdsh\",\"valueOffset\":\"snrbgyefrymsgao\",\"userObjectId\":\"mwn\"}")
                .toObject(EvaluatePoliciesProperties.class);
        Assertions.assertEquals("zzbtdcqvpniyujvi", model.factName());
        Assertions.assertEquals("wdsh", model.factData());
        Assertions.assertEquals("snrbgyefrymsgao", model.valueOffset());
        Assertions.assertEquals("mwn", model.userObjectId());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        EvaluatePoliciesProperties model =
            new EvaluatePoliciesProperties()
                .withFactName("zzbtdcqvpniyujvi")
                .withFactData("wdsh")
                .withValueOffset("snrbgyefrymsgao")
                .withUserObjectId("mwn");
        model = BinaryData.fromObject(model).toObject(EvaluatePoliciesProperties.class);
        Assertions.assertEquals("zzbtdcqvpniyujvi", model.factName());
        Assertions.assertEquals("wdsh", model.factData());
        Assertions.assertEquals("snrbgyefrymsgao", model.valueOffset());
        Assertions.assertEquals("mwn", model.userObjectId());
    }
}
