using Microsoft.VisualStudio.TestTools.UnitTesting; using System; using clicker; namespace TestClicker { [TestClass] public class ButtonTest { MainWindow page = new MainWindow(); [TestMethod] public void TestB1() { long point = 250; int click = 1; double result = point - 100 + click + 3; Assert.AreEqual(result, page.B1_Click_Update(ref point, ref click)); } [TestMethod] public void TestB2() { long point = 500; int click = 1; double result = point - 250 + click + 5; Assert.AreEqual(result, page.B2_Click_Update(ref point, ref click)); } [TestMethod] public void TestB3() { long point = 1000; int click = 1; double result = point - 500 + click + 7; Assert.AreEqual(result, page.B3_Click_Update(ref point, ref click)); } [TestMethod] public void TestB4() { long point = 2000; int click = 1312; double result = point - 1000 + click + 12; Assert.AreEqual(result, page.B4_Click_Update(ref point, ref click)); } } [TestClass] public class ImageTest { MainWindow page = new MainWindow(); [TestMethod] public void TestImage1() { long point = 80; int click = 1; double result = point + click; Assert.AreEqual(result, page.MouseDownd_Update(ref point, ref click)); } } }