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

package com.azure.resourcemanager.avs.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.avs.models.MetricDimension;
import org.junit.jupiter.api.Assertions;

public final class MetricDimensionTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        MetricDimension model =
            BinaryData
                .fromString(
                    "{\"name\":\"c\",\"displayName\":\"ierhhbcsglummaj\",\"internalName\":\"aodxo\",\"toBeExportedForShoebox\":true}")
                .toObject(MetricDimension.class);
        Assertions.assertEquals("c", model.name());
        Assertions.assertEquals("ierhhbcsglummaj", model.displayName());
        Assertions.assertEquals("aodxo", model.internalName());
        Assertions.assertEquals(true, model.toBeExportedForShoebox());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        MetricDimension model =
            new MetricDimension()
                .withName("c")
                .withDisplayName("ierhhbcsglummaj")
                .withInternalName("aodxo")
                .withToBeExportedForShoebox(true);
        model = BinaryData.fromObject(model).toObject(MetricDimension.class);
        Assertions.assertEquals("c", model.name());
        Assertions.assertEquals("ierhhbcsglummaj", model.displayName());
        Assertions.assertEquals("aodxo", model.internalName());
        Assertions.assertEquals(true, model.toBeExportedForShoebox());
    }
}
