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

package com.azure.resourcemanager.iotfirmwaredefense.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.iotfirmwaredefense.fluent.models.FirmwareSummaryInner;
import org.junit.jupiter.api.Assertions;

public final class FirmwareSummaryInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        FirmwareSummaryInner model =
            BinaryData
                .fromString(
                    "{\"extractedSize\":2192126563466196128,\"fileSize\":1776439872109058737,\"extractedFileCount\":5524797481405641879,\"componentCount\":6443293507210712059,\"binaryCount\":3252772488790490647,\"analysisTimeSeconds\":8622826594592540845,\"rootFileSystems\":2343470507309759072}")
                .toObject(FirmwareSummaryInner.class);
        Assertions.assertEquals(2192126563466196128L, model.extractedSize());
        Assertions.assertEquals(1776439872109058737L, model.fileSize());
        Assertions.assertEquals(5524797481405641879L, model.extractedFileCount());
        Assertions.assertEquals(6443293507210712059L, model.componentCount());
        Assertions.assertEquals(3252772488790490647L, model.binaryCount());
        Assertions.assertEquals(8622826594592540845L, model.analysisTimeSeconds());
        Assertions.assertEquals(2343470507309759072L, model.rootFileSystems());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        FirmwareSummaryInner model =
            new FirmwareSummaryInner()
                .withExtractedSize(2192126563466196128L)
                .withFileSize(1776439872109058737L)
                .withExtractedFileCount(5524797481405641879L)
                .withComponentCount(6443293507210712059L)
                .withBinaryCount(3252772488790490647L)
                .withAnalysisTimeSeconds(8622826594592540845L)
                .withRootFileSystems(2343470507309759072L);
        model = BinaryData.fromObject(model).toObject(FirmwareSummaryInner.class);
        Assertions.assertEquals(2192126563466196128L, model.extractedSize());
        Assertions.assertEquals(1776439872109058737L, model.fileSize());
        Assertions.assertEquals(5524797481405641879L, model.extractedFileCount());
        Assertions.assertEquals(6443293507210712059L, model.componentCount());
        Assertions.assertEquals(3252772488790490647L, model.binaryCount());
        Assertions.assertEquals(8622826594592540845L, model.analysisTimeSeconds());
        Assertions.assertEquals(2343470507309759072L, model.rootFileSystems());
    }
}
