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

package com.azure.resourcemanager.hybridcompute.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.hybridcompute.models.LocationData;
import org.junit.jupiter.api.Assertions;

public final class LocationDataTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        LocationData model =
            BinaryData
                .fromString(
                    "{\"name\":\"ekuksjtx\",\"city\":\"cdm\",\"district\":\"rcryuanzwuxzdxta\",\"countryOrRegion\":\"lhmwhfpmrqobm\"}")
                .toObject(LocationData.class);
        Assertions.assertEquals("ekuksjtx", model.name());
        Assertions.assertEquals("cdm", model.city());
        Assertions.assertEquals("rcryuanzwuxzdxta", model.district());
        Assertions.assertEquals("lhmwhfpmrqobm", model.countryOrRegion());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        LocationData model =
            new LocationData()
                .withName("ekuksjtx")
                .withCity("cdm")
                .withDistrict("rcryuanzwuxzdxta")
                .withCountryOrRegion("lhmwhfpmrqobm");
        model = BinaryData.fromObject(model).toObject(LocationData.class);
        Assertions.assertEquals("ekuksjtx", model.name());
        Assertions.assertEquals("cdm", model.city());
        Assertions.assertEquals("rcryuanzwuxzdxta", model.district());
        Assertions.assertEquals("lhmwhfpmrqobm", model.countryOrRegion());
    }
}
