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

package com.azure.resourcemanager.orbital.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.orbital.models.AvailableGroundStationPropertiesAutoGenerated;
import com.azure.resourcemanager.orbital.models.ReleaseMode;
import org.junit.jupiter.api.Assertions;

public final class AvailableGroundStationPropertiesAutoGeneratedTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        AvailableGroundStationPropertiesAutoGenerated model =
            BinaryData
                .fromString(
                    "{\"city\":\"cocmnyyaztt\",\"providerName\":\"wwrq\",\"longitudeDegrees\":92.70088,\"latitudeDegrees\":88.20154,\"altitudeMeters\":37.69288,\"releaseMode\":\"GA\"}")
                .toObject(AvailableGroundStationPropertiesAutoGenerated.class);
        Assertions.assertEquals("cocmnyyaztt", model.city());
        Assertions.assertEquals("wwrq", model.providerName());
        Assertions.assertEquals(92.70088F, model.longitudeDegrees());
        Assertions.assertEquals(88.20154F, model.latitudeDegrees());
        Assertions.assertEquals(37.69288F, model.altitudeMeters());
        Assertions.assertEquals(ReleaseMode.GA, model.releaseMode());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        AvailableGroundStationPropertiesAutoGenerated model =
            new AvailableGroundStationPropertiesAutoGenerated()
                .withCity("cocmnyyaztt")
                .withProviderName("wwrq")
                .withLongitudeDegrees(92.70088F)
                .withLatitudeDegrees(88.20154F)
                .withAltitudeMeters(37.69288F)
                .withReleaseMode(ReleaseMode.GA);
        model = BinaryData.fromObject(model).toObject(AvailableGroundStationPropertiesAutoGenerated.class);
        Assertions.assertEquals("cocmnyyaztt", model.city());
        Assertions.assertEquals("wwrq", model.providerName());
        Assertions.assertEquals(92.70088F, model.longitudeDegrees());
        Assertions.assertEquals(88.20154F, model.latitudeDegrees());
        Assertions.assertEquals(37.69288F, model.altitudeMeters());
        Assertions.assertEquals(ReleaseMode.GA, model.releaseMode());
    }
}
