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

package com.azure.resourcemanager.storageimportexport.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.storageimportexport.models.DeliveryPackageInformation;
import org.junit.jupiter.api.Assertions;

public final class DeliveryPackageInformationTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        DeliveryPackageInformation model =
            BinaryData
                .fromString(
                    "{\"carrierName\":\"oosflnr\",\"trackingNumber\":\"sfqpteehz\",\"driveCount\":3146188146427506829,\"shipDate\":\"qrimzinpv\"}")
                .toObject(DeliveryPackageInformation.class);
        Assertions.assertEquals("oosflnr", model.carrierName());
        Assertions.assertEquals("sfqpteehz", model.trackingNumber());
        Assertions.assertEquals(3146188146427506829L, model.driveCount());
        Assertions.assertEquals("qrimzinpv", model.shipDate());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        DeliveryPackageInformation model =
            new DeliveryPackageInformation()
                .withCarrierName("oosflnr")
                .withTrackingNumber("sfqpteehz")
                .withDriveCount(3146188146427506829L)
                .withShipDate("qrimzinpv");
        model = BinaryData.fromObject(model).toObject(DeliveryPackageInformation.class);
        Assertions.assertEquals("oosflnr", model.carrierName());
        Assertions.assertEquals("sfqpteehz", model.trackingNumber());
        Assertions.assertEquals(3146188146427506829L, model.driveCount());
        Assertions.assertEquals("qrimzinpv", model.shipDate());
    }
}
