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

package com.azure.resourcemanager.policyinsights.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.policyinsights.models.RemediationPropertiesFailureThreshold;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public final class RemediationPropertiesFailureThresholdTests {
    @Test
    public void testDeserialize() {
        RemediationPropertiesFailureThreshold model =
            BinaryData.fromString("{\"percentage\":9.04541}").toObject(RemediationPropertiesFailureThreshold.class);
        Assertions.assertEquals(9.04541F, model.percentage());
    }

    @Test
    public void testSerialize() {
        RemediationPropertiesFailureThreshold model =
            new RemediationPropertiesFailureThreshold().withPercentage(9.04541F);
        model = BinaryData.fromObject(model).toObject(RemediationPropertiesFailureThreshold.class);
        Assertions.assertEquals(9.04541F, model.percentage());
    }
}
