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

public final class PeeringServiceLocationInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        PeeringServiceLocationInner model =
            BinaryData
                .fromString(
                    "{\"properties\":{\"country\":\"r\",\"state\":\"xpvgo\",\"azureRegion\":\"lf\"},\"id\":\"isgwbnbbeldawkz\",\"name\":\"ali\",\"type\":\"urqhaka\"}")
                .toObject(PeeringServiceLocationInner.class);
        Assertions.assertEquals("r", model.country());
        Assertions.assertEquals("xpvgo", model.state());
        Assertions.assertEquals("lf", model.azureRegion());
    }

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