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

package com.azure.resourcemanager.storagecache.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.storagecache.models.RequiredAmlFilesystemSubnetsSizeInfo;
import com.azure.resourcemanager.storagecache.models.SkuName;
import org.junit.jupiter.api.Assertions;

public final class RequiredAmlFilesystemSubnetsSizeInfoTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        RequiredAmlFilesystemSubnetsSizeInfo model =
            BinaryData
                .fromString("{\"storageCapacityTiB\":38.036823,\"sku\":{\"name\":\"crmnohjtckwhds\"}}")
                .toObject(RequiredAmlFilesystemSubnetsSizeInfo.class);
        Assertions.assertEquals(38.036823F, model.storageCapacityTiB());
        Assertions.assertEquals("crmnohjtckwhds", model.sku().name());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        RequiredAmlFilesystemSubnetsSizeInfo model =
            new RequiredAmlFilesystemSubnetsSizeInfo()
                .withStorageCapacityTiB(38.036823F)
                .withSku(new SkuName().withName("crmnohjtckwhds"));
        model = BinaryData.fromObject(model).toObject(RequiredAmlFilesystemSubnetsSizeInfo.class);
        Assertions.assertEquals(38.036823F, model.storageCapacityTiB());
        Assertions.assertEquals("crmnohjtckwhds", model.sku().name());
    }
}
