-
Notifications
You must be signed in to change notification settings - Fork 3
/
README
46 lines (30 loc) · 1.58 KB
/
README
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
mmockito - MATLAB mock framework based on Java Mockito
The latest version can always be downloaded from Github:
https://github.com/vperic/mmockito
The project mailing list can be found on Google Groups:
https://groups.google.com/forum/#!forum/mmockito
mmockito is distributed under the BSD license. All contributions are
welcome!
Issues can be reported on the projects' Github page; code should also be
submitted as pull requests. Pull requests should include the
necessary tests; tests should be passing at all times.
Usage
=====
The 'mmockito' directory should be added to MATLAB's path; it contains the most
used classes. The main functionality is provided by the "Mock" class, which
supports both stubbing and verification. In-order verification is provided by
the "InOrder" class. The "Matcher" class is an interface for specifying
argument matchers, "Any", "ArgThat" and "AnyArgs" are commonly used matchers.
Some further matchers are provided in the mmockito.matchers package. The
mmockito.internal package has internal class which should not be used by
end-users.
For more detailed information consult the help files of individual classes.
More documentation, including a detailed overview of features and
comparison to Java Mockito, are available in my bachelor's thesis:
http://cyber.felk.cvut.cz/research/theses/detail.phtml?id=407
Tests
=====
To run tests, use the runtests function, which returns a TestResult object:
r = runtests('all');
Other options are 'acceptance', 'unit', or the exact name of a unit test file.
MATLAB 2013a or higher is required to run the tests.