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

package com.azure.resourcemanager.nginx.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.nginx.models.NginxLogging;
import com.azure.resourcemanager.nginx.models.NginxStorageAccount;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public final class NginxLoggingTests {
    @Test
    public void testDeserialize() {
        NginxLogging model =
            BinaryData
                .fromString("{\"storageAccount\":{\"accountName\":\"khbzhfepgzg\",\"containerName\":\"xzlocxscp\"}}")
                .toObject(NginxLogging.class);
        Assertions.assertEquals("khbzhfepgzg", model.storageAccount().accountName());
        Assertions.assertEquals("xzlocxscp", model.storageAccount().containerName());
    }

    @Test
    public void testSerialize() {
        NginxLogging model =
            new NginxLogging()
                .withStorageAccount(
                    new NginxStorageAccount().withAccountName("khbzhfepgzg").withContainerName("xzlocxscp"));
        model = BinaryData.fromObject(model).toObject(NginxLogging.class);
        Assertions.assertEquals("khbzhfepgzg", model.storageAccount().accountName());
        Assertions.assertEquals("xzlocxscp", model.storageAccount().containerName());
    }
}
