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

package com.azure.resourcemanager.peering.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.peering.models.ContactDetail;
import com.azure.resourcemanager.peering.models.Role;
import org.junit.jupiter.api.Assertions;

public final class ContactDetailTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ContactDetail model =
            BinaryData
                .fromString("{\"role\":\"Technical\",\"email\":\"f\",\"phone\":\"otkftutqxlngx\"}")
                .toObject(ContactDetail.class);
        Assertions.assertEquals(Role.TECHNICAL, model.role());
        Assertions.assertEquals("f", model.email());
        Assertions.assertEquals("otkftutqxlngx", model.phone());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ContactDetail model = new ContactDetail().withRole(Role.TECHNICAL).withEmail("f").withPhone("otkftutqxlngx");
        model = BinaryData.fromObject(model).toObject(ContactDetail.class);
        Assertions.assertEquals(Role.TECHNICAL, model.role());
        Assertions.assertEquals("f", model.email());
        Assertions.assertEquals("otkftutqxlngx", model.phone());
    }
}
