Namespace UTSModule.Test.Command.SystemCommand
    Public Class CheckUtsPlatformExecutor
        Inherits TestCommandExecutor

        Private ReadOnly _isWin As String

        Sub New(command As TestCommand)
            MyBase.New(command)

            _isWin = command.Parameter(0)

            CommandReturn.LowerLimit = "True"

            CommandReturn.UpperLimit = "True"

            CommandReturn.RecordValue = String.Empty

            CommandReturn.ExecuteResultTipString = String.Empty

            CommandReturn.ExecuteResult = True
        End Sub

        Public Overrides Function Execute() As TestCommandReturn
            If String.Compare(_isWin, "False", True) = 0 Then
                CommandReturn.ExecuteResult = False
                CommandReturn.RecordValue = "False"
                CommandReturn.ExecuteResultTipString = "流程未允许在当前平台测试"
            ElseIf String.Compare(_isWin, "0", True) = 0 Then
                CommandReturn.ExecuteResult = False
                CommandReturn.RecordValue = "False"
                CommandReturn.ExecuteResultTipString = "流程未允许在当前平台测试"
            Else
                CommandReturn.ExecuteResult = True
                CommandReturn.RecordValue = "True"
                CommandReturn.ExecuteResultTipString = "当前平台测试允许测试"
            End If
            Return CommandReturn
        End Function

    End Class
End Namespace