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

package com.azure.resourcemanager.apimanagement.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.apimanagement.models.WikiDocumentationContract;
import com.azure.resourcemanager.apimanagement.models.WikiUpdateContract;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class WikiUpdateContractTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        WikiUpdateContract model =
            BinaryData
                .fromString("{\"properties\":{\"documents\":[{\"documentationId\":\"tuowogtgitsqh\"}]}}")
                .toObject(WikiUpdateContract.class);
        Assertions.assertEquals("tuowogtgitsqh", model.documents().get(0).documentationId());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        WikiUpdateContract model =
            new WikiUpdateContract()
                .withDocuments(Arrays.asList(new WikiDocumentationContract().withDocumentationId("tuowogtgitsqh")));
        model = BinaryData.fromObject(model).toObject(WikiUpdateContract.class);
        Assertions.assertEquals("tuowogtgitsqh", model.documents().get(0).documentationId());
    }
}
