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

package com.azure.resourcemanager.vmwarecloudsimple.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.vmwarecloudsimple.models.CustomizationIpAddress;
import com.azure.resourcemanager.vmwarecloudsimple.models.CustomizationIpAddressType;
import org.junit.jupiter.api.Assertions;

public final class CustomizationIpAddressTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        CustomizationIpAddress model =
            BinaryData
                .fromString("{\"argument\":\"axhexiilivp\",\"ipAddress\":\"iirqtd\",\"type\":\"FIXED_IP\"}")
                .toObject(CustomizationIpAddress.class);
        Assertions.assertEquals("axhexiilivp", model.argument());
        Assertions.assertEquals("iirqtd", model.ipAddress());
        Assertions.assertEquals(CustomizationIpAddressType.FIXED_IP, model.type());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        CustomizationIpAddress model =
            new CustomizationIpAddress()
                .withArgument("axhexiilivp")
                .withIpAddress("iirqtd")
                .withType(CustomizationIpAddressType.FIXED_IP);
        model = BinaryData.fromObject(model).toObject(CustomizationIpAddress.class);
        Assertions.assertEquals("axhexiilivp", model.argument());
        Assertions.assertEquals("iirqtd", model.ipAddress());
        Assertions.assertEquals(CustomizationIpAddressType.FIXED_IP, model.type());
    }
}
