-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathICopyFuzzifyer.cs
90 lines (75 loc) · 3 KB
/
ICopyFuzzifyer.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
using System;
using System.Windows.Forms;
namespace CopyFuzz
{
/// <summary>
/// This interface should be implemented by an application that you want to run CopyFuzz on.
/// </summary>
public interface ICopyFuzzifyer
{
/// <summary>
/// The valid range of Y values that mouse actions such as clicks can be.
/// </summary>
/// <remarks>Such as the height of the screen.</remarks>
int MouseValidYRange { get; }
/// <summary>
/// The valid range of X values that mouse actions such as clicks can be.
/// </summary>
/// <remarks>Such as the width of the screen.</remarks>
int MouseValidXRange { get; }
/// <summary>
/// This is run before simulation begins.
/// </summary>
/// <remarks>Use this method to make the application fuzz testable by doing actions like turning animations off.</remarks>
void PreTest();
/// <summary>
/// Should open the applicationm in the state that you want it be tested in.
/// </summary>
void Launch();
/// <summary>
/// Simulates a mouse move input.
/// </summary>
/// <param name="e">Mouse event arguments.</param>
void SimulateMouseMove(MouseEventArgs e);
/// <summary>
/// Simulates a mouse click input.
/// </summary>
/// <param name="e">Mouse event arguments.</param>
void SimulateClickMouse(MouseEventArgs e);
/// <summary>
/// Simulates a mouse down input.
/// </summary>
/// <param name="e">Mouse event arguments.</param>
void SimulateMouseDown(MouseEventArgs e);
/// <summary>
/// Simulates a mouse up input.
/// </summary>
/// <param name="e">Mouse event arguments.</param>
void SimulateMouseUp(MouseEventArgs e);
/// <summary>
/// Simulates a key down input.
/// </summary>
/// <param name="e">Key event arguments.</param>
void SimulateSendKey(KeyEventArgs e);
/// <summary>
/// This event should be triggered every time a key is pressed.
/// </summary>
event Action<object, KeyEventArgs> KeyDownEvent;
/// <summary>
/// This event should be triggered every time the mouse is moved.
/// </summary>
event Action<object, MouseEventArgs> MouseMoveEvent;
/// <summary>
/// This event should be triggered every time a mouse button released.
/// </summary>
event Action<object, MouseEventArgs> MouseUpEvent;
/// <summary>
/// This event should be triggered every time a mouse button is pressed.
/// </summary>
event Action<object, MouseEventArgs> MouseDownEvent;
/// <summary>
/// This event should be triggered every time a mouse button is clicked.
/// </summary>
event Action<object, MouseEventArgs> MouseClickEvent;
}
}