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

public final class LibraryResourceInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        LibraryResourceInner model =
            BinaryData
                .fromString(
                    "{\"properties\":{\"name\":\"tmwwi\",\"path\":\"ehfqpofvwbc\",\"containerName\":\"embnkbw\",\"uploadedTimestamp\":\"2021-03-18T02:40:22Z\",\"type\":\"kdi\",\"provisioningStatus\":\"ihebwtsw\",\"creatorId\":\"uwfmduragegizvc\"},\"etag\":\"elisdjub\",\"id\":\"gbqi\",\"name\":\"kxkbsazgakgacyr\",\"type\":\"m\"}")
                .toObject(LibraryResourceInner.class);
        Assertions.assertEquals("tmwwi", model.namePropertiesName());
        Assertions.assertEquals("ehfqpofvwbc", model.path());
        Assertions.assertEquals("embnkbw", model.containerName());
        Assertions.assertEquals("kdi", model.typePropertiesType());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        LibraryResourceInner model =
            new LibraryResourceInner()
                .withNamePropertiesName("tmwwi")
                .withPath("ehfqpofvwbc")
                .withContainerName("embnkbw")
                .withTypePropertiesType("kdi");
        model = BinaryData.fromObject(model).toObject(LibraryResourceInner.class);
        Assertions.assertEquals("tmwwi", model.namePropertiesName());
        Assertions.assertEquals("ehfqpofvwbc", model.path());
        Assertions.assertEquals("embnkbw", model.containerName());
        Assertions.assertEquals("kdi", model.typePropertiesType());
    }
}
