Skip to content

Commit da14d46

Browse files
linkdotnetegil
authored andcommitted
docs: Fix links and formatting
1 parent da51e7c commit da14d46

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

docs/site/docs/test-doubles/mocking-localizer.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,15 @@ title: Mocking Localization via IStringLocalizer
44
---
55

66
<p>There are just two steps. First in your setup add the following:</p>
7+
78
```csharp
89
TestContext.Services.AddLocalization();
910
```
11+
1012
<p>Then in your test code, when you need the localized string to compare, you write the following:</p>
13+
1114
```csharp
1215
var localizer = ctx.Services.GetService<IStringLocalizer<SharedStrings>>();
13-
```
16+
```
17+
1418
<p>Where SharedStrings.cs (you can name this anything you want) that has the resource files such as `SharedStrings.en.resx`</p>

docs/site/docs/toc.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
## [Emulating IJSRuntime](xref:emulating-ijsruntime)
2626
## [Faking authorization](xref:faking-auth)
2727
## [Mocking HttpClient](xref:mocking-httpclient)
28+
## [Mocking Localizer](xref:mocking-localizer)
2829
## [Faking PersistentComponentState](xref:faking-persistentcomponentstate)
2930
## [Faking NavigationManager](xref:fake-navigation-manager)
3031
## [Faking IWebAssemblyHostEnvironment](xref:fake-webassemblyhostenvironment)

0 commit comments

Comments
 (0)