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

package com.azure.resourcemanager.devtestlabs.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.devtestlabs.models.AttachNewDataDiskOptions;
import com.azure.resourcemanager.devtestlabs.models.StorageType;
import org.junit.jupiter.api.Assertions;

public final class AttachNewDataDiskOptionsTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        AttachNewDataDiskOptions model =
            BinaryData
                .fromString("{\"diskSizeGiB\":51733848,\"diskName\":\"owqkdwytisi\",\"diskType\":\"Standard\"}")
                .toObject(AttachNewDataDiskOptions.class);
        Assertions.assertEquals(51733848, model.diskSizeGiB());
        Assertions.assertEquals("owqkdwytisi", model.diskName());
        Assertions.assertEquals(StorageType.STANDARD, model.diskType());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        AttachNewDataDiskOptions model =
            new AttachNewDataDiskOptions()
                .withDiskSizeGiB(51733848)
                .withDiskName("owqkdwytisi")
                .withDiskType(StorageType.STANDARD);
        model = BinaryData.fromObject(model).toObject(AttachNewDataDiskOptions.class);
        Assertions.assertEquals(51733848, model.diskSizeGiB());
        Assertions.assertEquals("owqkdwytisi", model.diskName());
        Assertions.assertEquals(StorageType.STANDARD, model.diskType());
    }
}
