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

public final class StartMenuItemInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        StartMenuItemInner model =
            BinaryData
                .fromString(
                    "{\"properties\":{\"appAlias\":\"us\",\"filePath\":\"slhs\",\"commandLineArguments\":\"deemao\",\"iconPath\":\"xagkvtmelmqkrh\",\"iconIndex\":1107885702},\"id\":\"ljuahaquhcdh\",\"name\":\"duala\",\"type\":\"xqpvfadmw\"}")
                .toObject(StartMenuItemInner.class);
        Assertions.assertEquals("us", model.appAlias());
        Assertions.assertEquals("slhs", model.filePath());
        Assertions.assertEquals("deemao", model.commandLineArguments());
        Assertions.assertEquals("xagkvtmelmqkrh", model.iconPath());
        Assertions.assertEquals(1107885702, model.iconIndex());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        StartMenuItemInner model =
            new StartMenuItemInner()
                .withAppAlias("us")
                .withFilePath("slhs")
                .withCommandLineArguments("deemao")
                .withIconPath("xagkvtmelmqkrh")
                .withIconIndex(1107885702);
        model = BinaryData.fromObject(model).toObject(StartMenuItemInner.class);
        Assertions.assertEquals("us", model.appAlias());
        Assertions.assertEquals("slhs", model.filePath());
        Assertions.assertEquals("deemao", model.commandLineArguments());
        Assertions.assertEquals("xagkvtmelmqkrh", model.iconPath());
        Assertions.assertEquals(1107885702, model.iconIndex());
    }
}
