// 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.fluent.models.CustomAssessmentAutomationRequestProperties;
import com.azure.resourcemanager.security.models.SeverityEnum;
import com.azure.resourcemanager.security.models.SupportedCloudEnum;
import org.junit.jupiter.api.Assertions;

public final class CustomAssessmentAutomationRequestPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        CustomAssessmentAutomationRequestProperties model =
            BinaryData
                .fromString(
                    "{\"compressedQuery\":\"cbjy\",\"supportedCloud\":\"AWS\",\"severity\":\"Low\",\"displayName\":\"xqhabi\",\"description\":\"ikxwc\",\"remediationDescription\":\"yscnpqxu\"}")
                .toObject(CustomAssessmentAutomationRequestProperties.class);
        Assertions.assertEquals("cbjy", model.compressedQuery());
        Assertions.assertEquals(SupportedCloudEnum.AWS, model.supportedCloud());
        Assertions.assertEquals(SeverityEnum.LOW, model.severity());
        Assertions.assertEquals("xqhabi", model.displayName());
        Assertions.assertEquals("ikxwc", model.description());
        Assertions.assertEquals("yscnpqxu", model.remediationDescription());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        CustomAssessmentAutomationRequestProperties model =
            new CustomAssessmentAutomationRequestProperties()
                .withCompressedQuery("cbjy")
                .withSupportedCloud(SupportedCloudEnum.AWS)
                .withSeverity(SeverityEnum.LOW)
                .withDisplayName("xqhabi")
                .withDescription("ikxwc")
                .withRemediationDescription("yscnpqxu");
        model = BinaryData.fromObject(model).toObject(CustomAssessmentAutomationRequestProperties.class);
        Assertions.assertEquals("cbjy", model.compressedQuery());
        Assertions.assertEquals(SupportedCloudEnum.AWS, model.supportedCloud());
        Assertions.assertEquals(SeverityEnum.LOW, model.severity());
        Assertions.assertEquals("xqhabi", model.displayName());
        Assertions.assertEquals("ikxwc", model.description());
        Assertions.assertEquals("yscnpqxu", model.remediationDescription());
    }
}
