// 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.models.KubernetesPluginType;
import com.azure.resourcemanager.networkcloud.models.L3NetworkAttachmentConfiguration;
import com.azure.resourcemanager.networkcloud.models.L3NetworkConfigurationIpamEnabled;
import org.junit.jupiter.api.Assertions;

public final class L3NetworkAttachmentConfigurationTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        L3NetworkAttachmentConfiguration model =
            BinaryData
                .fromString("{\"ipamEnabled\":\"True\",\"networkId\":\"dagxtibqd\",\"pluginType\":\"DPDK\"}")
                .toObject(L3NetworkAttachmentConfiguration.class);
        Assertions.assertEquals(L3NetworkConfigurationIpamEnabled.TRUE, model.ipamEnabled());
        Assertions.assertEquals("dagxtibqd", model.networkId());
        Assertions.assertEquals(KubernetesPluginType.DPDK, model.pluginType());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        L3NetworkAttachmentConfiguration model =
            new L3NetworkAttachmentConfiguration()
                .withIpamEnabled(L3NetworkConfigurationIpamEnabled.TRUE)
                .withNetworkId("dagxtibqd")
                .withPluginType(KubernetesPluginType.DPDK);
        model = BinaryData.fromObject(model).toObject(L3NetworkAttachmentConfiguration.class);
        Assertions.assertEquals(L3NetworkConfigurationIpamEnabled.TRUE, model.ipamEnabled());
        Assertions.assertEquals("dagxtibqd", model.networkId());
        Assertions.assertEquals(KubernetesPluginType.DPDK, model.pluginType());
    }
}
