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

package com.azure.resourcemanager.security.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.security.models.RecommendationConfigStatus;
import com.azure.resourcemanager.security.models.RecommendationConfigurationProperties;
import com.azure.resourcemanager.security.models.RecommendationType;
import org.junit.jupiter.api.Assertions;

public final class RecommendationConfigurationPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        RecommendationConfigurationProperties model =
            BinaryData
                .fromString(
                    "{\"recommendationType\":\"IoT_PermissiveFirewallPolicy\",\"name\":\"xepcyvahfn\",\"status\":\"Disabled\"}")
                .toObject(RecommendationConfigurationProperties.class);
        Assertions.assertEquals(RecommendationType.IO_T_PERMISSIVE_FIREWALL_POLICY, model.recommendationType());
        Assertions.assertEquals(RecommendationConfigStatus.DISABLED, model.status());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        RecommendationConfigurationProperties model =
            new RecommendationConfigurationProperties()
                .withRecommendationType(RecommendationType.IO_T_PERMISSIVE_FIREWALL_POLICY)
                .withStatus(RecommendationConfigStatus.DISABLED);
        model = BinaryData.fromObject(model).toObject(RecommendationConfigurationProperties.class);
        Assertions.assertEquals(RecommendationType.IO_T_PERMISSIVE_FIREWALL_POLICY, model.recommendationType());
        Assertions.assertEquals(RecommendationConfigStatus.DISABLED, model.status());
    }
}
