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

package com.azure.resourcemanager.voiceservices.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.voiceservices.fluent.models.TestLineProperties;
import com.azure.resourcemanager.voiceservices.models.TestLinePurpose;
import org.junit.jupiter.api.Assertions;

public final class TestLinePropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        TestLineProperties model =
            BinaryData
                .fromString("{\"provisioningState\":\"Failed\",\"phoneNumber\":\"gcue\",\"purpose\":\"Automated\"}")
                .toObject(TestLineProperties.class);
        Assertions.assertEquals("gcue", model.phoneNumber());
        Assertions.assertEquals(TestLinePurpose.AUTOMATED, model.purpose());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        TestLineProperties model =
            new TestLineProperties().withPhoneNumber("gcue").withPurpose(TestLinePurpose.AUTOMATED);
        model = BinaryData.fromObject(model).toObject(TestLineProperties.class);
        Assertions.assertEquals("gcue", model.phoneNumber());
        Assertions.assertEquals(TestLinePurpose.AUTOMATED, model.purpose());
    }
}
