// 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.fluent.models.DimensionProperties;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class DimensionPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        DimensionProperties model =
            BinaryData
                .fromString(
                    "{\"description\":\"bxmubyynt\",\"filterEnabled\":false,\"groupingEnabled\":false,\"data\":[\"oievseotgqrlltm\",\"wlauwzizxbmpg\"],\"total\":904231635,\"category\":\"u\",\"usageStart\":\"2021-07-24T11:16:02Z\",\"usageEnd\":\"2021-05-22T02:28:39Z\",\"nextLink\":\"ttdumorppxebmnzb\"}")
                .toObject(DimensionProperties.class);
        Assertions.assertEquals("oievseotgqrlltm", model.data().get(0));
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        DimensionProperties model =
            new DimensionProperties().withData(Arrays.asList("oievseotgqrlltm", "wlauwzizxbmpg"));
        model = BinaryData.fromObject(model).toObject(DimensionProperties.class);
        Assertions.assertEquals("oievseotgqrlltm", model.data().get(0));
    }
}
