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

public final class ApplicationPropertiesTests {
    @Test
    public void testDeserialize() {
        ApplicationProperties model =
            BinaryData
                .fromString(
                    "{\"displayName\":\"dtqajzyulpkudj\",\"allowUpdates\":false,\"defaultVersion\":\"hbzhfepg\"}")
                .toObject(ApplicationProperties.class);
        Assertions.assertEquals("dtqajzyulpkudj", model.displayName());
        Assertions.assertEquals(false, model.allowUpdates());
        Assertions.assertEquals("hbzhfepg", model.defaultVersion());
    }

    @Test
    public void testSerialize() {
        ApplicationProperties model =
            new ApplicationProperties()
                .withDisplayName("dtqajzyulpkudj")
                .withAllowUpdates(false)
                .withDefaultVersion("hbzhfepg");
        model = BinaryData.fromObject(model).toObject(ApplicationProperties.class);
        Assertions.assertEquals("dtqajzyulpkudj", model.displayName());
        Assertions.assertEquals(false, model.allowUpdates());
        Assertions.assertEquals("hbzhfepg", model.defaultVersion());
    }
}
