From c55fba8ab2a1c9d3df65eda4a5a1e957f4aa1f78 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Sun, 19 Apr 2020 17:19:32 -0400 Subject: Inital commit --- .../reference-attribute-testmustexpectalllogs.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/Documentation~/reference-attribute-testmustexpectalllogs.md (limited to 'Library/PackageCache/com.unity.test-framework@1.1.11/Documentation~/reference-attribute-testmustexpectalllogs.md') diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/Documentation~/reference-attribute-testmustexpectalllogs.md b/Library/PackageCache/com.unity.test-framework@1.1.11/Documentation~/reference-attribute-testmustexpectalllogs.md new file mode 100644 index 0000000..210cc10 --- /dev/null +++ b/Library/PackageCache/com.unity.test-framework@1.1.11/Documentation~/reference-attribute-testmustexpectalllogs.md @@ -0,0 +1,11 @@ +# TestMustExpectAllLogs attribute + +The presence of this attribute causes the **Test Runner** to expect every single log. By default, the Test Runner only fails on error logs, but `TestMustExpectAllLogs` fails on warnings and info level messages as well. It is the same as calling the method [LogAssert.NoUnexpectedReceived](./reference-custom-assertion.md#static-methods) at the bottom of every affected test. + +## Assembly-wide usage + +You can apply this attribute to test assemblies (that affects every test in the assembly), fixtures (affects every test in the fixture), or on individual test methods. It is also inherited from base fixtures. + +The `MustExpect` property (`true` by default) lets you enable or disable the higher level value. + +For example when migrating an assembly to this more strict checking method, you might attach `[assembly:TestMustExpectAllLogs]` to the assembly itself, but then whitelist failing fixtures and test methods with `[TestMustExpectAllLogs(MustExpect=false)]` until you have migrated them. This also means new tests in that assembly would have the more strict checking. \ No newline at end of file -- cgit v1.2.3