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

package com.azure.resourcemanager.costmanagement.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.costmanagement.models.ScheduledActionKind;
import com.azure.resourcemanager.costmanagement.models.ScheduledActionProxyResource;
import org.junit.jupiter.api.Assertions;

public final class ScheduledActionProxyResourceTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ScheduledActionProxyResource model =
            BinaryData
                .fromString(
                    "{\"eTag\":\"olbq\",\"kind\":\"Email\",\"id\":\"lmv\",\"name\":\"elfk\",\"type\":\"gplcrpwjxeznoigb\"}")
                .toObject(ScheduledActionProxyResource.class);
        Assertions.assertEquals(ScheduledActionKind.EMAIL, model.kind());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ScheduledActionProxyResource model = new ScheduledActionProxyResource().withKind(ScheduledActionKind.EMAIL);
        model = BinaryData.fromObject(model).toObject(ScheduledActionProxyResource.class);
        Assertions.assertEquals(ScheduledActionKind.EMAIL, model.kind());
    }
}
