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

package com.azure.resourcemanager.databox.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.databox.models.PackageCarrierDetails;
import org.junit.jupiter.api.Assertions;

public final class PackageCarrierDetailsTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        PackageCarrierDetails model =
            BinaryData
                .fromString(
                    "{\"carrierAccountNumber\":\"ofd\",\"carrierName\":\"uusdttouwa\",\"trackingId\":\"ekqvkeln\"}")
                .toObject(PackageCarrierDetails.class);
        Assertions.assertEquals("ofd", model.carrierAccountNumber());
        Assertions.assertEquals("uusdttouwa", model.carrierName());
        Assertions.assertEquals("ekqvkeln", model.trackingId());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        PackageCarrierDetails model =
            new PackageCarrierDetails()
                .withCarrierAccountNumber("ofd")
                .withCarrierName("uusdttouwa")
                .withTrackingId("ekqvkeln");
        model = BinaryData.fromObject(model).toObject(PackageCarrierDetails.class);
        Assertions.assertEquals("ofd", model.carrierAccountNumber());
        Assertions.assertEquals("uusdttouwa", model.carrierName());
        Assertions.assertEquals("ekqvkeln", model.trackingId());
    }
}
