From 7c1e566113d59699af1624186c64eca67f063fc6 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Mon, 20 Apr 2020 19:09:33 -0400 Subject: Upgraded Unity --- .../Documentation~/reference-icallbacks.md | 48 ---------------------- 1 file changed, 48 deletions(-) delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/Documentation~/reference-icallbacks.md (limited to 'Library/PackageCache/com.unity.test-framework@1.1.11/Documentation~/reference-icallbacks.md') diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/Documentation~/reference-icallbacks.md b/Library/PackageCache/com.unity.test-framework@1.1.11/Documentation~/reference-icallbacks.md deleted file mode 100644 index fb907e7..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/Documentation~/reference-icallbacks.md +++ /dev/null @@ -1,48 +0,0 @@ -# ICallbacks -An interface for receiving callbacks when running tests. All test runs invoke the callbacks until the next domain reload. - -The `RunStarted` method runs when the whole test run starts. Then the `TestStarted` method runs with information about the tests it is about to run on an assembly level. Afterward, it runs on a test fixture level and then on the individual test. If the test is a [parameterized test](./https://github.com/nunit/docs/wiki/Parameterized-Tests), then it is also invoked for each parameter combination. After each part of the test tree have completed running, the corresponding `TestFinished` method runs with the test result. At the end of the run, the `RunFinished` event runs with the test result. - -An extended version of the callback, [IErrorCallbacks](./reference-ierror-callbacks.md), extends this `ICallbacks` to receive calls when a run fails due to a build error. - -## Public methods - -| Syntax | Description | -| ---------------------------------------------- | ------------------------------------------------------------ | -| `void RunStarted(ITestAdaptor testsToRun)` | Invoked when the test run starts. The [ITestAdaptor](./reference-itest-adaptor.md) represents the tree of tests to run. | -| `void RunFinished(ITestResultAdaptor result)` | Invoked when the test run finishes. The [ITestResultAdaptor](./reference-itest-result-adaptor.md) represents the results of the set of tests that have run. | -| `void TestStarted(ITestAdaptor test)` | Invoked on each node of the test tree, as that part of the tree starts to run. | -| `void TestFinished(ITestResultAdaptor result)` | Invoked on each node of the test tree once that part of the test tree has finished running. The [ITestResultAdaptor](./reference-itest-result-adaptor.md) represents the results of the current node of the test tree. | - -## Example -An example that sets up a listener on the API. The listener prints the number of failed tests after the run has finished: -``` C# -public void SetupListeners() -{ - var api = ScriptableObject.CreateInstance(); - api.RegisterCallbacks(new MyCallbacks()); -} - -private class MyCallbacks : ICallbacks -{ - public void RunStarted(ITestAdaptor testsToRun) - { - - } - - public void RunFinished(ITestResultAdaptor result) - { - Debug.Log(string.Format("Run finished {0} test(s) failed.", result.FailCount)); - } - - public void TestStarted(ITestAdaptor test) - { - - } - - public void TestFinished(ITestResultAdaptor result) - { - - } -} -``` \ No newline at end of file -- cgit v1.2.3