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

package com.azure.resourcemanager.postgresqlflexibleserver.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.postgresqlflexibleserver.models.ConfigurationForUpdate;
import org.junit.jupiter.api.Assertions;

public final class ConfigurationForUpdateTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ConfigurationForUpdate model =
            BinaryData
                .fromString(
                    "{\"properties\":{\"value\":\"tkftutqxlngx\",\"description\":\"fgugnxkrxdqmid\",\"defaultValue\":\"hzrvqd\",\"dataType\":\"Boolean\",\"allowedValues\":\"jybige\",\"source\":\"qfbow\",\"isDynamicConfig\":true,\"isReadOnly\":false,\"isConfigPendingRestart\":true,\"unit\":\"lcuiywgqywgndr\",\"documentationLink\":\"nhzgpphrcgyn\"}}")
                .toObject(ConfigurationForUpdate.class);
        Assertions.assertEquals("tkftutqxlngx", model.value());
        Assertions.assertEquals("qfbow", model.source());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ConfigurationForUpdate model = new ConfigurationForUpdate().withValue("tkftutqxlngx").withSource("qfbow");
        model = BinaryData.fromObject(model).toObject(ConfigurationForUpdate.class);
        Assertions.assertEquals("tkftutqxlngx", model.value());
        Assertions.assertEquals("qfbow", model.source());
    }
}
