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

package com.azure.resourcemanager.hdinsight.generated;

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

public final class DimensionTests {
    @Test
    public void testDeserialize() {
        Dimension model =
            BinaryData
                .fromString(
                    "{\"name\":\"jbazpjuohminy\",\"displayName\":\"norwmduvwpklvx\",\"internalName\":\"ygdxpgpqchis\",\"toBeExportedForShoebox\":false}")
                .toObject(Dimension.class);
        Assertions.assertEquals("jbazpjuohminy", model.name());
        Assertions.assertEquals("norwmduvwpklvx", model.displayName());
        Assertions.assertEquals("ygdxpgpqchis", model.internalName());
        Assertions.assertEquals(false, model.toBeExportedForShoebox());
    }

    @Test
    public void testSerialize() {
        Dimension model =
            new Dimension()
                .withName("jbazpjuohminy")
                .withDisplayName("norwmduvwpklvx")
                .withInternalName("ygdxpgpqchis")
                .withToBeExportedForShoebox(false);
        model = BinaryData.fromObject(model).toObject(Dimension.class);
        Assertions.assertEquals("jbazpjuohminy", model.name());
        Assertions.assertEquals("norwmduvwpklvx", model.displayName());
        Assertions.assertEquals("ygdxpgpqchis", model.internalName());
        Assertions.assertEquals(false, model.toBeExportedForShoebox());
    }
}
