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

package com.azure.resourcemanager.databoxedge.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.databoxedge.models.TrackingInfo;
import org.junit.jupiter.api.Assertions;

public final class TrackingInfoTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        TrackingInfo model =
            BinaryData
                .fromString(
                    "{\"serialNumber\":\"qgitxmed\",\"carrierName\":\"c\",\"trackingId\":\"ynqwwncwzzhxgk\",\"trackingUrl\":\"mgucna\"}")
                .toObject(TrackingInfo.class);
        Assertions.assertEquals("qgitxmed", model.serialNumber());
        Assertions.assertEquals("c", model.carrierName());
        Assertions.assertEquals("ynqwwncwzzhxgk", model.trackingId());
        Assertions.assertEquals("mgucna", model.trackingUrl());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        TrackingInfo model =
            new TrackingInfo()
                .withSerialNumber("qgitxmed")
                .withCarrierName("c")
                .withTrackingId("ynqwwncwzzhxgk")
                .withTrackingUrl("mgucna");
        model = BinaryData.fromObject(model).toObject(TrackingInfo.class);
        Assertions.assertEquals("qgitxmed", model.serialNumber());
        Assertions.assertEquals("c", model.carrierName());
        Assertions.assertEquals("ynqwwncwzzhxgk", model.trackingId());
        Assertions.assertEquals("mgucna", model.trackingUrl());
    }
}
