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

package com.azure.resourcemanager.synapse.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.synapse.fluent.models.LibraryInfo;
import org.junit.jupiter.api.Assertions;

public final class LibraryInfoTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        LibraryInfo model =
            BinaryData
                .fromString(
                    "{\"name\":\"kbzefezrxcczurt\",\"path\":\"ipqxbkwvzgnzv\",\"containerName\":\"bzdixzmq\",\"uploadedTimestamp\":\"2021-03-19T22:04:23Z\",\"type\":\"awopqh\",\"provisioningStatus\":\"jptmcgsbost\",\"creatorId\":\"lnd\"}")
                .toObject(LibraryInfo.class);
        Assertions.assertEquals("kbzefezrxcczurt", model.name());
        Assertions.assertEquals("ipqxbkwvzgnzv", model.path());
        Assertions.assertEquals("bzdixzmq", model.containerName());
        Assertions.assertEquals("awopqh", model.type());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        LibraryInfo model =
            new LibraryInfo()
                .withName("kbzefezrxcczurt")
                .withPath("ipqxbkwvzgnzv")
                .withContainerName("bzdixzmq")
                .withType("awopqh");
        model = BinaryData.fromObject(model).toObject(LibraryInfo.class);
        Assertions.assertEquals("kbzefezrxcczurt", model.name());
        Assertions.assertEquals("ipqxbkwvzgnzv", model.path());
        Assertions.assertEquals("bzdixzmq", model.containerName());
        Assertions.assertEquals("awopqh", model.type());
    }
}
