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

public final class SubnetReferenceTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        SubnetReference model =
            BinaryData
                .fromString("{\"name\":\"nxytxh\",\"sourceArmResourceId\":\"zxbzpfzabglc\"}")
                .toObject(SubnetReference.class);
        Assertions.assertEquals("zxbzpfzabglc", model.sourceArmResourceId());
        Assertions.assertEquals("nxytxh", model.name());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        SubnetReference model = new SubnetReference().withSourceArmResourceId("zxbzpfzabglc").withName("nxytxh");
        model = BinaryData.fromObject(model).toObject(SubnetReference.class);
        Assertions.assertEquals("zxbzpfzabglc", model.sourceArmResourceId());
        Assertions.assertEquals("nxytxh", model.name());
    }
}
