// 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.fluent.models.SkuOverviewInner;
import com.azure.resourcemanager.hybridnetwork.models.NetworkFunctionSkuListResult;
import com.azure.resourcemanager.hybridnetwork.models.SkuType;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public final class NetworkFunctionSkuListResultTests {
    @Test
    public void testDeserialize() {
        NetworkFunctionSkuListResult model =
            BinaryData
                .fromString(
                    "{\"value\":[{\"skuName\":\"ofoskghs\",\"skuType\":\"EvolvedPacketCore\"}],\"nextLink\":\"mjmvxieduugidyjr\"}")
                .toObject(NetworkFunctionSkuListResult.class);
        Assertions.assertEquals("ofoskghs", model.value().get(0).skuName());
        Assertions.assertEquals(SkuType.EVOLVED_PACKET_CORE, model.value().get(0).skuType());
    }

    @Test
    public void testSerialize() {
        NetworkFunctionSkuListResult model =
            new NetworkFunctionSkuListResult()
                .withValue(
                    Arrays
                        .asList(
                            new SkuOverviewInner().withSkuName("ofoskghs").withSkuType(SkuType.EVOLVED_PACKET_CORE)));
        model = BinaryData.fromObject(model).toObject(NetworkFunctionSkuListResult.class);
        Assertions.assertEquals("ofoskghs", model.value().get(0).skuName());
        Assertions.assertEquals(SkuType.EVOLVED_PACKET_CORE, model.value().get(0).skuType());
    }
}
