// 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.SkuAvailability;
import org.junit.jupiter.api.Assertions;

public final class SkuAvailabilityTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        SkuAvailability model =
            BinaryData
                .fromString(
                    "{\"kind\":\"hjdauwhvylwz\",\"type\":\"dhxujznbmpo\",\"skuName\":\"wpr\",\"skuAvailable\":false,\"reason\":\"eualupjmkhf\",\"message\":\"bbcswsrtjri\"}")
                .toObject(SkuAvailability.class);
        Assertions.assertEquals("hjdauwhvylwz", model.kind());
        Assertions.assertEquals("dhxujznbmpo", model.type());
        Assertions.assertEquals("wpr", model.skuName());
        Assertions.assertEquals(false, model.skuAvailable());
        Assertions.assertEquals("eualupjmkhf", model.reason());
        Assertions.assertEquals("bbcswsrtjri", model.message());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        SkuAvailability model =
            new SkuAvailability()
                .withKind("hjdauwhvylwz")
                .withType("dhxujznbmpo")
                .withSkuName("wpr")
                .withSkuAvailable(false)
                .withReason("eualupjmkhf")
                .withMessage("bbcswsrtjri");
        model = BinaryData.fromObject(model).toObject(SkuAvailability.class);
        Assertions.assertEquals("hjdauwhvylwz", model.kind());
        Assertions.assertEquals("dhxujznbmpo", model.type());
        Assertions.assertEquals("wpr", model.skuName());
        Assertions.assertEquals(false, model.skuAvailable());
        Assertions.assertEquals("eualupjmkhf", model.reason());
        Assertions.assertEquals("bbcswsrtjri", model.message());
    }
}
