Glossary
The terms the documentation uses.
Terms
| Term | Definition |
|---|---|
| Access | A call, read or write the code under test makes to a member. A double records calls in Calls, and reads and writes in Reads and Writes. |
| Answer | What a stub does when it matches, set with Returns or Do, or EachReturns and EachDo on a table. |
| Assembly definition, test assembly | A file that compiles the scripts in its folder into an assembly of their own. A test assembly is one that references the Test Framework. |
| Catch spy | A spy on the catch blocks the code under test enters with an exception type. Created with Spy.Catch<TException>(). |
| Compilation step | The part of Understudy that weaves your assemblies and reads the selections of test assemblies when Unity compiles scripts. |
| Content | The value one recorded read or write carried. |
| Declaration | A spy, stub, fake or Real a test creates. When several match an access, the last one declared decides. |
| Double | A spy, stub or fake, when the role doesn't matter. |
| Edit mode test, Play mode test | A test that runs in the Editor without entering Play mode, or one that runs in Play mode, where Unity runs frames. |
| Element | An item written with []: an array element or an indexer's value. |
| Entry point | The method of Spy, Stub, Fake or Real that names a kind of member: Method, Constructor, Field, Property, Indexer or Event. |
| Fake | A test double that replaces a member with a working in-memory stand-in: a stored value for a field or property, stored handlers for an event. Created with Fake. |
| Initial value | What a fake's stored value starts at in every test: its initial argument, a value or a factory. |
| Instance | The object a member is reached through. |
| Invocation | A raise of an event by the code under test, recorded in Invocations. |
| Leak | An access that ties a test to something outside it: a non-deterministic member or a global write the test didn't declare, or a real call to an overload of a member the test replaces. |
| Leak detection | The warnings about leaks. |
| Matcher | An argument or index that matches by rule: Arg.Any, Arg.That. |
| Member | A method, constructor, field, property, indexer, event or user-defined operator of a type. |
| Mock | No separate kind in Understudy: a stub replaces a member, and the test verifies calls through the
Calls, Reads and Writes any double records. |
| Narrow, broad | A selection that covers fewer accesses than another on the same member is narrower; one that covers more is broader. |
| Non-deterministic member | A member whose result differs between runs, machines or frames, declared with [NonDeterministic]. |
| Order | The sequence number of a recorded call, access, raise or catch, counted across every double in a test. |
| Real | A declaration that a member runs for real on purpose. It overrides the stubs and fakes declared before it, and leak detection doesn't warn about the accesses it covers. |
| Role | What a declaration does with a member: Spy, Stub, Fake or Real. |
| Selection | The lambda that names what a double or Real covers. |
| Spy | A test double that runs the real member and records what the code under test does with it. Created with Spy. |
| Stored value | What a field or property fake holds, read and written through Value. |
| Stub | A test double that replaces a member with answers your test sets, through Returns and Do. Created with Stub. |
| Table | The doubles of one member on every instance, one per instance, reached with the instance as its index. A selection whose lambda takes the instance as its parameter returns one. |
| Test double | Anything that stands in for a member during a test. |
| Test fixture | A class that holds tests. [SetUp] runs before each of its tests,
[OneTimeSetUp] once before all of them. |
| Woven | Code that Understudy rewrote so that tests can spy on, stub and fake its accesses. |