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

package com.azure.resourcemanager.costmanagement.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.costmanagement.models.PivotProperties;
import com.azure.resourcemanager.costmanagement.models.PivotType;
import org.junit.jupiter.api.Assertions;

public final class PivotPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        PivotProperties model =
            BinaryData.fromString("{\"type\":\"TagKey\",\"name\":\"rzayv\"}").toObject(PivotProperties.class);
        Assertions.assertEquals(PivotType.TAG_KEY, model.type());
        Assertions.assertEquals("rzayv", model.name());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        PivotProperties model = new PivotProperties().withType(PivotType.TAG_KEY).withName("rzayv");
        model = BinaryData.fromObject(model).toObject(PivotProperties.class);
        Assertions.assertEquals(PivotType.TAG_KEY, model.type());
        Assertions.assertEquals("rzayv", model.name());
    }
}
