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

public final class GetStaticInterfaceMapsPropertiesItemInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        GetStaticInterfaceMapsPropertiesItemInner model =
            BinaryData
                .fromString(
                    "{\"name\":\"b\",\"description\":\"rilbywdx\",\"identifier\":\"icc\",\"interfaceType\":\"wfscjfn\",\"connectorType\":\"szqujizdvoq\",\"connectedTo\":\"ibyowbblgyavutp\",\"speed\":38.259933,\"channelGroupId\":12.625467}")
                .toObject(GetStaticInterfaceMapsPropertiesItemInner.class);
        Assertions.assertEquals("b", model.name());
        Assertions.assertEquals("rilbywdx", model.description());
        Assertions.assertEquals("icc", model.identifier());
        Assertions.assertEquals("wfscjfn", model.interfaceType());
        Assertions.assertEquals("szqujizdvoq", model.connectorType());
        Assertions.assertEquals("ibyowbblgyavutp", model.connectedTo());
        Assertions.assertEquals(38.259933F, model.speed());
        Assertions.assertEquals(12.625467F, model.channelGroupId());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        GetStaticInterfaceMapsPropertiesItemInner model =
            new GetStaticInterfaceMapsPropertiesItemInner()
                .withName("b")
                .withDescription("rilbywdx")
                .withIdentifier("icc")
                .withInterfaceType("wfscjfn")
                .withConnectorType("szqujizdvoq")
                .withConnectedTo("ibyowbblgyavutp")
                .withSpeed(38.259933F)
                .withChannelGroupId(12.625467F);
        model = BinaryData.fromObject(model).toObject(GetStaticInterfaceMapsPropertiesItemInner.class);
        Assertions.assertEquals("b", model.name());
        Assertions.assertEquals("rilbywdx", model.description());
        Assertions.assertEquals("icc", model.identifier());
        Assertions.assertEquals("wfscjfn", model.interfaceType());
        Assertions.assertEquals("szqujizdvoq", model.connectorType());
        Assertions.assertEquals("ibyowbblgyavutp", model.connectedTo());
        Assertions.assertEquals(38.259933F, model.speed());
        Assertions.assertEquals(12.625467F, model.channelGroupId());
    }
}
