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

package com.azure.resourcemanager.maps.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.maps.models.Dimension;
import org.junit.jupiter.api.Assertions;

public final class DimensionTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        Dimension model =
            BinaryData
                .fromString(
                    "{\"name\":\"bfs\",\"displayName\":\"nehmpvecx\",\"internalName\":\"debfqkkrbmpukgri\",\"internalMetricName\":\"lzlfbxzpuz\",\"sourceMdmNamespace\":\"ispnqzahmgkbrp\",\"toBeExportedToShoebox\":false}")
                .toObject(Dimension.class);
        Assertions.assertEquals("bfs", model.name());
        Assertions.assertEquals("nehmpvecx", model.displayName());
        Assertions.assertEquals("debfqkkrbmpukgri", model.internalName());
        Assertions.assertEquals("lzlfbxzpuz", model.internalMetricName());
        Assertions.assertEquals("ispnqzahmgkbrp", model.sourceMdmNamespace());
        Assertions.assertEquals(false, model.toBeExportedToShoebox());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        Dimension model =
            new Dimension()
                .withName("bfs")
                .withDisplayName("nehmpvecx")
                .withInternalName("debfqkkrbmpukgri")
                .withInternalMetricName("lzlfbxzpuz")
                .withSourceMdmNamespace("ispnqzahmgkbrp")
                .withToBeExportedToShoebox(false);
        model = BinaryData.fromObject(model).toObject(Dimension.class);
        Assertions.assertEquals("bfs", model.name());
        Assertions.assertEquals("nehmpvecx", model.displayName());
        Assertions.assertEquals("debfqkkrbmpukgri", model.internalName());
        Assertions.assertEquals("lzlfbxzpuz", model.internalMetricName());
        Assertions.assertEquals("ispnqzahmgkbrp", model.sourceMdmNamespace());
        Assertions.assertEquals(false, model.toBeExportedToShoebox());
    }
}
