public void KranEinTest() { // arrange Kran kran = new Kran(); Panel haken = new Panel(); haken.Size = new System.Drawing.Size(0, 0); haken.Location = new System.Drawing.Point(20, 20); Panel arm = new Panel(); arm.Size = new System.Drawing.Size(50, 50); arm.Location = new System.Drawing.Point(10, 10); Panel basi = new Panel(); basi.Size = new System.Drawing.Size(50, 50); basi.Location = new System.Drawing.Point(50, 50); Panel high = new Panel(); high.Size = new System.Drawing.Size(100, 10); high.Location = new System.Drawing.Point(10, 10); // act kran.KranEin(basi, arm, haken, high); // assert Assert.AreEqual(20, haken.Location.X); Assert.AreEqual(30, haken.Location.Y); Assert.AreEqual(10, arm.Location.X); Assert.AreEqual(20, arm.Location.Y); Assert.AreEqual(50, basi.Location.X); Assert.AreEqual(50, basi.Location.Y); Assert.AreEqual(10, high.Location.X); Assert.AreEqual(20, high.Location.Y); Assert.AreEqual(0, high.Height); Assert.AreEqual(100, high.Width); }
private void Kran_Ein(object sender, EventArgs e) { kran.KranEin(basi, arm, haken, high); }