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

package com.azure.resourcemanager.frontdoor.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.frontdoor.models.TimeseriesDataPoint;
import org.junit.jupiter.api.Assertions;

public final class TimeseriesDataPointTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        TimeseriesDataPoint model =
            BinaryData.fromString("{\"dateTimeUTC\":\"mmji\",\"value\":34.513016}").toObject(TimeseriesDataPoint.class);
        Assertions.assertEquals("mmji", model.dateTimeUtc());
        Assertions.assertEquals(34.513016F, model.value());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        TimeseriesDataPoint model = new TimeseriesDataPoint().withDateTimeUtc("mmji").withValue(34.513016F);
        model = BinaryData.fromObject(model).toObject(TimeseriesDataPoint.class);
        Assertions.assertEquals("mmji", model.dateTimeUtc());
        Assertions.assertEquals(34.513016F, model.value());
    }
}
