// 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.ExpressionEvaluationDetails;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public final class ExpressionEvaluationDetailsTests {
    @Test
    public void testDeserialize() {
        ExpressionEvaluationDetails model =
            BinaryData
                .fromString(
                    "{\"result\":\"euecivyhzceuoj\",\"expression\":\"rw\",\"expressionKind\":\"eiotwmcdytdx\",\"path\":\"txnrjaw\",\"operator\":\"xhniskxfbkpycgk\"}")
                .toObject(ExpressionEvaluationDetails.class);
        Assertions.assertEquals("euecivyhzceuoj", model.result());
        Assertions.assertEquals("rw", model.expression());
        Assertions.assertEquals("txnrjaw", model.path());
        Assertions.assertEquals("xhniskxfbkpycgk", model.operator());
    }

    @Test
    public void testSerialize() {
        ExpressionEvaluationDetails model =
            new ExpressionEvaluationDetails()
                .withResult("euecivyhzceuoj")
                .withExpression("rw")
                .withPath("txnrjaw")
                .withOperator("xhniskxfbkpycgk");
        model = BinaryData.fromObject(model).toObject(ExpressionEvaluationDetails.class);
        Assertions.assertEquals("euecivyhzceuoj", model.result());
        Assertions.assertEquals("rw", model.expression());
        Assertions.assertEquals("txnrjaw", model.path());
        Assertions.assertEquals("xhniskxfbkpycgk", model.operator());
    }
}
