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

public final class NotifyParametersTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        NotifyParameters model =
            BinaryData
                .fromString("{\"eventName\":\"Cost\",\"jsonPayload\":\"mtbghh\"}")
                .toObject(NotifyParameters.class);
        Assertions.assertEquals(NotificationChannelEventType.COST, model.eventName());
        Assertions.assertEquals("mtbghh", model.jsonPayload());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        NotifyParameters model =
            new NotifyParameters().withEventName(NotificationChannelEventType.COST).withJsonPayload("mtbghh");
        model = BinaryData.fromObject(model).toObject(NotifyParameters.class);
        Assertions.assertEquals(NotificationChannelEventType.COST, model.eventName());
        Assertions.assertEquals("mtbghh", model.jsonPayload());
    }
}
