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

public final class ApplicationInnerTests {
    @Test
    public void testDeserialize() {
        ApplicationInner model =
            BinaryData
                .fromString(
                    "{\"properties\":{\"displayName\":\"ifiyipjxsqwpgrj\",\"allowUpdates\":true,\"defaultVersion\":\"rcjxvsnbyxqabn\"},\"etag\":\"cpc\",\"id\":\"shurzafbljjgpbto\",\"name\":\"c\",\"type\":\"mkljavb\"}")
                .toObject(ApplicationInner.class);
        Assertions.assertEquals("ifiyipjxsqwpgrj", model.displayName());
        Assertions.assertEquals(true, model.allowUpdates());
        Assertions.assertEquals("rcjxvsnbyxqabn", model.defaultVersion());
    }

    @Test
    public void testSerialize() {
        ApplicationInner model =
            new ApplicationInner()
                .withDisplayName("ifiyipjxsqwpgrj")
                .withAllowUpdates(true)
                .withDefaultVersion("rcjxvsnbyxqabn");
        model = BinaryData.fromObject(model).toObject(ApplicationInner.class);
        Assertions.assertEquals("ifiyipjxsqwpgrj", model.displayName());
        Assertions.assertEquals(true, model.allowUpdates());
        Assertions.assertEquals("rcjxvsnbyxqabn", model.defaultVersion());
    }
}
