// 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.VirtualNetworkRuleProperties;
import org.junit.jupiter.api.Assertions;

public final class VirtualNetworkRulePropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        VirtualNetworkRuleProperties model =
            BinaryData
                .fromString(
                    "{\"virtualNetworkSubnetId\":\"l\",\"ignoreMissingVnetServiceEndpoint\":false,\"state\":\"Deleting\"}")
                .toObject(VirtualNetworkRuleProperties.class);
        Assertions.assertEquals("l", model.virtualNetworkSubnetId());
        Assertions.assertEquals(false, model.ignoreMissingVnetServiceEndpoint());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        VirtualNetworkRuleProperties model =
            new VirtualNetworkRuleProperties()
                .withVirtualNetworkSubnetId("l")
                .withIgnoreMissingVnetServiceEndpoint(false);
        model = BinaryData.fromObject(model).toObject(VirtualNetworkRuleProperties.class);
        Assertions.assertEquals("l", model.virtualNetworkSubnetId());
        Assertions.assertEquals(false, model.ignoreMissingVnetServiceEndpoint());
    }
}
