diff --git a/docs/site/docs/migrations/1to2.md b/docs/site/docs/migrations/1to2.md index 0555f58a2..29664ab7c 100644 --- a/docs/site/docs/migrations/1to2.md +++ b/docs/site/docs/migrations/1to2.md @@ -4,10 +4,10 @@ title: Migrating from 1.x to 2.x --- # Migrating from bUnit 1.x to 2.x -This document describes the changes made in bUnit 2.x that may affect existing tests written for bUnit 1.x. The old documentation for bUnit 1.x is available at: https://v1.bunit.dev. +This document describes the changes made in bUnit 2.x that may affect existing tests written for bUnit 1.x. The old documentation for bUnit 1.x is available at: https://v1.bunit.dev. ## One package to rule them all -`bunit.core` and `bunit.web` have be merged into a single package called `bunit`. The seperation was used to allow for extensibitlity, which isn't used anymore. Therefore `bunit.core` and `bunit.web` will stay on version 1.x, while `bunit` will be the only package going forward. To migrate, simply remove the `bunit.core` and `bunit.web` packages and add the `bunit` package. We don't expect many users to have used the `bunit.core` or `bunit.web` package directly, but may hit 3rd party packages that depend on them. +`bunit.core` and `bunit.web` have been merged into a single package called `bunit`. The separation was used to allow for extensibility, which isn't used anymore. Therefore `bunit.core` and `bunit.web` will stay on version 1.x, while `bunit` will be the only package going forward. To migrate, simply remove the `bunit.core` and `bunit.web` packages and add the `bunit` package. We don't expect many users to have used the `bunit.core` or `bunit.web` package directly, but may hit 3rd party packages that depend on them. ## `TestContext` renamed to `BunitContext` @@ -26,8 +26,8 @@ The `Fake` prefix used for various fake implementations has been renamed to `Bun * `FakeNavigationManager` to `BunitNavigationManager` * `FakeJSRuntime` to `BunitJSRuntime` * `FakeAuthenticationStateProvider` to `BunitAuthenticationStateProvider` - * `FakeAuthrozitationContext` to `BunitAuthorizationContext` - * `FakeuthorizationPolicyProvider` to `BunitAuthorizationPolicyProvider` + * `FakeAuthorizationContext` to `BunitAuthorizationContext` + * `FakeAuthorizationPolicyProvider` to `BunitAuthorizationPolicyProvider` ## Unified the `Render` methods In v1 there were multiple `RenderXXX`methods (like `RenderComponent`, `Render` and `SetParametersAndRender`) that were used to render components and markup. In v2, these methods have been unified into a single `Render` method that can handle both components and markup) via the simple `Render` method: @@ -89,7 +89,7 @@ The `DisposeComponents` method has been renamed to `DisposeComponentsAsync` and + await DisposeComponentsAsync(); ``` -## The `ComponentParameterFactory` and `ComponentParameter` has been removed +## The `ComponentParameterFactory` and `ComponentParameter` has been removed The `ComponentParameterFactory` class has been removed (and therefore the usage of `ComponentParameter`). Instead, use the `Render` method (and its overloads) to pass parameters to components.