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

public final class GetDynamicInterfaceMapsPropertiesItemInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        GetDynamicInterfaceMapsPropertiesItemInner model =
            BinaryData
                .fromString(
                    "{\"name\":\"ismsksbpimlqolj\",\"administrativeState\":\"Enabled\",\"operationalStatus\":\"xxlxsffgcvizq\",\"phyStatus\":\"wlvwlyoupf\",\"transceiverStatus\":\"bkjubdyhgkfmins\",\"connectedTo\":\"wzf\"}")
                .toObject(GetDynamicInterfaceMapsPropertiesItemInner.class);
        Assertions.assertEquals("xxlxsffgcvizq", model.operationalStatus());
        Assertions.assertEquals("wlvwlyoupf", model.phyStatus());
        Assertions.assertEquals("bkjubdyhgkfmins", model.transceiverStatus());
        Assertions.assertEquals("wzf", model.connectedTo());
        Assertions.assertEquals("ismsksbpimlqolj", model.name());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        GetDynamicInterfaceMapsPropertiesItemInner model =
            new GetDynamicInterfaceMapsPropertiesItemInner()
                .withOperationalStatus("xxlxsffgcvizq")
                .withPhyStatus("wlvwlyoupf")
                .withTransceiverStatus("bkjubdyhgkfmins")
                .withConnectedTo("wzf")
                .withName("ismsksbpimlqolj");
        model = BinaryData.fromObject(model).toObject(GetDynamicInterfaceMapsPropertiesItemInner.class);
        Assertions.assertEquals("xxlxsffgcvizq", model.operationalStatus());
        Assertions.assertEquals("wlvwlyoupf", model.phyStatus());
        Assertions.assertEquals("bkjubdyhgkfmins", model.transceiverStatus());
        Assertions.assertEquals("wzf", model.connectedTo());
        Assertions.assertEquals("ismsksbpimlqolj", model.name());
    }
}
