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

public final class PaymentPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        PaymentProperties model =
            BinaryData
                .fromString(
                    "{\"paymentType\":\"tvb\",\"amount\":{\"currency\":\"sfraoyzko\",\"value\":32.20966},\"date\":\"2021-01-01T04:06:13Z\",\"paymentMethodFamily\":\"None\",\"paymentMethodType\":\"xawqaldsyuuxim\"}")
                .toObject(PaymentProperties.class);
        Assertions.assertEquals(PaymentMethodFamily.NONE, model.paymentMethodFamily());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        PaymentProperties model = new PaymentProperties().withPaymentMethodFamily(PaymentMethodFamily.NONE);
        model = BinaryData.fromObject(model).toObject(PaymentProperties.class);
        Assertions.assertEquals(PaymentMethodFamily.NONE, model.paymentMethodFamily());
    }
}
