// 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.PackageInformation;
import org.junit.jupiter.api.Assertions;

public final class PackageInformationTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        PackageInformation model =
            BinaryData
                .fromString(
                    "{\"carrierName\":\"wjdk\",\"trackingNumber\":\"rsoodqxhcrmnoh\",\"driveCount\":243849771955715342,\"shipDate\":\"kwh\"}")
                .toObject(PackageInformation.class);
        Assertions.assertEquals("wjdk", model.carrierName());
        Assertions.assertEquals("rsoodqxhcrmnoh", model.trackingNumber());
        Assertions.assertEquals(243849771955715342L, model.driveCount());
        Assertions.assertEquals("kwh", model.shipDate());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        PackageInformation model =
            new PackageInformation()
                .withCarrierName("wjdk")
                .withTrackingNumber("rsoodqxhcrmnoh")
                .withDriveCount(243849771955715342L)
                .withShipDate("kwh");
        model = BinaryData.fromObject(model).toObject(PackageInformation.class);
        Assertions.assertEquals("wjdk", model.carrierName());
        Assertions.assertEquals("rsoodqxhcrmnoh", model.trackingNumber());
        Assertions.assertEquals(243849771955715342L, model.driveCount());
        Assertions.assertEquals("kwh", model.shipDate());
    }
}
