-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix multiple registrations of basic services.
- Loading branch information
Ronny Birkeli
committed
May 22, 2023
1 parent
9dc2fda
commit 22aeff2
Showing
3 changed files
with
49 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
test/Altinn.Codelists.Tests/SSB/Extensions/ExtensionTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
using Altinn.Codelists.SSB; | ||
using Altinn.Codelists.SSB.Extensions; | ||
using Altinn.Codelists.SSB.Models; | ||
using Microsoft.Extensions.DependencyInjection; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Altinn.Codelists.Tests.SSB.Extensions | ||
{ | ||
public class ExtensionTests | ||
{ | ||
[Fact] | ||
public void AddSSBClassifications() | ||
{ | ||
IServiceCollection services = new ServiceCollection(); | ||
services.AddSSBClassificationCodelistProvider("sivilstand", Classification.MaritalStatus); | ||
services.AddSSBClassificationCodelistProvider("yrker", Classification.Occupations); | ||
|
||
IServiceProvider serviceProvider = services.BuildServiceProvider(); | ||
|
||
services.Select(x => x.ServiceType == typeof(IClassificationsClient)).Should().HaveCount(2); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters