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

package com.azure.resourcemanager.datadog.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.datadog.models.UserInfo;
import org.junit.jupiter.api.Assertions;

public final class UserInfoTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        UserInfo model =
            BinaryData
                .fromString("{\"name\":\"czsqpjhvm\",\"emailAddress\":\"jvnysounqe\",\"phoneNumber\":\"noae\"}")
                .toObject(UserInfo.class);
        Assertions.assertEquals("czsqpjhvm", model.name());
        Assertions.assertEquals("jvnysounqe", model.emailAddress());
        Assertions.assertEquals("noae", model.phoneNumber());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        UserInfo model = new UserInfo().withName("czsqpjhvm").withEmailAddress("jvnysounqe").withPhoneNumber("noae");
        model = BinaryData.fromObject(model).toObject(UserInfo.class);
        Assertions.assertEquals("czsqpjhvm", model.name());
        Assertions.assertEquals("jvnysounqe", model.emailAddress());
        Assertions.assertEquals("noae", model.phoneNumber());
    }
}
