// 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.fluent.models.CheckCapacityNameAvailabilityResultInner;
import org.junit.jupiter.api.Assertions;

public final class CheckCapacityNameAvailabilityResultInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        CheckCapacityNameAvailabilityResultInner model =
            BinaryData
                .fromString("{\"nameAvailable\":true,\"reason\":\"nysounqe\",\"message\":\"noae\"}")
                .toObject(CheckCapacityNameAvailabilityResultInner.class);
        Assertions.assertEquals(true, model.nameAvailable());
        Assertions.assertEquals("nysounqe", model.reason());
        Assertions.assertEquals("noae", model.message());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        CheckCapacityNameAvailabilityResultInner model =
            new CheckCapacityNameAvailabilityResultInner()
                .withNameAvailable(true)
                .withReason("nysounqe")
                .withMessage("noae");
        model = BinaryData.fromObject(model).toObject(CheckCapacityNameAvailabilityResultInner.class);
        Assertions.assertEquals(true, model.nameAvailable());
        Assertions.assertEquals("nysounqe", model.reason());
        Assertions.assertEquals("noae", model.message());
    }
}
