public void DisconnectDataTest() { RTD target = new RTD(); // TODO: Initialize to an appropriate value int topicId = 0; // TODO: Initialize to an appropriate value target.DisconnectData(topicId); Assert.Inconclusive("A method that does not return a value cannot be verified."); }
public void HeartbeatTest() { RTD target = new RTD(); // TODO: Initialize to an appropriate value int expected = 0; // TODO: Initialize to an appropriate value int actual; actual = target.Heartbeat(); Assert.AreEqual(expected, actual); Assert.Inconclusive("Verify the correctness of this test method."); }
private void easyButton1_Click(object sender, EventArgs e) { value = (double)numericUpDown_value.Value; for (int i = 0; i < values.Length; i++) { values[i] = value; } double[] res; switch (comboBox1.SelectedItem.ToString()) { case "位移传感器": numericUpDown_result.Value = (decimal)DisplacementSensor.Convert(value, (double)numericUpDown_maxDisp.Value, (double)numericUpDown_maxR.Value, (double)numericUpDown_minR.Value); res = DisplacementSensor.Convert(values, (double)numericUpDown_maxDisp.Value, (double)numericUpDown_maxR.Value, (double)numericUpDown_minR.Value); easyChartX1.Plot(res); break; case "荷重传感器": numericUpDown_result.Value = (decimal)LoadCell.Convert(value, (double)numericUpDown_sensitivity.Value, (double)numericUpDown_maxLoad.Value, (double)numericUpDown_excitationVolt.Value); res = LoadCell.Convert(values, (double)numericUpDown_sensitivity.Value, (double)numericUpDown_maxLoad.Value, (double)numericUpDown_excitationVolt.Value); easyChartX1.Plot(res); break; case "热电阻RTD_PT100": numericUpDown_result.Value = (decimal)RTD.Convert(value); res = RTD.Convert(values); easyChartX1.Plot(res); break; case "热敏电阻Thermistor": numericUpDown_result.Value = (decimal)Thermistor.Convert(value, (double)numericUpDown_resistorRT.Value, (double)numericUpDown_beta.Value); res = Thermistor.Convert(values, (double)numericUpDown_resistorRT.Value, (double)numericUpDown_beta.Value); easyChartX1.Plot(res); break; case "热电偶Thermocouple": numericUpDown_result.Value = (decimal)Thermocouple.Convert((ThermocoupleType)Enum.Parse(typeof(ThermocoupleType), comboBox2.Text), value, checkBox_cjcEnable.Checked, (double)numericUpDown_cjcTemperature.Value); res = Thermocouple.Convert((ThermocoupleType)Enum.Parse(typeof(ThermocoupleType), comboBox2.Text), values, checkBox_cjcEnable.Checked, (double)numericUpDown_cjcTemperature.Value); easyChartX1.Plot(res); break; default: break; } }
public void ConnectDataTest() { RTD target = new RTD(); // TODO: Initialize to an appropriate value int topicId = 0; // TODO: Initialize to an appropriate value Object[] topics = new Object[6]; topics[0] = "127.0.0.1"; topics[1] = "1"; topics[2] = "N"; topics[3] = "4849"; topics[4] = "1"; topics[5] = "2000"; bool getNewValues = false; // TODO: Initialize to an appropriate value bool getNewValuesExpected = true; // TODO: Initialize to an appropriate value object actual; actual = target.ConnectData(topicId, ref topics, ref getNewValues); Assert.AreEqual(getNewValuesExpected, getNewValues); }
public void ModbusScanTest() { RTD target = new RTD(); // TODO: Initialize to an appropriate value // add event args back later target.ModbusScan(); Assert.Inconclusive("A method that does not return a value cannot be verified."); }
public void ServerTerminateTest() { RTD target = new RTD(); // TODO: Initialize to an appropriate value target.ServerTerminate(); Assert.Inconclusive("A method that does not return a value cannot be verified."); }
public void ServerStartTest() { RTD target = new RTD(); // TODO: Initialize to an appropriate value IRTDUpdateEvent callbackObject = null; // TODO: Initialize to an appropriate value int expected = 0; // TODO: Initialize to an appropriate value int actual; actual = target.ServerStart(callbackObject); Assert.AreEqual(expected, actual); Assert.Inconclusive("Verify the correctness of this test method."); }
public void RTDConstructorTest() { RTD target = new RTD(); target.ToString(); Assert.AreEqual(target.ToString(),"ModbusExcel.RTD"); }
public void RefreshDataTest() { RTD target = new RTD(); // TODO: Initialize to an appropriate value int topicCount = 0; // TODO: Initialize to an appropriate value int topicCountExpected = 0; // TODO: Initialize to an appropriate value object[,] expected = null; // TODO: Initialize to an appropriate value object[,] actual; actual = target.RefreshData(ref topicCount); Assert.AreEqual(topicCountExpected, topicCount); Assert.AreEqual(expected, actual); Assert.Inconclusive("Verify the correctness of this test method."); }
static void Main(string[] args) { bool loop = true; do { Console.Title = $"The Game - Current Wins: {totalWins}"; Console.WriteLine($"Welcome to the GAME\nSelect an item below\n--------------------------\n" + $" - 1. Guess a number\n" + $" - 2. Rock Paper Scissors\n" + $" - 3. 200 IQ Super Quiz\n" + $" - 4. Random Math Questions\n" + $" - 5. \n" + $" - 6. \n" + $" - 7. \n" + $" - 8. Roll The Dice\n" + $" - 9. Heads or Tails\n" + $" - 0. Exit"); try { int input = Convert.ToInt32(Console.ReadLine()); switch (input) { case 1: Console.Clear(); GuessNumber.GuessingGame(); break; case 2: Console.Clear(); RockPaperScissor.RockPaperScissors(); break; case 3: Console.Clear(); Quiz.The200IQSuperQuiz(); break; case 4: Console.Clear(); Mg.MathGame(); break; case 5: Console.Clear(); //none yet break; case 6: Console.Clear(); //none yet break; case 7: Console.Clear(); //none yet break; case 8: Console.Clear(); RTD.RollTheDice(); break; case 9: CoinFlips.CoinFlip(); Console.Clear(); break; case 0: loop = false; break; default: Console.Clear(); break; } } catch (FormatException) { Console.Clear(); Console.WriteLine("Input has to be a number.\n"); } } while (loop); }