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

public final class DDAudioTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        DDAudio model =
            BinaryData
                .fromString(
                    "{\"@odata.type\":\"#Microsoft.Media.DDAudio\",\"channels\":1224339207,\"samplingRate\":536315027,\"bitrate\":549450060,\"label\":\"sukokwbqplhl\"}")
                .toObject(DDAudio.class);
        Assertions.assertEquals("sukokwbqplhl", model.label());
        Assertions.assertEquals(1224339207, model.channels());
        Assertions.assertEquals(536315027, model.samplingRate());
        Assertions.assertEquals(549450060, model.bitrate());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        DDAudio model =
            new DDAudio()
                .withLabel("sukokwbqplhl")
                .withChannels(1224339207)
                .withSamplingRate(536315027)
                .withBitrate(549450060);
        model = BinaryData.fromObject(model).toObject(DDAudio.class);
        Assertions.assertEquals("sukokwbqplhl", model.label());
        Assertions.assertEquals(1224339207, model.channels());
        Assertions.assertEquals(536315027, model.samplingRate());
        Assertions.assertEquals(549450060, model.bitrate());
    }
}
