// 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.CustomerPolicyInner;
import com.azure.resourcemanager.billing.models.ViewCharges;
import org.junit.jupiter.api.Assertions;

public final class CustomerPolicyInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        CustomerPolicyInner model =
            BinaryData
                .fromString(
                    "{\"properties\":{\"viewCharges\":\"Allowed\"},\"id\":\"blmhvkzuhb\",\"name\":\"vvyhg\",\"type\":\"opbyrqufegxu\"}")
                .toObject(CustomerPolicyInner.class);
        Assertions.assertEquals(ViewCharges.ALLOWED, model.viewCharges());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        CustomerPolicyInner model = new CustomerPolicyInner().withViewCharges(ViewCharges.ALLOWED);
        model = BinaryData.fromObject(model).toObject(CustomerPolicyInner.class);
        Assertions.assertEquals(ViewCharges.ALLOWED, model.viewCharges());
    }
}
