// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.avs.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPublicIpProperties;
import org.junit.jupiter.api.Assertions;

public final class WorkloadNetworkPublicIpPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        WorkloadNetworkPublicIpProperties model =
            BinaryData
                .fromString(
                    "{\"displayName\":\"erqwkyhkobopg\",\"numberOfPublicIPs\":3864953731732888830,\"publicIPBlock\":\"wep\",\"provisioningState\":\"Building\"}")
                .toObject(WorkloadNetworkPublicIpProperties.class);
        Assertions.assertEquals("erqwkyhkobopg", model.displayName());
        Assertions.assertEquals(3864953731732888830L, model.numberOfPublicIPs());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        WorkloadNetworkPublicIpProperties model =
            new WorkloadNetworkPublicIpProperties()
                .withDisplayName("erqwkyhkobopg")
                .withNumberOfPublicIPs(3864953731732888830L);
        model = BinaryData.fromObject(model).toObject(WorkloadNetworkPublicIpProperties.class);
        Assertions.assertEquals("erqwkyhkobopg", model.displayName());
        Assertions.assertEquals(3864953731732888830L, model.numberOfPublicIPs());
    }
}
