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

package com.azure.resourcemanager.recoveryservices.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.recoveryservices.fluent.models.CheckNameAvailabilityResultInner;
import org.junit.jupiter.api.Assertions;

public final class CheckNameAvailabilityResultInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        CheckNameAvailabilityResultInner model =
            BinaryData
                .fromString("{\"nameAvailable\":false,\"reason\":\"zakljlahbc\",\"message\":\"ffdfdosygexpa\"}")
                .toObject(CheckNameAvailabilityResultInner.class);
        Assertions.assertEquals(false, model.nameAvailable());
        Assertions.assertEquals("zakljlahbc", model.reason());
        Assertions.assertEquals("ffdfdosygexpa", model.message());
    }

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