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

public final class CustomerPolicyPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        CustomerPolicyProperties model =
            BinaryData.fromString("{\"viewCharges\":\"Allowed\"}").toObject(CustomerPolicyProperties.class);
        Assertions.assertEquals(ViewCharges.ALLOWED, model.viewCharges());
    }

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