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

package com.azure.resourcemanager.deploymentmanager.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.deploymentmanager.models.HealthCheckStepAttributes;
import org.junit.jupiter.api.Assertions;

public final class HealthCheckStepAttributesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        HealthCheckStepAttributes model =
            BinaryData
                .fromString(
                    "{\"type\":\"HealthCheckStepAttributes\",\"waitDuration\":\"qzrnkcqvyxlwhz\",\"maxElasticDuration\":\"icohoqqnwvl\",\"healthyStateDuration\":\"yav\"}")
                .toObject(HealthCheckStepAttributes.class);
        Assertions.assertEquals("qzrnkcqvyxlwhz", model.waitDuration());
        Assertions.assertEquals("icohoqqnwvl", model.maxElasticDuration());
        Assertions.assertEquals("yav", model.healthyStateDuration());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        HealthCheckStepAttributes model =
            new HealthCheckStepAttributes()
                .withWaitDuration("qzrnkcqvyxlwhz")
                .withMaxElasticDuration("icohoqqnwvl")
                .withHealthyStateDuration("yav");
        model = BinaryData.fromObject(model).toObject(HealthCheckStepAttributes.class);
        Assertions.assertEquals("qzrnkcqvyxlwhz", model.waitDuration());
        Assertions.assertEquals("icohoqqnwvl", model.maxElasticDuration());
        Assertions.assertEquals("yav", model.healthyStateDuration());
    }
}
