// 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.fluent.models.ConfigurationInner;
import org.junit.jupiter.api.Assertions;

public final class ConfigurationInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ConfigurationInner model =
            BinaryData
                .fromString(
                    "{\"properties\":{\"value\":\"gcpo\",\"description\":\"maajrmvdjwzrlo\",\"defaultValue\":\"clwhijcoejctbz\",\"dataType\":\"Boolean\",\"allowedValues\":\"sycbkbfk\",\"source\":\"kdkexxp\",\"isDynamicConfig\":false,\"isReadOnly\":true,\"isConfigPendingRestart\":false,\"unit\":\"fjpgddtocjjxhvp\",\"documentationLink\":\"uexhdzx\"},\"id\":\"qeojnxqbzvddntw\",\"name\":\"deicbtwnpzao\",\"type\":\"vuhrhcffcyddgl\"}")
                .toObject(ConfigurationInner.class);
        Assertions.assertEquals("gcpo", model.value());
        Assertions.assertEquals("kdkexxp", model.source());
    }

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