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

package com.azure.resourcemanager.subscription.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.subscription.models.PutAliasRequestProperties;
import com.azure.resourcemanager.subscription.models.Workload;
import org.junit.jupiter.api.Assertions;

public final class PutAliasRequestPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        PutAliasRequestProperties model =
            BinaryData
                .fromString(
                    "{\"displayName\":\"fidfvzw\",\"workload\":\"Production\",\"billingScope\":\"tymw\",\"subscriptionId\":\"dkfthwxmnt\",\"resellerId\":\"waopvkmijcmmxd\"}")
                .toObject(PutAliasRequestProperties.class);
        Assertions.assertEquals("fidfvzw", model.displayName());
        Assertions.assertEquals(Workload.PRODUCTION, model.workload());
        Assertions.assertEquals("tymw", model.billingScope());
        Assertions.assertEquals("dkfthwxmnt", model.subscriptionId());
        Assertions.assertEquals("waopvkmijcmmxd", model.resellerId());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        PutAliasRequestProperties model =
            new PutAliasRequestProperties()
                .withDisplayName("fidfvzw")
                .withWorkload(Workload.PRODUCTION)
                .withBillingScope("tymw")
                .withSubscriptionId("dkfthwxmnt")
                .withResellerId("waopvkmijcmmxd");
        model = BinaryData.fromObject(model).toObject(PutAliasRequestProperties.class);
        Assertions.assertEquals("fidfvzw", model.displayName());
        Assertions.assertEquals(Workload.PRODUCTION, model.workload());
        Assertions.assertEquals("tymw", model.billingScope());
        Assertions.assertEquals("dkfthwxmnt", model.subscriptionId());
        Assertions.assertEquals("waopvkmijcmmxd", model.resellerId());
    }
}
