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

package com.azure.resourcemanager.powerbidedicated.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.powerbidedicated.models.CheckCapacityNameAvailabilityParameters;
import org.junit.jupiter.api.Assertions;

public final class CheckCapacityNameAvailabilityParametersTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        CheckCapacityNameAvailabilityParameters model =
            BinaryData
                .fromString("{\"name\":\"vxyqjpkcattpngjc\",\"type\":\"czsqpjhvm\"}")
                .toObject(CheckCapacityNameAvailabilityParameters.class);
        Assertions.assertEquals("vxyqjpkcattpngjc", model.name());
        Assertions.assertEquals("czsqpjhvm", model.type());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        CheckCapacityNameAvailabilityParameters model =
            new CheckCapacityNameAvailabilityParameters().withName("vxyqjpkcattpngjc").withType("czsqpjhvm");
        model = BinaryData.fromObject(model).toObject(CheckCapacityNameAvailabilityParameters.class);
        Assertions.assertEquals("vxyqjpkcattpngjc", model.name());
        Assertions.assertEquals("czsqpjhvm", model.type());
    }
}
