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

package com.azure.resourcemanager.databoxedge.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.databoxedge.fluent.models.ContainerInner;
import com.azure.resourcemanager.databoxedge.models.AzureContainerDataFormat;
import org.junit.jupiter.api.Assertions;

public final class ContainerInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ContainerInner model =
            BinaryData
                .fromString(
                    "{\"properties\":{\"containerStatus\":\"Unknown\",\"dataFormat\":\"PageBlob\",\"refreshDetails\":{\"inProgressRefreshJobId\":\"uel\",\"lastCompletedRefreshJobTimeInUTC\":\"2021-04-04T13:11:17Z\",\"errorManifestFile\":\"dyhtozfikdowwquu\",\"lastJob\":\"zx\"},\"createdDateTime\":\"2021-01-19T00:58:57Z\"},\"id\":\"ithhqzon\",\"name\":\"sg\",\"type\":\"b\"}")
                .toObject(ContainerInner.class);
        Assertions.assertEquals(AzureContainerDataFormat.PAGE_BLOB, model.dataFormat());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ContainerInner model = new ContainerInner().withDataFormat(AzureContainerDataFormat.PAGE_BLOB);
        model = BinaryData.fromObject(model).toObject(ContainerInner.class);
        Assertions.assertEquals(AzureContainerDataFormat.PAGE_BLOB, model.dataFormat());
    }
}
