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

package com.azure.resourcemanager.loadtesting.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.loadtesting.fluent.models.QuotaResourceInner;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public final class QuotaResourceInnerTests {
    @Test
    public void testDeserialize() throws Exception {
        QuotaResourceInner model =
            BinaryData
                .fromString(
                    "{\"properties\":{\"limit\":143848779,\"usage\":519347031,\"provisioningState\":\"Canceled\"},\"id\":\"jgrtfwvukxga\",\"name\":\"dcc\",\"type\":\"nhsjcnyej\"}")
                .toObject(QuotaResourceInner.class);
        Assertions.assertEquals(143848779, model.limit());
        Assertions.assertEquals(519347031, model.usage());
    }

    @Test
    public void testSerialize() throws Exception {
        QuotaResourceInner model = new QuotaResourceInner().withLimit(143848779).withUsage(519347031);
        model = BinaryData.fromObject(model).toObject(QuotaResourceInner.class);
        Assertions.assertEquals(143848779, model.limit());
        Assertions.assertEquals(519347031, model.usage());
    }
}
