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

package com.azure.resourcemanager.datalakestore.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.datalakestore.models.CreateVirtualNetworkRuleWithAccountParameters;
import org.junit.jupiter.api.Assertions;

public final class CreateVirtualNetworkRuleWithAccountParametersTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        CreateVirtualNetworkRuleWithAccountParameters model =
            BinaryData
                .fromString("{\"name\":\"spemvtzfk\",\"properties\":{\"subnetId\":\"fublj\"}}")
                .toObject(CreateVirtualNetworkRuleWithAccountParameters.class);
        Assertions.assertEquals("spemvtzfk", model.name());
        Assertions.assertEquals("fublj", model.subnetId());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        CreateVirtualNetworkRuleWithAccountParameters model =
            new CreateVirtualNetworkRuleWithAccountParameters().withName("spemvtzfk").withSubnetId("fublj");
        model = BinaryData.fromObject(model).toObject(CreateVirtualNetworkRuleWithAccountParameters.class);
        Assertions.assertEquals("spemvtzfk", model.name());
        Assertions.assertEquals("fublj", model.subnetId());
    }
}
