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

package com.azure.resourcemanager.hybridnetwork.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.hybridnetwork.models.DataDisk;
import com.azure.resourcemanager.hybridnetwork.models.DiskCreateOptionTypes;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public final class DataDiskTests {
    @Test
    public void testDeserialize() {
        DataDisk model =
            BinaryData
                .fromString("{\"createOption\":\"Unknown\",\"name\":\"dnvowg\",\"diskSizeGB\":884625398}")
                .toObject(DataDisk.class);
        Assertions.assertEquals(DiskCreateOptionTypes.UNKNOWN, model.createOption());
        Assertions.assertEquals("dnvowg", model.name());
        Assertions.assertEquals(884625398, model.diskSizeGB());
    }

    @Test
    public void testSerialize() {
        DataDisk model =
            new DataDisk().withCreateOption(DiskCreateOptionTypes.UNKNOWN).withName("dnvowg").withDiskSizeGB(884625398);
        model = BinaryData.fromObject(model).toObject(DataDisk.class);
        Assertions.assertEquals(DiskCreateOptionTypes.UNKNOWN, model.createOption());
        Assertions.assertEquals("dnvowg", model.name());
        Assertions.assertEquals(884625398, model.diskSizeGB());
    }
}
