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

package com.azure.resourcemanager.devtestlabs.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.devtestlabs.models.EnableStatus;
import com.azure.resourcemanager.devtestlabs.models.NotificationSettings;
import org.junit.jupiter.api.Assertions;

public final class NotificationSettingsTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        NotificationSettings model =
            BinaryData
                .fromString(
                    "{\"status\":\"Disabled\",\"timeInMinutes\":980316888,\"webhookUrl\":\"xhqyudxorrqnb\",\"emailRecipient\":\"czvyifq\",\"notificationLocale\":\"kdvjsll\"}")
                .toObject(NotificationSettings.class);
        Assertions.assertEquals(EnableStatus.DISABLED, model.status());
        Assertions.assertEquals(980316888, model.timeInMinutes());
        Assertions.assertEquals("xhqyudxorrqnb", model.webhookUrl());
        Assertions.assertEquals("czvyifq", model.emailRecipient());
        Assertions.assertEquals("kdvjsll", model.notificationLocale());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        NotificationSettings model =
            new NotificationSettings()
                .withStatus(EnableStatus.DISABLED)
                .withTimeInMinutes(980316888)
                .withWebhookUrl("xhqyudxorrqnb")
                .withEmailRecipient("czvyifq")
                .withNotificationLocale("kdvjsll");
        model = BinaryData.fromObject(model).toObject(NotificationSettings.class);
        Assertions.assertEquals(EnableStatus.DISABLED, model.status());
        Assertions.assertEquals(980316888, model.timeInMinutes());
        Assertions.assertEquals("xhqyudxorrqnb", model.webhookUrl());
        Assertions.assertEquals("czvyifq", model.emailRecipient());
        Assertions.assertEquals("kdvjsll", model.notificationLocale());
    }
}
