// 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.FrontDoorHealthProbeMethod;
import com.azure.resourcemanager.frontdoor.models.FrontDoorProtocol;
import com.azure.resourcemanager.frontdoor.models.HealthProbeEnabled;
import com.azure.resourcemanager.frontdoor.models.HealthProbeSettingsUpdateParameters;
import org.junit.jupiter.api.Assertions;

public final class HealthProbeSettingsUpdateParametersTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        HealthProbeSettingsUpdateParameters model =
            BinaryData
                .fromString(
                    "{\"path\":\"n\",\"protocol\":\"Https\",\"intervalInSeconds\":242994282,\"healthProbeMethod\":\"HEAD\",\"enabledState\":\"Disabled\"}")
                .toObject(HealthProbeSettingsUpdateParameters.class);
        Assertions.assertEquals("n", model.path());
        Assertions.assertEquals(FrontDoorProtocol.HTTPS, model.protocol());
        Assertions.assertEquals(242994282, model.intervalInSeconds());
        Assertions.assertEquals(FrontDoorHealthProbeMethod.HEAD, model.healthProbeMethod());
        Assertions.assertEquals(HealthProbeEnabled.DISABLED, model.enabledState());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        HealthProbeSettingsUpdateParameters model =
            new HealthProbeSettingsUpdateParameters()
                .withPath("n")
                .withProtocol(FrontDoorProtocol.HTTPS)
                .withIntervalInSeconds(242994282)
                .withHealthProbeMethod(FrontDoorHealthProbeMethod.HEAD)
                .withEnabledState(HealthProbeEnabled.DISABLED);
        model = BinaryData.fromObject(model).toObject(HealthProbeSettingsUpdateParameters.class);
        Assertions.assertEquals("n", model.path());
        Assertions.assertEquals(FrontDoorProtocol.HTTPS, model.protocol());
        Assertions.assertEquals(242994282, model.intervalInSeconds());
        Assertions.assertEquals(FrontDoorHealthProbeMethod.HEAD, model.healthProbeMethod());
        Assertions.assertEquals(HealthProbeEnabled.DISABLED, model.enabledState());
    }
}
