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

package com.azure.resourcemanager.signalr.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.signalr.models.ResourceSku;
import com.azure.resourcemanager.signalr.models.SignalRSkuTier;
import org.junit.jupiter.api.Assertions;

public final class ResourceSkuTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ResourceSku model =
            BinaryData
                .fromString(
                    "{\"name\":\"burvjxxjnspy\",\"tier\":\"Free\",\"size\":\"oenkouknvudwti\",\"family\":\"bldngkpoc\",\"capacity\":523665642}")
                .toObject(ResourceSku.class);
        Assertions.assertEquals("burvjxxjnspy", model.name());
        Assertions.assertEquals(SignalRSkuTier.FREE, model.tier());
        Assertions.assertEquals(523665642, model.capacity());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ResourceSku model =
            new ResourceSku().withName("burvjxxjnspy").withTier(SignalRSkuTier.FREE).withCapacity(523665642);
        model = BinaryData.fromObject(model).toObject(ResourceSku.class);
        Assertions.assertEquals("burvjxxjnspy", model.name());
        Assertions.assertEquals(SignalRSkuTier.FREE, model.tier());
        Assertions.assertEquals(523665642, model.capacity());
    }
}
