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

package com.azure.resourcemanager.billing.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.billing.fluent.models.BillingSubscriptionInner;
import com.azure.resourcemanager.billing.models.BillingSubscriptionStatusType;
import org.junit.jupiter.api.Assertions;

public final class BillingSubscriptionInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        BillingSubscriptionInner model =
            BinaryData
                .fromString(
                    "{\"properties\":{\"displayName\":\"pvgqzcjrvxdjzlm\",\"subscriptionId\":\"2b1ddf07-345e-4104-89d5-47cf0f0744f9\",\"subscriptionBillingStatus\":\"Warning\",\"lastMonthCharges\":{\"currency\":\"gfhzovawjvzunlut\",\"value\":1.0469615},\"monthToDateCharges\":{\"currency\":\"nxipeil\",\"value\":42.357708},\"billingProfileId\":\"aejxd\",\"billingProfileDisplayName\":\"tskzbbtdzumveek\",\"costCenter\":\"wozuhkf\",\"customerId\":\"sjyofdx\",\"customerDisplayName\":\"us\",\"invoiceSectionId\":\"touwaboekqv\",\"invoiceSectionDisplayName\":\"lns\",\"reseller\":{\"resellerId\":\"xwyjsflhhc\",\"description\":\"lnjixisxya\"},\"skuId\":\"oyaqcslyjpkiid\",\"skuDescription\":\"exznelixhnr\",\"suspensionReasons\":[\"o\",\"hb\",\"xknalaulppg\"]},\"id\":\"dtpnapnyiropuhp\",\"name\":\"gvpgy\",\"type\":\"gqgitxmedjvcsl\"}")
                .toObject(BillingSubscriptionInner.class);
        Assertions.assertEquals(BillingSubscriptionStatusType.WARNING, model.subscriptionBillingStatus());
        Assertions.assertEquals("wozuhkf", model.costCenter());
        Assertions.assertEquals("oyaqcslyjpkiid", model.skuId());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        BillingSubscriptionInner model =
            new BillingSubscriptionInner()
                .withSubscriptionBillingStatus(BillingSubscriptionStatusType.WARNING)
                .withCostCenter("wozuhkf")
                .withSkuId("oyaqcslyjpkiid");
        model = BinaryData.fromObject(model).toObject(BillingSubscriptionInner.class);
        Assertions.assertEquals(BillingSubscriptionStatusType.WARNING, model.subscriptionBillingStatus());
        Assertions.assertEquals("wozuhkf", model.costCenter());
        Assertions.assertEquals("oyaqcslyjpkiid", model.skuId());
    }
}
