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

public final class AssetPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        AssetProperties model =
            BinaryData
                .fromString(
                    "{\"assetId\":\"71511f50-bf1d-47e9-abd7-6a96e9e8a4c6\",\"created\":\"2021-04-23T17:49:38Z\",\"lastModified\":\"2021-11-02T05:09:13Z\",\"alternateId\":\"arbu\",\"description\":\"cvpnazzmhjrunmpx\",\"container\":\"dbhrbnlankxm\",\"storageAccountName\":\"k\",\"storageEncryptionFormat\":\"MediaStorageClientEncryption\"}")
                .toObject(AssetProperties.class);
        Assertions.assertEquals("arbu", model.alternateId());
        Assertions.assertEquals("cvpnazzmhjrunmpx", model.description());
        Assertions.assertEquals("dbhrbnlankxm", model.container());
        Assertions.assertEquals("k", model.storageAccountName());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        AssetProperties model =
            new AssetProperties()
                .withAlternateId("arbu")
                .withDescription("cvpnazzmhjrunmpx")
                .withContainer("dbhrbnlankxm")
                .withStorageAccountName("k");
        model = BinaryData.fromObject(model).toObject(AssetProperties.class);
        Assertions.assertEquals("arbu", model.alternateId());
        Assertions.assertEquals("cvpnazzmhjrunmpx", model.description());
        Assertions.assertEquals("dbhrbnlankxm", model.container());
        Assertions.assertEquals("k", model.storageAccountName());
    }
}
