// 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.fluent.models.PeeringServiceLocationProperties;
import org.junit.jupiter.api.Assertions;

public final class PeeringServiceLocationPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        PeeringServiceLocationProperties model =
            BinaryData
                .fromString("{\"country\":\"ashsfwxos\",\"state\":\"z\",\"azureRegion\":\"ugicjooxdjebw\"}")
                .toObject(PeeringServiceLocationProperties.class);
        Assertions.assertEquals("ashsfwxos", model.country());
        Assertions.assertEquals("z", model.state());
        Assertions.assertEquals("ugicjooxdjebw", model.azureRegion());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        PeeringServiceLocationProperties model =
            new PeeringServiceLocationProperties()
                .withCountry("ashsfwxos")
                .withState("z")
                .withAzureRegion("ugicjooxdjebw");
        model = BinaryData.fromObject(model).toObject(PeeringServiceLocationProperties.class);
        Assertions.assertEquals("ashsfwxos", model.country());
        Assertions.assertEquals("z", model.state());
        Assertions.assertEquals("ugicjooxdjebw", model.azureRegion());
    }
}
