// 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.NetworkDeviceSkuInner;
import com.azure.resourcemanager.managednetworkfabric.models.NetworkDeviceSkusListResult;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class NetworkDeviceSkusListResultTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        NetworkDeviceSkusListResult model =
            BinaryData
                .fromString(
                    "{\"value\":[{\"properties\":{\"model\":\"vtgsei\",\"manufacturer\":\"fiufx\",\"supportedVersions\":[],\"supportedRoleTypes\":[],\"interfaces\":[],\"provisioningState\":\"Canceled\"},\"id\":\"epttwqmsniff\",\"name\":\"dmqnrojlpij\",\"type\":\"k\"}],\"nextLink\":\"frddhcrati\"}")
                .toObject(NetworkDeviceSkusListResult.class);
        Assertions.assertEquals("vtgsei", model.value().get(0).model());
        Assertions.assertEquals("fiufx", model.value().get(0).manufacturer());
        Assertions.assertEquals("frddhcrati", model.nextLink());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        NetworkDeviceSkusListResult model =
            new NetworkDeviceSkusListResult()
                .withValue(
                    Arrays
                        .asList(
                            new NetworkDeviceSkuInner()
                                .withModel("vtgsei")
                                .withManufacturer("fiufx")
                                .withSupportedVersions(Arrays.asList())
                                .withSupportedRoleTypes(Arrays.asList())
                                .withInterfaces(Arrays.asList())))
                .withNextLink("frddhcrati");
        model = BinaryData.fromObject(model).toObject(NetworkDeviceSkusListResult.class);
        Assertions.assertEquals("vtgsei", model.value().get(0).model());
        Assertions.assertEquals("fiufx", model.value().get(0).manufacturer());
        Assertions.assertEquals("frddhcrati", model.nextLink());
    }
}
