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

package com.azure.resourcemanager.timeseriesinsights.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.timeseriesinsights.models.PropertyType;
import com.azure.resourcemanager.timeseriesinsights.models.TimeSeriesIdProperty;
import org.junit.jupiter.api.Assertions;

public final class TimeSeriesIdPropertyTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        TimeSeriesIdProperty model =
            BinaryData
                .fromString("{\"name\":\"tgzfbishcbkh\",\"type\":\"String\"}")
                .toObject(TimeSeriesIdProperty.class);
        Assertions.assertEquals("tgzfbishcbkh", model.name());
        Assertions.assertEquals(PropertyType.STRING, model.type());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        TimeSeriesIdProperty model = new TimeSeriesIdProperty().withName("tgzfbishcbkh").withType(PropertyType.STRING);
        model = BinaryData.fromObject(model).toObject(TimeSeriesIdProperty.class);
        Assertions.assertEquals("tgzfbishcbkh", model.name());
        Assertions.assertEquals(PropertyType.STRING, model.type());
    }
}
