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

package com.azure.resourcemanager.desktopvirtualization.generated;

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

public final class ApplicationPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ApplicationProperties model =
            BinaryData
                .fromString(
                    "{\"objectId\":\"bbcswsrtjri\",\"description\":\"rbpbewtghfgblcg\",\"friendlyName\":\"zvlvqhjkbegib\",\"filePath\":\"mxiebw\",\"msixPackageFamilyName\":\"loayqcgw\",\"msixPackageApplicationId\":\"zjuzgwyz\",\"applicationType\":\"InBuilt\",\"commandLineSetting\":\"Require\",\"commandLineArguments\":\"ngmtsavjcb\",\"showInPortal\":true,\"iconPath\":\"p\",\"iconIndex\":597886702,\"iconHash\":\"ftguv\"}")
                .toObject(ApplicationProperties.class);
        Assertions.assertEquals("rbpbewtghfgblcg", model.description());
        Assertions.assertEquals("zvlvqhjkbegib", model.friendlyName());
        Assertions.assertEquals("mxiebw", model.filePath());
        Assertions.assertEquals("loayqcgw", model.msixPackageFamilyName());
        Assertions.assertEquals("zjuzgwyz", model.msixPackageApplicationId());
        Assertions.assertEquals(RemoteApplicationType.IN_BUILT, model.applicationType());
        Assertions.assertEquals(CommandLineSetting.REQUIRE, model.commandLineSetting());
        Assertions.assertEquals("ngmtsavjcb", model.commandLineArguments());
        Assertions.assertEquals(true, model.showInPortal());
        Assertions.assertEquals("p", model.iconPath());
        Assertions.assertEquals(597886702, model.iconIndex());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ApplicationProperties model =
            new ApplicationProperties()
                .withDescription("rbpbewtghfgblcg")
                .withFriendlyName("zvlvqhjkbegib")
                .withFilePath("mxiebw")
                .withMsixPackageFamilyName("loayqcgw")
                .withMsixPackageApplicationId("zjuzgwyz")
                .withApplicationType(RemoteApplicationType.IN_BUILT)
                .withCommandLineSetting(CommandLineSetting.REQUIRE)
                .withCommandLineArguments("ngmtsavjcb")
                .withShowInPortal(true)
                .withIconPath("p")
                .withIconIndex(597886702);
        model = BinaryData.fromObject(model).toObject(ApplicationProperties.class);
        Assertions.assertEquals("rbpbewtghfgblcg", model.description());
        Assertions.assertEquals("zvlvqhjkbegib", model.friendlyName());
        Assertions.assertEquals("mxiebw", model.filePath());
        Assertions.assertEquals("loayqcgw", model.msixPackageFamilyName());
        Assertions.assertEquals("zjuzgwyz", model.msixPackageApplicationId());
        Assertions.assertEquals(RemoteApplicationType.IN_BUILT, model.applicationType());
        Assertions.assertEquals(CommandLineSetting.REQUIRE, model.commandLineSetting());
        Assertions.assertEquals("ngmtsavjcb", model.commandLineArguments());
        Assertions.assertEquals(true, model.showInPortal());
        Assertions.assertEquals("p", model.iconPath());
        Assertions.assertEquals(597886702, model.iconIndex());
    }
}
