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

package com.azure.resourcemanager.storagemover.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.storagemover.models.NfsMountEndpointProperties;
import com.azure.resourcemanager.storagemover.models.NfsVersion;
import org.junit.jupiter.api.Assertions;

public final class NfsMountEndpointPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        NfsMountEndpointProperties model =
            BinaryData
                .fromString(
                    "{\"endpointType\":\"NfsMount\",\"host\":\"mjmvxieduugidyjr\",\"nfsVersion\":\"NFSv4\",\"export\":\"y\",\"description\":\"svexcsonpclhoco\",\"provisioningState\":\"Succeeded\"}")
                .toObject(NfsMountEndpointProperties.class);
        Assertions.assertEquals("svexcsonpclhoco", model.description());
        Assertions.assertEquals("mjmvxieduugidyjr", model.host());
        Assertions.assertEquals(NfsVersion.NFSV4, model.nfsVersion());
        Assertions.assertEquals("y", model.export());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        NfsMountEndpointProperties model =
            new NfsMountEndpointProperties()
                .withDescription("svexcsonpclhoco")
                .withHost("mjmvxieduugidyjr")
                .withNfsVersion(NfsVersion.NFSV4)
                .withExport("y");
        model = BinaryData.fromObject(model).toObject(NfsMountEndpointProperties.class);
        Assertions.assertEquals("svexcsonpclhoco", model.description());
        Assertions.assertEquals("mjmvxieduugidyjr", model.host());
        Assertions.assertEquals(NfsVersion.NFSV4, model.nfsVersion());
        Assertions.assertEquals("y", model.export());
    }
}
