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

package com.azure.resourcemanager.managednetworkfabric.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.managednetworkfabric.fluent.models.NetworkFabricSkuInner;
import com.azure.resourcemanager.managednetworkfabric.models.NetworkFabricSkusListResult;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class NetworkFabricSkusListResultTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        NetworkFabricSkusListResult model =
            BinaryData
                .fromString(
                    "{\"value\":[{\"properties\":{\"type\":\"bbc\",\"maxComputeRacks\":990480911,\"minSupportedVer\":\"gtltdhlf\",\"maxSupportedVer\":\"ojpykvgtrdc\",\"detailsUri\":\"fmzzsdymbrny\",\"provisioningState\":\"Canceled\"},\"id\":\"prafwgckhoc\",\"name\":\"vdff\",\"type\":\"wafqroud\"},{\"properties\":{\"type\":\"pavehhr\",\"maxComputeRacks\":221531853,\"minSupportedVer\":\"n\",\"maxSupportedVer\":\"zudhcxg\",\"detailsUri\":\"oyxcdyuib\",\"provisioningState\":\"Deleting\"},\"id\":\"nbzydvfvfcj\",\"name\":\"aeoisrvh\",\"type\":\"gorf\"}],\"nextLink\":\"kiscvwmzhwpl\"}")
                .toObject(NetworkFabricSkusListResult.class);
        Assertions.assertEquals(990480911, model.value().get(0).maxComputeRacks());
        Assertions.assertEquals("kiscvwmzhwpl", model.nextLink());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        NetworkFabricSkusListResult model =
            new NetworkFabricSkusListResult()
                .withValue(
                    Arrays
                        .asList(
                            new NetworkFabricSkuInner().withMaxComputeRacks(990480911),
                            new NetworkFabricSkuInner().withMaxComputeRacks(221531853)))
                .withNextLink("kiscvwmzhwpl");
        model = BinaryData.fromObject(model).toObject(NetworkFabricSkusListResult.class);
        Assertions.assertEquals(990480911, model.value().get(0).maxComputeRacks());
        Assertions.assertEquals("kiscvwmzhwpl", model.nextLink());
    }
}
