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

package com.azure.resourcemanager.managednetworkfabric.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.managednetworkfabric.models.DeviceLimits;
import org.junit.jupiter.api.Assertions;

public final class DeviceLimitsTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        DeviceLimits model =
            BinaryData
                .fromString(
                    "{\"physicalInterfaceCount\":1240689127,\"maxSubInterfaces\":320221155,\"maxTunnelInterfaces\":156092628,\"maxVirtualRouterFunctions\":1511616464,\"maxBorderGatewayProtocolPeers\":287041746,\"maxBidirectionalForwardingDetectionPeers\":1202424668}")
                .toObject(DeviceLimits.class);
        Assertions.assertEquals(1240689127, model.physicalInterfaceCount());
        Assertions.assertEquals(320221155, model.maxSubInterfaces());
        Assertions.assertEquals(156092628, model.maxTunnelInterfaces());
        Assertions.assertEquals(1511616464, model.maxVirtualRouterFunctions());
        Assertions.assertEquals(287041746, model.maxBorderGatewayProtocolPeers());
        Assertions.assertEquals(1202424668, model.maxBidirectionalForwardingDetectionPeers());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        DeviceLimits model =
            new DeviceLimits()
                .withPhysicalInterfaceCount(1240689127)
                .withMaxSubInterfaces(320221155)
                .withMaxTunnelInterfaces(156092628)
                .withMaxVirtualRouterFunctions(1511616464)
                .withMaxBorderGatewayProtocolPeers(287041746)
                .withMaxBidirectionalForwardingDetectionPeers(1202424668);
        model = BinaryData.fromObject(model).toObject(DeviceLimits.class);
        Assertions.assertEquals(1240689127, model.physicalInterfaceCount());
        Assertions.assertEquals(320221155, model.maxSubInterfaces());
        Assertions.assertEquals(156092628, model.maxTunnelInterfaces());
        Assertions.assertEquals(1511616464, model.maxVirtualRouterFunctions());
        Assertions.assertEquals(287041746, model.maxBorderGatewayProtocolPeers());
        Assertions.assertEquals(1202424668, model.maxBidirectionalForwardingDetectionPeers());
    }
}
