diff --git a/docs/architecture/maui/unit-testing.md b/docs/architecture/maui/unit-testing.md index 61155806cee70..fbfffa6a40239 100644 --- a/docs/architecture/maui/unit-testing.md +++ b/docs/architecture/maui/unit-testing.md @@ -12,7 +12,7 @@ ms.date: 05/30/2024 Multi-platform apps experience problems similar to both desktop and web-based applications. Mobile users will differ by their devices, network connectivity, availability of services, and various other factors. Therefore, multi-platform apps should be tested as they would be used in the real world to improve their quality, reliability, and performance. Many types of testing should be performed on an app, including unit testing, integration testing, and user interface testing. Unit testing is the most common form and essential to building high-quality applications. -A unit test takes a small unit of the app, typically a method, isolates it from the remainder of the code, and verifies that it behaves as expected. Its goal is to check that each unit of functionality performs as expected, so errors don't propagate throughout the app. Detecting a bug where it occurs is more efficient that observing the effect of a bug indirectly at a secondary point of failure. +A unit test takes a small unit of the app, typically a method, isolates it from the remainder of the code, and verifies that it behaves as expected. Its goal is to check that each unit of functionality performs as expected, so errors don't propagate throughout the app. Detecting a bug where it occurs is more efficient than observing the effect of a bug indirectly at a secondary point of failure. Unit testing has the most significant effect on code quality when it's an integral part of the software development workflow. Unit tests can act as design documentation and functional specifications for an application. As soon as a method has been written, unit tests should be written that verify the method's behavior in response to standard, boundary, and incorrect input data cases and check any explicit or implicit assumptions made by the code. Alternatively, with test-driven development, unit tests are written before the code. For more information on test-driven development and how to implement it, see [Walkthrough: Test-driven development using Test Explorer.](/visualstudio/test/quick-start-test-driven-development-with-test-explorer) @@ -66,7 +66,7 @@ The eShop multi-platform app uses [MSTest](../../core/testing/unit-testing-with- | Testing Type | Attribute | Description | |-----------------|--------------|--------------------------------------------------------------| -| TestMethod | `TestMethod` | Defines the actual test method to run.. | +| TestMethod | `TestMethod` | Defines the actual test method to run. | | DataSource | `DataSource` | Tests that are only true for a particular set of data. | The unit tests included with the eShop multi-platform app are TestMethod, so each unit test method is decorated with the `TestMethod` attribute. In addition to MSTest there are several other testing frameworks available including [NUnit](../../core/testing/unit-testing-with-nunit.md) and [xUnit](../../core/testing/unit-testing-with-dotnet-test.md).