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

package com.azure.resourcemanager.resourcegraph.generated;

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

public final class FacetResultTests {
    @Test
    public void testDeserialize() {
        FacetResult model =
            BinaryData
                .fromString(
                    "{\"resultType\":\"FacetResult\",\"totalRecords\":8819753813869121711,\"count\":1725970823,\"expression\":\"qnjaqwix\"}")
                .toObject(FacetResult.class);
        Assertions.assertEquals("qnjaqwix", model.expression());
        Assertions.assertEquals(8819753813869121711L, model.totalRecords());
        Assertions.assertEquals(1725970823, model.count());
    }

    @Test
    public void testSerialize() {
        FacetResult model =
            new FacetResult().withExpression("qnjaqwix").withTotalRecords(8819753813869121711L).withCount(1725970823);
        model = BinaryData.fromObject(model).toObject(FacetResult.class);
        Assertions.assertEquals("qnjaqwix", model.expression());
        Assertions.assertEquals(8819753813869121711L, model.totalRecords());
        Assertions.assertEquals(1725970823, model.count());
    }
}
