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

package com.azure.resourcemanager.mariadb.generated;

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

public final class FirewallRulePropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        FirewallRuleProperties model =
            BinaryData
                .fromString("{\"startIpAddress\":\"bznorcjxvsnby\",\"endIpAddress\":\"qabnmoc\"}")
                .toObject(FirewallRuleProperties.class);
        Assertions.assertEquals("bznorcjxvsnby", model.startIpAddress());
        Assertions.assertEquals("qabnmoc", model.endIpAddress());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        FirewallRuleProperties model =
            new FirewallRuleProperties().withStartIpAddress("bznorcjxvsnby").withEndIpAddress("qabnmoc");
        model = BinaryData.fromObject(model).toObject(FirewallRuleProperties.class);
        Assertions.assertEquals("bznorcjxvsnby", model.startIpAddress());
        Assertions.assertEquals("qabnmoc", model.endIpAddress());
    }
}
