コード例 #1
0
        //protected override int GetTestParameterCount()
        //{
        //    return base.GetTestParameterCount();
        //}

        private string OprationString(CommandResultOperator InputOperation)
        {
            if (InputOperation == CommandResultOperator.Equal)
            {
                return(" == ");
            }
            else if (InputOperation == CommandResultOperator.NotEqual)
            {
                return(" != ");
            }
            else if (InputOperation == CommandResultOperator.Greater)
            {
                return(" > ");
            }
            else if (InputOperation == CommandResultOperator.GreaterOrEqual)
            {
                return(" >= ");
            }
            else if (InputOperation == CommandResultOperator.Less)
            {
                return(" < ");
            }
            else if (InputOperation == CommandResultOperator.LessOrEqual)
            {
                return(" <= ");
            }

            return("");
        }
コード例 #2
0
 private void SetCombo(ComboBox CB2Set, CommandResultOperator ResultOper)
 {
     if (ResultOper == CommandResultOperator.Equal)
     {
         CB2Set.SelectedIndex = 0;
     }
     else if (ResultOper == CommandResultOperator.NotEqual)
     {
         CB2Set.SelectedIndex = 1;
     }
     else if (ResultOper == CommandResultOperator.Greater)
     {
         CB2Set.SelectedIndex = 2;
     }
     else if (ResultOper == CommandResultOperator.GreaterOrEqual)
     {
         CB2Set.SelectedIndex = 3;
     }
     else if (ResultOper == CommandResultOperator.Less)
     {
         CB2Set.SelectedIndex = 4;
     }
     else if (ResultOper == CommandResultOperator.LessOrEqual)
     {
         CB2Set.SelectedIndex = 5;
     }
 }
コード例 #3
0
 private bool CheckOutput(byte ReceivedOutput, CommandResultOperator InputOperation, byte ExpectedResult)
 {
     if (InputOperation == CommandResultOperator.Equal)
     {
         if (ReceivedOutput == ExpectedResult)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     else if (InputOperation == CommandResultOperator.NotEqual)
     {
         if (ReceivedOutput != ExpectedResult)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     else if (InputOperation == CommandResultOperator.Greater)
     {
         if (ReceivedOutput > ExpectedResult)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     else if (InputOperation == CommandResultOperator.GreaterOrEqual)
     {
         if (ReceivedOutput >= ExpectedResult)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     else if (InputOperation == CommandResultOperator.Less)
     {
         if (ReceivedOutput < ExpectedResult)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     else if (InputOperation == CommandResultOperator.LessOrEqual)
     {
         if (ReceivedOutput <= ExpectedResult)
         {
             return(true);
         }
         else
         {
             return(false);
         }
     }
     return(false);
 }