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

public final class Layer3IpPrefixPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        Layer3IpPrefixProperties model =
            BinaryData
                .fromString(
                    "{\"primaryIpv4Prefix\":\"ebizikayuh\",\"primaryIpv6Prefix\":\"bjbsybb\",\"secondaryIpv4Prefix\":\"r\",\"secondaryIpv6Prefix\":\"ldgmfpgvmpip\"}")
                .toObject(Layer3IpPrefixProperties.class);
        Assertions.assertEquals("ebizikayuh", model.primaryIpv4Prefix());
        Assertions.assertEquals("bjbsybb", model.primaryIpv6Prefix());
        Assertions.assertEquals("r", model.secondaryIpv4Prefix());
        Assertions.assertEquals("ldgmfpgvmpip", model.secondaryIpv6Prefix());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        Layer3IpPrefixProperties model =
            new Layer3IpPrefixProperties()
                .withPrimaryIpv4Prefix("ebizikayuh")
                .withPrimaryIpv6Prefix("bjbsybb")
                .withSecondaryIpv4Prefix("r")
                .withSecondaryIpv6Prefix("ldgmfpgvmpip");
        model = BinaryData.fromObject(model).toObject(Layer3IpPrefixProperties.class);
        Assertions.assertEquals("ebizikayuh", model.primaryIpv4Prefix());
        Assertions.assertEquals("bjbsybb", model.primaryIpv6Prefix());
        Assertions.assertEquals("r", model.secondaryIpv4Prefix());
        Assertions.assertEquals("ldgmfpgvmpip", model.secondaryIpv6Prefix());
    }
}
