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

package com.azure.resourcemanager.frontdoor.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.frontdoor.models.HeaderAction;
import com.azure.resourcemanager.frontdoor.models.HeaderActionType;
import org.junit.jupiter.api.Assertions;

public final class HeaderActionTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        HeaderAction model =
            BinaryData
                .fromString("{\"headerActionType\":\"Delete\",\"headerName\":\"gxhnisk\",\"value\":\"bkpyc\"}")
                .toObject(HeaderAction.class);
        Assertions.assertEquals(HeaderActionType.DELETE, model.headerActionType());
        Assertions.assertEquals("gxhnisk", model.headerName());
        Assertions.assertEquals("bkpyc", model.value());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        HeaderAction model =
            new HeaderAction()
                .withHeaderActionType(HeaderActionType.DELETE)
                .withHeaderName("gxhnisk")
                .withValue("bkpyc");
        model = BinaryData.fromObject(model).toObject(HeaderAction.class);
        Assertions.assertEquals(HeaderActionType.DELETE, model.headerActionType());
        Assertions.assertEquals("gxhnisk", model.headerName());
        Assertions.assertEquals("bkpyc", model.value());
    }
}
