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

package com.azure.resourcemanager.datamigration.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.datamigration.models.ServiceSku;
import org.junit.jupiter.api.Assertions;

public final class ServiceSkuTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ServiceSku model =
            BinaryData
                .fromString(
                    "{\"name\":\"zdzevndh\",\"tier\":\"wpdappdsbdkv\",\"family\":\"wjfeusnhutjel\",\"size\":\"rl\",\"capacity\":2022069390}")
                .toObject(ServiceSku.class);
        Assertions.assertEquals("zdzevndh", model.name());
        Assertions.assertEquals("wpdappdsbdkv", model.tier());
        Assertions.assertEquals("wjfeusnhutjel", model.family());
        Assertions.assertEquals("rl", model.size());
        Assertions.assertEquals(2022069390, model.capacity());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ServiceSku model =
            new ServiceSku()
                .withName("zdzevndh")
                .withTier("wpdappdsbdkv")
                .withFamily("wjfeusnhutjel")
                .withSize("rl")
                .withCapacity(2022069390);
        model = BinaryData.fromObject(model).toObject(ServiceSku.class);
        Assertions.assertEquals("zdzevndh", model.name());
        Assertions.assertEquals("wpdappdsbdkv", model.tier());
        Assertions.assertEquals("wjfeusnhutjel", model.family());
        Assertions.assertEquals("rl", model.size());
        Assertions.assertEquals(2022069390, model.capacity());
    }
}
