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

package com.azure.resourcemanager.networkcloud.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.networkcloud.fluent.models.L2NetworkProperties;
import com.azure.resourcemanager.networkcloud.models.HybridAksPluginType;
import org.junit.jupiter.api.Assertions;

public final class L2NetworkPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        L2NetworkProperties model =
            BinaryData
                .fromString(
                    "{\"associatedResourceIds\":[\"ciqopidoa\"],\"clusterId\":\"iodhkhazxkhnz\",\"detailedStatus\":\"Available\",\"detailedStatusMessage\":\"wntoegokdwbwh\",\"hybridAksClustersAssociatedIds\":[\"zcmrvexztvb\"],\"hybridAksPluginType\":\"DPDK\",\"interfaceName\":\"frao\",\"l2IsolationDomainId\":\"zkoowtlmnguxawqa\",\"provisioningState\":\"Canceled\",\"virtualMachinesAssociatedIds\":[\"uximerqfobw\",\"znkbykutwpfhpagm\"]}")
                .toObject(L2NetworkProperties.class);
        Assertions.assertEquals(HybridAksPluginType.DPDK, model.hybridAksPluginType());
        Assertions.assertEquals("frao", model.interfaceName());
        Assertions.assertEquals("zkoowtlmnguxawqa", model.l2IsolationDomainId());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        L2NetworkProperties model =
            new L2NetworkProperties()
                .withHybridAksPluginType(HybridAksPluginType.DPDK)
                .withInterfaceName("frao")
                .withL2IsolationDomainId("zkoowtlmnguxawqa");
        model = BinaryData.fromObject(model).toObject(L2NetworkProperties.class);
        Assertions.assertEquals(HybridAksPluginType.DPDK, model.hybridAksPluginType());
        Assertions.assertEquals("frao", model.interfaceName());
        Assertions.assertEquals("zkoowtlmnguxawqa", model.l2IsolationDomainId());
    }
}
