Add validation to RealmCreate
This commit is contained in:
parent
09480eb1e4
commit
ddbb1f42d7
16 changed files with 326 additions and 23 deletions
24
IdentityShroud.Api.Tests/Fixtures/ApplicationFactory.cs
Normal file
24
IdentityShroud.Api.Tests/Fixtures/ApplicationFactory.cs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
using IdentityShroud.Core.Services;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.AspNetCore.Mvc.Testing;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.VisualStudio.TestPlatform.TestHost;
|
||||
|
||||
namespace IdentityShroud.Core.Tests.Fixtures;
|
||||
|
||||
public class ApplicationFactory : WebApplicationFactory<Program>
|
||||
{
|
||||
public IRealmService RealmService { get; } = Substitute.For<IRealmService>();
|
||||
|
||||
protected override void ConfigureWebHost(IWebHostBuilder builder)
|
||||
{
|
||||
base.ConfigureWebHost(builder);
|
||||
|
||||
builder.ConfigureServices(services =>
|
||||
{
|
||||
services.AddScoped<IRealmService>(c => RealmService);
|
||||
});
|
||||
|
||||
builder.UseEnvironment("Development");
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue