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

public final class L2IsolationDomainPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        L2IsolationDomainProperties model =
            BinaryData
                .fromString(
                    "{\"networkFabricId\":\"wkgshwa\",\"vlanId\":595861111,\"mtu\":691407592,\"disabledOnResources\":[\"injep\"],\"administrativeState\":\"Enabled\",\"provisioningState\":\"Failed\",\"annotation\":\"wnuzoqftiyqzrnkc\"}")
                .toObject(L2IsolationDomainProperties.class);
        Assertions.assertEquals("wnuzoqftiyqzrnkc", model.annotation());
        Assertions.assertEquals("wkgshwa", model.networkFabricId());
        Assertions.assertEquals(595861111, model.vlanId());
        Assertions.assertEquals(691407592, model.mtu());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        L2IsolationDomainProperties model =
            new L2IsolationDomainProperties()
                .withAnnotation("wnuzoqftiyqzrnkc")
                .withNetworkFabricId("wkgshwa")
                .withVlanId(595861111)
                .withMtu(691407592);
        model = BinaryData.fromObject(model).toObject(L2IsolationDomainProperties.class);
        Assertions.assertEquals("wnuzoqftiyqzrnkc", model.annotation());
        Assertions.assertEquals("wkgshwa", model.networkFabricId());
        Assertions.assertEquals(595861111, model.vlanId());
        Assertions.assertEquals(691407592, model.mtu());
    }
}
