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

package com.azure.resourcemanager.datadog.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.datadog.models.FilteringTag;
import com.azure.resourcemanager.datadog.models.TagAction;
import org.junit.jupiter.api.Assertions;

public final class FilteringTagTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        FilteringTag model =
            BinaryData
                .fromString("{\"name\":\"w\",\"value\":\"eun\",\"action\":\"Exclude\"}")
                .toObject(FilteringTag.class);
        Assertions.assertEquals("w", model.name());
        Assertions.assertEquals("eun", model.value());
        Assertions.assertEquals(TagAction.EXCLUDE, model.action());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        FilteringTag model = new FilteringTag().withName("w").withValue("eun").withAction(TagAction.EXCLUDE);
        model = BinaryData.fromObject(model).toObject(FilteringTag.class);
        Assertions.assertEquals("w", model.name());
        Assertions.assertEquals("eun", model.value());
        Assertions.assertEquals(TagAction.EXCLUDE, model.action());
    }
}
