public void InvokeMultipleTimes() { MultipleInvokeTester control = new MultipleInvokeTester(); ConstructorInfo info = typeof(TestClass).GetConstructor(new Type[] { }); control.Initialize(info); control.InvokeCount = 10; control.OnCreateClick(null, null); Assert.AreEqual(10, control.invoked); }
public void InvokeMultipleTimes() { MultipleInvokeTester control = new MultipleInvokeTester(); MethodInfo info = typeof(TestClass).GetMethod("PublicStaticVoid", new Type[] { }); control.Initialize(info); control.InvokeCount = 18; control.buttonCall_Click(null, null); Assert.AreEqual(18, control.invoked); }
public void InvokeReadMultipleTimes() { MultipleInvokeTester control = new MultipleInvokeTester(); control.Show(); FieldInfo info = typeof(TestClass).GetField("public_static_field"); control.Initialize(info); control.InvokeCount = 8; control.buttonRead_Click(null, null); Assert.AreEqual(9, control.invoked); }