// 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.Event;
import com.azure.resourcemanager.devtestlabs.models.NotificationChannelEventType;
import org.junit.jupiter.api.Assertions;

public final class EventTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        Event model = BinaryData.fromString("{\"eventName\":\"AutoShutdown\"}").toObject(Event.class);
        Assertions.assertEquals(NotificationChannelEventType.AUTO_SHUTDOWN, model.eventName());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        Event model = new Event().withEventName(NotificationChannelEventType.AUTO_SHUTDOWN);
        model = BinaryData.fromObject(model).toObject(Event.class);
        Assertions.assertEquals(NotificationChannelEventType.AUTO_SHUTDOWN, model.eventName());
    }
}
