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

package com.azure.resourcemanager.resourcemover.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.resourcemover.models.PublicIpAddressResourceSettings;
import org.junit.jupiter.api.Assertions;

public final class PublicIpAddressResourceSettingsTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        PublicIpAddressResourceSettings model =
            BinaryData
                .fromString(
                    "{\"resourceType\":\"Microsoft.Network/publicIPAddresses\",\"domainNameLabel\":\"ibtnmxiebwwaloay\",\"fqdn\":\"gwrtzju\",\"publicIpAllocationMethod\":\"wyzmhtxon\",\"sku\":\"ts\",\"zones\":\"jcbpwxqpsrknft\",\"targetResourceName\":\"uvriuhprwm\"}")
                .toObject(PublicIpAddressResourceSettings.class);
        Assertions.assertEquals("uvriuhprwm", model.targetResourceName());
        Assertions.assertEquals("ibtnmxiebwwaloay", model.domainNameLabel());
        Assertions.assertEquals("gwrtzju", model.fqdn());
        Assertions.assertEquals("wyzmhtxon", model.publicIpAllocationMethod());
        Assertions.assertEquals("ts", model.sku());
        Assertions.assertEquals("jcbpwxqpsrknft", model.zones());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        PublicIpAddressResourceSettings model =
            new PublicIpAddressResourceSettings()
                .withTargetResourceName("uvriuhprwm")
                .withDomainNameLabel("ibtnmxiebwwaloay")
                .withFqdn("gwrtzju")
                .withPublicIpAllocationMethod("wyzmhtxon")
                .withSku("ts")
                .withZones("jcbpwxqpsrknft");
        model = BinaryData.fromObject(model).toObject(PublicIpAddressResourceSettings.class);
        Assertions.assertEquals("uvriuhprwm", model.targetResourceName());
        Assertions.assertEquals("ibtnmxiebwwaloay", model.domainNameLabel());
        Assertions.assertEquals("gwrtzju", model.fqdn());
        Assertions.assertEquals("wyzmhtxon", model.publicIpAllocationMethod());
        Assertions.assertEquals("ts", model.sku());
        Assertions.assertEquals("jcbpwxqpsrknft", model.zones());
    }
}
