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

package com.azure.resourcemanager.mediaservices.generated;

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

public final class AssetInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        AssetInner model =
            BinaryData
                .fromString(
                    "{\"properties\":{\"assetId\":\"1eee949d-1a90-4095-b6ba-1b60aba807e0\",\"created\":\"2021-04-29T18:24:08Z\",\"lastModified\":\"2021-06-15T22:18:20Z\",\"alternateId\":\"ebfqkkrbm\",\"description\":\"kgriwflzlfbx\",\"container\":\"uzycispnqza\",\"storageAccountName\":\"gkbrpyyd\",\"storageEncryptionFormat\":\"MediaStorageClientEncryption\"},\"id\":\"uqqkpik\",\"name\":\"drgvtqagn\",\"type\":\"uynhijg\"}")
                .toObject(AssetInner.class);
        Assertions.assertEquals("ebfqkkrbm", model.alternateId());
        Assertions.assertEquals("kgriwflzlfbx", model.description());
        Assertions.assertEquals("uzycispnqza", model.container());
        Assertions.assertEquals("gkbrpyyd", model.storageAccountName());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        AssetInner model =
            new AssetInner()
                .withAlternateId("ebfqkkrbm")
                .withDescription("kgriwflzlfbx")
                .withContainer("uzycispnqza")
                .withStorageAccountName("gkbrpyyd");
        model = BinaryData.fromObject(model).toObject(AssetInner.class);
        Assertions.assertEquals("ebfqkkrbm", model.alternateId());
        Assertions.assertEquals("kgriwflzlfbx", model.description());
        Assertions.assertEquals("uzycispnqza", model.container());
        Assertions.assertEquals("gkbrpyyd", model.storageAccountName());
    }
}
