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

package com.azure.resourcemanager.support.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.support.models.CheckNameAvailabilityInput;
import com.azure.resourcemanager.support.models.Type;
import org.junit.jupiter.api.Assertions;

public final class CheckNameAvailabilityInputTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        CheckNameAvailabilityInput model =
            BinaryData
                .fromString("{\"name\":\"nfygxgispemvtz\",\"type\":\"Microsoft.Support/supportTickets\"}")
                .toObject(CheckNameAvailabilityInput.class);
        Assertions.assertEquals("nfygxgispemvtz", model.name());
        Assertions.assertEquals(Type.MICROSOFT_SUPPORT_SUPPORT_TICKETS, model.type());
    }

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