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

package com.azure.resourcemanager.managednetworkfabric.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.managednetworkfabric.models.AdministrativeState;
import com.azure.resourcemanager.managednetworkfabric.models.UpdateAdministrativeState;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class UpdateAdministrativeStateTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        UpdateAdministrativeState model =
            BinaryData
                .fromString("{\"state\":\"Disable\",\"resourceIds\":[\"uconuqszfkbey\",\"ewrmjmwvvjektc\"]}")
                .toObject(UpdateAdministrativeState.class);
        Assertions.assertEquals("uconuqszfkbey", model.resourceIds().get(0));
        Assertions.assertEquals(AdministrativeState.DISABLE, model.state());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        UpdateAdministrativeState model =
            new UpdateAdministrativeState()
                .withResourceIds(Arrays.asList("uconuqszfkbey", "ewrmjmwvvjektc"))
                .withState(AdministrativeState.DISABLE);
        model = BinaryData.fromObject(model).toObject(UpdateAdministrativeState.class);
        Assertions.assertEquals("uconuqszfkbey", model.resourceIds().get(0));
        Assertions.assertEquals(AdministrativeState.DISABLE, model.state());
    }
}
