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

package com.azure.resourcemanager.workloads.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.workloads.fluent.models.SapSupportedResourceSkusResultInner;
import com.azure.resourcemanager.workloads.models.SapSupportedSku;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class SapSupportedResourceSkusResultInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        SapSupportedResourceSkusResultInner model =
            BinaryData
                .fromString(
                    "{\"supportedSkus\":[{\"vmSku\":\"ejhphoyc\",\"isAppServerCertified\":true,\"isDatabaseCertified\":true}]}")
                .toObject(SapSupportedResourceSkusResultInner.class);
        Assertions.assertEquals("ejhphoyc", model.supportedSkus().get(0).vmSku());
        Assertions.assertEquals(true, model.supportedSkus().get(0).isAppServerCertified());
        Assertions.assertEquals(true, model.supportedSkus().get(0).isDatabaseCertified());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        SapSupportedResourceSkusResultInner model =
            new SapSupportedResourceSkusResultInner()
                .withSupportedSkus(
                    Arrays
                        .asList(
                            new SapSupportedSku()
                                .withVmSku("ejhphoyc")
                                .withIsAppServerCertified(true)
                                .withIsDatabaseCertified(true)));
        model = BinaryData.fromObject(model).toObject(SapSupportedResourceSkusResultInner.class);
        Assertions.assertEquals("ejhphoyc", model.supportedSkus().get(0).vmSku());
        Assertions.assertEquals(true, model.supportedSkus().get(0).isAppServerCertified());
        Assertions.assertEquals(true, model.supportedSkus().get(0).isDatabaseCertified());
    }
}
