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

package com.azure.resourcemanager.cognitiveservices.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.cognitiveservices.models.CheckSkuAvailabilityParameter;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class CheckSkuAvailabilityParameterTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        CheckSkuAvailabilityParameter model =
            BinaryData
                .fromString(
                    "{\"skus\":[\"uwbc\",\"nwbmeh\",\"seyvj\"],\"kind\":\"srtslhspkdeem\",\"type\":\"ofmxagkvtmelmqkr\"}")
                .toObject(CheckSkuAvailabilityParameter.class);
        Assertions.assertEquals("uwbc", model.skus().get(0));
        Assertions.assertEquals("srtslhspkdeem", model.kind());
        Assertions.assertEquals("ofmxagkvtmelmqkr", model.type());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        CheckSkuAvailabilityParameter model =
            new CheckSkuAvailabilityParameter()
                .withSkus(Arrays.asList("uwbc", "nwbmeh", "seyvj"))
                .withKind("srtslhspkdeem")
                .withType("ofmxagkvtmelmqkr");
        model = BinaryData.fromObject(model).toObject(CheckSkuAvailabilityParameter.class);
        Assertions.assertEquals("uwbc", model.skus().get(0));
        Assertions.assertEquals("srtslhspkdeem", model.kind());
        Assertions.assertEquals("ofmxagkvtmelmqkr", model.type());
    }
}
