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

package com.azure.resourcemanager.batch.generated;

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

public final class ApplicationPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ApplicationProperties model =
            BinaryData
                .fromString("{\"displayName\":\"s\",\"allowUpdates\":false,\"defaultVersion\":\"zqqedq\"}")
                .toObject(ApplicationProperties.class);
        Assertions.assertEquals("s", model.displayName());
        Assertions.assertEquals(false, model.allowUpdates());
        Assertions.assertEquals("zqqedq", model.defaultVersion());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ApplicationProperties model =
            new ApplicationProperties().withDisplayName("s").withAllowUpdates(false).withDefaultVersion("zqqedq");
        model = BinaryData.fromObject(model).toObject(ApplicationProperties.class);
        Assertions.assertEquals("s", model.displayName());
        Assertions.assertEquals(false, model.allowUpdates());
        Assertions.assertEquals("zqqedq", model.defaultVersion());
    }
}
