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

package com.azure.resourcemanager.qumulo.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.qumulo.models.MarketplaceDetails;
import org.junit.jupiter.api.Assertions;

public final class MarketplaceDetailsTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        MarketplaceDetails model =
            BinaryData
                .fromString(
                    "{\"marketplaceSubscriptionId\":\"lxaolthqtrgqjbp\",\"planId\":\"zfsinzgvf\",\"offerId\":\"jrwzox\",\"publisherId\":\"j\",\"marketplaceSubscriptionStatus\":\"Suspended\"}")
                .toObject(MarketplaceDetails.class);
        Assertions.assertEquals("lxaolthqtrgqjbp", model.marketplaceSubscriptionId());
        Assertions.assertEquals("zfsinzgvf", model.planId());
        Assertions.assertEquals("jrwzox", model.offerId());
        Assertions.assertEquals("j", model.publisherId());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        MarketplaceDetails model =
            new MarketplaceDetails()
                .withMarketplaceSubscriptionId("lxaolthqtrgqjbp")
                .withPlanId("zfsinzgvf")
                .withOfferId("jrwzox")
                .withPublisherId("j");
        model = BinaryData.fromObject(model).toObject(MarketplaceDetails.class);
        Assertions.assertEquals("lxaolthqtrgqjbp", model.marketplaceSubscriptionId());
        Assertions.assertEquals("zfsinzgvf", model.planId());
        Assertions.assertEquals("jrwzox", model.offerId());
        Assertions.assertEquals("j", model.publisherId());
    }
}
