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

package com.azure.resourcemanager.mariadb.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.mariadb.fluent.models.ConfigurationInner;
import com.azure.resourcemanager.mariadb.fluent.models.ConfigurationListResultInner;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class ConfigurationListResultInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ConfigurationListResultInner model =
            BinaryData
                .fromString(
                    "{\"value\":[{\"properties\":{\"value\":\"xrjfeallnwsub\",\"description\":\"njampm\",\"defaultValue\":\"nzscxa\",\"dataType\":\"ooch\",\"allowedValues\":\"onq\",\"source\":\"kvlrxnj\"},\"id\":\"ase\",\"name\":\"pheoflokeyy\",\"type\":\"enjbdlwtgrhp\"}]}")
                .toObject(ConfigurationListResultInner.class);
        Assertions.assertEquals("xrjfeallnwsub", model.value().get(0).value());
        Assertions.assertEquals("kvlrxnj", model.value().get(0).source());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ConfigurationListResultInner model =
            new ConfigurationListResultInner()
                .withValue(Arrays.asList(new ConfigurationInner().withValue("xrjfeallnwsub").withSource("kvlrxnj")));
        model = BinaryData.fromObject(model).toObject(ConfigurationListResultInner.class);
        Assertions.assertEquals("xrjfeallnwsub", model.value().get(0).value());
        Assertions.assertEquals("kvlrxnj", model.value().get(0).source());
    }
}
