// 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.MinimalSeverity;
import com.azure.resourcemanager.security.models.SecurityContactPropertiesAlertNotifications;
import com.azure.resourcemanager.security.models.State;
import org.junit.jupiter.api.Assertions;

public final class SecurityContactPropertiesAlertNotificationsTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        SecurityContactPropertiesAlertNotifications model =
            BinaryData
                .fromString("{\"state\":\"Passed\",\"minimalSeverity\":\"Medium\"}")
                .toObject(SecurityContactPropertiesAlertNotifications.class);
        Assertions.assertEquals(State.PASSED, model.state());
        Assertions.assertEquals(MinimalSeverity.MEDIUM, model.minimalSeverity());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        SecurityContactPropertiesAlertNotifications model =
            new SecurityContactPropertiesAlertNotifications()
                .withState(State.PASSED)
                .withMinimalSeverity(MinimalSeverity.MEDIUM);
        model = BinaryData.fromObject(model).toObject(SecurityContactPropertiesAlertNotifications.class);
        Assertions.assertEquals(State.PASSED, model.state());
        Assertions.assertEquals(MinimalSeverity.MEDIUM, model.minimalSeverity());
    }
}
