节点在线、应用在线、配置在线使用令牌查询
大石头 authored at 2021-12-16 19:49:30
553.00 B
Stardust
using System.ComponentModel;
using StarAgent;
using Xunit;

namespace Stardust.Tests;

/// <summary>电源命令参数构造测试</summary>
public class PowerCommandsTests
{
    [Fact]
    [DisplayName("Windows重启命令必须一次携带强制参数")]
    public void GetWindowsRebootArgs_AlwaysForce()
    {
        Assert.Equal("-r -f -t 0", PowerCommands.GetWindowsRebootArgs(0));
        Assert.Equal("-r -f -t 30", PowerCommands.GetWindowsRebootArgs(30));
        Assert.Equal("-r -f -t 0", PowerCommands.GetWindowsRebootArgs(-1));
    }
}