示例#1
0
 public void TestClose()
 {
     pt1.Open();
     Assert.AreEqual(true, pt1.IsOpen);
     pt1.Close();
     Assert.AreEqual(false, pt1.IsOpen);
 }
示例#2
0
 public void TestOpenandClose()
 {
     ppT.Close();
     Assert.IsFalse(ppT.IsOpen);
     ppT.Open();
     Assert.IsTrue(ppT.IsOpen);
 }
示例#3
0
 public void PrivTrainIsOpenMethods()
 {
     defaultPrivateTrain.Close();
     Assert.IsFalse(defaultPrivateTrain.IsOpen);
     defaultPrivateTrain.Open();
     Assert.IsTrue(defaultPrivateTrain.IsOpen);
 }
示例#4
0
 private void openOrClose_Click(object sender, EventArgs e)
 {
     if (computerTrain.IsOpen)
     {
         computerTrain.Close();
     }
     else
     {
         computerTrain.Open();
     }
 }