示例#1
0
        public void ArmAusTest()
        {
            // arrange
            Kran  kran  = new Kran();
            Panel haken = new Panel();
            Panel arm   = new Panel();

            haken.Size     = new System.Drawing.Size(0, 0);
            haken.Location = new System.Drawing.Point(20, 20);
            arm.Size       = new System.Drawing.Size(50, 50);
            arm.Location   = new System.Drawing.Point(10, 10);

            // act
            kran.ArmAus(arm, haken);

            // assert
            Assert.AreEqual(10, haken.Location.X);
            Assert.AreEqual(20, haken.Location.Y);
            Assert.AreEqual(60, arm.Size.Width);
            Assert.AreEqual(50, arm.Size.Height);
            Assert.AreEqual(0, arm.Location.X);
            Assert.AreEqual(10, arm.Location.Y);
        }
示例#2
0
 private void Arm_Aus(object sender, EventArgs e)
 {
     kran.ArmAus(arm, haken);
 }