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

package com.azure.resourcemanager.datalakeanalytics.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.datalakeanalytics.models.CreateFirewallRuleWithAccountParameters;
import org.junit.jupiter.api.Assertions;

public final class CreateFirewallRuleWithAccountParametersTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        CreateFirewallRuleWithAccountParameters model =
            BinaryData
                .fromString(
                    "{\"name\":\"tnb\",\"properties\":{\"startIpAddress\":\"bkzgcwrwclx\",\"endIpAddress\":\"wrljdouskc\"}}")
                .toObject(CreateFirewallRuleWithAccountParameters.class);
        Assertions.assertEquals("tnb", model.name());
        Assertions.assertEquals("bkzgcwrwclx", model.startIpAddress());
        Assertions.assertEquals("wrljdouskc", model.endIpAddress());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        CreateFirewallRuleWithAccountParameters model =
            new CreateFirewallRuleWithAccountParameters()
                .withName("tnb")
                .withStartIpAddress("bkzgcwrwclx")
                .withEndIpAddress("wrljdouskc");
        model = BinaryData.fromObject(model).toObject(CreateFirewallRuleWithAccountParameters.class);
        Assertions.assertEquals("tnb", model.name());
        Assertions.assertEquals("bkzgcwrwclx", model.startIpAddress());
        Assertions.assertEquals("wrljdouskc", model.endIpAddress());
    }
}
