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

package com.azure.resourcemanager.imagebuilder.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.imagebuilder.models.PlatformImagePurchasePlan;
import org.junit.jupiter.api.Assertions;

public final class PlatformImagePurchasePlanTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        PlatformImagePurchasePlan model =
            BinaryData
                .fromString(
                    "{\"planName\":\"gnzscxaqwo\",\"planProduct\":\"chcbonqvpkvlrxnj\",\"planPublisher\":\"ase\"}")
                .toObject(PlatformImagePurchasePlan.class);
        Assertions.assertEquals("gnzscxaqwo", model.planName());
        Assertions.assertEquals("chcbonqvpkvlrxnj", model.planProduct());
        Assertions.assertEquals("ase", model.planPublisher());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        PlatformImagePurchasePlan model =
            new PlatformImagePurchasePlan()
                .withPlanName("gnzscxaqwo")
                .withPlanProduct("chcbonqvpkvlrxnj")
                .withPlanPublisher("ase");
        model = BinaryData.fromObject(model).toObject(PlatformImagePurchasePlan.class);
        Assertions.assertEquals("gnzscxaqwo", model.planName());
        Assertions.assertEquals("chcbonqvpkvlrxnj", model.planProduct());
        Assertions.assertEquals("ase", model.planPublisher());
    }
}
