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

package com.azure.resourcemanager.databoxedge.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.databoxedge.models.MetricDimensionV1;
import org.junit.jupiter.api.Assertions;

public final class MetricDimensionV1Tests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        MetricDimensionV1 model =
            BinaryData
                .fromString(
                    "{\"name\":\"cciqihnhungbwjz\",\"displayName\":\"fygxgispemvtzfk\",\"toBeExportedForShoebox\":true}")
                .toObject(MetricDimensionV1.class);
        Assertions.assertEquals("cciqihnhungbwjz", model.name());
        Assertions.assertEquals("fygxgispemvtzfk", model.displayName());
        Assertions.assertEquals(true, model.toBeExportedForShoebox());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        MetricDimensionV1 model =
            new MetricDimensionV1()
                .withName("cciqihnhungbwjz")
                .withDisplayName("fygxgispemvtzfk")
                .withToBeExportedForShoebox(true);
        model = BinaryData.fromObject(model).toObject(MetricDimensionV1.class);
        Assertions.assertEquals("cciqihnhungbwjz", model.name());
        Assertions.assertEquals("fygxgispemvtzfk", model.displayName());
        Assertions.assertEquals(true, model.toBeExportedForShoebox());
    }
}
