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

package com.azure.resourcemanager.securitydevops.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.securitydevops.models.AutoDiscovery;
import com.azure.resourcemanager.securitydevops.models.AzureDevOpsOrgProperties;
import com.azure.resourcemanager.securitydevops.models.ProvisioningState;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public final class AzureDevOpsOrgPropertiesTests {
    @Test
    public void testDeserialize() {
        AzureDevOpsOrgProperties model =
            BinaryData
                .fromString("{\"provisioningState\":\"Failed\",\"autoDiscovery\":\"Disabled\"}")
                .toObject(AzureDevOpsOrgProperties.class);
        Assertions.assertEquals(ProvisioningState.FAILED, model.provisioningState());
        Assertions.assertEquals(AutoDiscovery.DISABLED, model.autoDiscovery());
    }

    @Test
    public void testSerialize() {
        AzureDevOpsOrgProperties model =
            new AzureDevOpsOrgProperties()
                .withProvisioningState(ProvisioningState.FAILED)
                .withAutoDiscovery(AutoDiscovery.DISABLED);
        model = BinaryData.fromObject(model).toObject(AzureDevOpsOrgProperties.class);
        Assertions.assertEquals(ProvisioningState.FAILED, model.provisioningState());
        Assertions.assertEquals(AutoDiscovery.DISABLED, model.autoDiscovery());
    }
}
