-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtodo
56 lines (38 loc) · 1.68 KB
/
todo
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
- Debug output should be more descriptive and readable, Raw debug data available
via verbose flag.
- Normalize arguments. Should be able to reasonably define a method with or
without named arguments, and invoke it as named or positional. See
how the engines do it.
- add invocation record for both pattern and literal that were executed. This
should allow verification of either.
- mock should create a light-weight, "fast" (empty) mock, a type safe mock, and
a partial mock (or spy).
-- do not alter meta data, instead, set property.
maybe need to proxy the onmissing method to new empty object and pass that
around and not the MightyMock. Maybe need to delegate all request to some
type of filter or Filter Interceptor. May be mo' better than just
onMissingMethod. Maybe the mock itself is a component with various collections
of properties: name, type, registered behaviours, invocation records, etc.
- mock should record all invocations and store literal parameters
- verifying by pattern should also be possible
e.g.,
register:
mock.foo(1,2).returns();
mock.foo(4,5).return();
actual exec:
mock.foo(1,2);
mock.foo(1,2);
mock.foo(4,5);
verify:
mock.verifyTimes(3).foo('{numeric}','{numeric}');
And vice versa:
mock..foo('{numeric}','{numeric}').returns();
actual exec:
mock.foo(1,2);
mock.foo(1,2);
mock.foo(4,5);
verify:
mock.verifyTimes(2).foo(1,2);
mock.verifyTimes(1).foo(4,5);
- DONE -verbose . maybe should persist actual literal arguments in addition to hash
-