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

package com.azure.resourcemanager.appconfiguration.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.appconfiguration.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\":\"ectehf\",\"displayName\":\"scjeypv\",\"internalName\":\"zrkgqhcjrefovg\"}")
                .toObject(MetricDimension.class);
        Assertions.assertEquals("ectehf", model.name());
        Assertions.assertEquals("scjeypv", model.displayName());
        Assertions.assertEquals("zrkgqhcjrefovg", model.internalName());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        MetricDimension model =
            new MetricDimension().withName("ectehf").withDisplayName("scjeypv").withInternalName("zrkgqhcjrefovg");
        model = BinaryData.fromObject(model).toObject(MetricDimension.class);
        Assertions.assertEquals("ectehf", model.name());
        Assertions.assertEquals("scjeypv", model.displayName());
        Assertions.assertEquals("zrkgqhcjrefovg", model.internalName());
    }
}
