// 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.ApplicationPatchProperties;
import com.azure.resourcemanager.desktopvirtualization.models.CommandLineSetting;
import com.azure.resourcemanager.desktopvirtualization.models.RemoteApplicationType;
import org.junit.jupiter.api.Assertions;

public final class ApplicationPatchPropertiesTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        ApplicationPatchProperties model =
            BinaryData
                .fromString(
                    "{\"description\":\"ofd\",\"friendlyName\":\"uusdttouwa\",\"filePath\":\"ekqvkeln\",\"commandLineSetting\":\"DoNotAllow\",\"commandLineArguments\":\"xwyjsflhhc\",\"showInPortal\":true,\"iconPath\":\"jixisxyawjoyaqcs\",\"iconIndex\":2113030944,\"msixPackageFamilyName\":\"kiidzyex\",\"msixPackageApplicationId\":\"eli\",\"applicationType\":\"InBuilt\"}")
                .toObject(ApplicationPatchProperties.class);
        Assertions.assertEquals("ofd", model.description());
        Assertions.assertEquals("uusdttouwa", model.friendlyName());
        Assertions.assertEquals("ekqvkeln", model.filePath());
        Assertions.assertEquals(CommandLineSetting.DO_NOT_ALLOW, model.commandLineSetting());
        Assertions.assertEquals("xwyjsflhhc", model.commandLineArguments());
        Assertions.assertEquals(true, model.showInPortal());
        Assertions.assertEquals("jixisxyawjoyaqcs", model.iconPath());
        Assertions.assertEquals(2113030944, model.iconIndex());
        Assertions.assertEquals("kiidzyex", model.msixPackageFamilyName());
        Assertions.assertEquals("eli", model.msixPackageApplicationId());
        Assertions.assertEquals(RemoteApplicationType.IN_BUILT, model.applicationType());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        ApplicationPatchProperties model =
            new ApplicationPatchProperties()
                .withDescription("ofd")
                .withFriendlyName("uusdttouwa")
                .withFilePath("ekqvkeln")
                .withCommandLineSetting(CommandLineSetting.DO_NOT_ALLOW)
                .withCommandLineArguments("xwyjsflhhc")
                .withShowInPortal(true)
                .withIconPath("jixisxyawjoyaqcs")
                .withIconIndex(2113030944)
                .withMsixPackageFamilyName("kiidzyex")
                .withMsixPackageApplicationId("eli")
                .withApplicationType(RemoteApplicationType.IN_BUILT);
        model = BinaryData.fromObject(model).toObject(ApplicationPatchProperties.class);
        Assertions.assertEquals("ofd", model.description());
        Assertions.assertEquals("uusdttouwa", model.friendlyName());
        Assertions.assertEquals("ekqvkeln", model.filePath());
        Assertions.assertEquals(CommandLineSetting.DO_NOT_ALLOW, model.commandLineSetting());
        Assertions.assertEquals("xwyjsflhhc", model.commandLineArguments());
        Assertions.assertEquals(true, model.showInPortal());
        Assertions.assertEquals("jixisxyawjoyaqcs", model.iconPath());
        Assertions.assertEquals(2113030944, model.iconIndex());
        Assertions.assertEquals("kiidzyex", model.msixPackageFamilyName());
        Assertions.assertEquals("eli", model.msixPackageApplicationId());
        Assertions.assertEquals(RemoteApplicationType.IN_BUILT, model.applicationType());
    }
}
