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

package com.azure.resourcemanager.datamigration.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.datamigration.models.OrphanedUserInfo;
import org.junit.jupiter.api.Assertions;

public final class OrphanedUserInfoTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        OrphanedUserInfo model =
            BinaryData
                .fromString("{\"name\":\"xibxujwbhqwalm\",\"databaseName\":\"yoxa\"}")
                .toObject(OrphanedUserInfo.class);
        Assertions.assertEquals("xibxujwbhqwalm", model.name());
        Assertions.assertEquals("yoxa", model.databaseName());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        OrphanedUserInfo model = new OrphanedUserInfo().withName("xibxujwbhqwalm").withDatabaseName("yoxa");
        model = BinaryData.fromObject(model).toObject(OrphanedUserInfo.class);
        Assertions.assertEquals("xibxujwbhqwalm", model.name());
        Assertions.assertEquals("yoxa", model.databaseName());
    }
}
