Skip to content

Commit

Permalink
adjusted tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfgangroese committed Jun 19, 2023
1 parent 7bc4a0d commit efc333f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Orso.Arpa.Api/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,8 @@ private void RegisterServices(IServiceCollection services)
_ = services.AddScoped<IMyContactDetailService, MyContactDetailService>();
_ = services.AddScoped<IAddressService, AddressService>();
_ = services.AddScoped<IMyProjectService, MyProjectService>();
_ = services.AddScoped<INewsService, NewsService>();


_ = services.AddTransient(typeof(IPipelineBehavior<,>), typeof(DomainValidationBehavior<,>));
_ = services.AddTransient(typeof(IPipelineBehavior<,>), typeof(RequestPerformanceBehaviour<,>));
Expand Down
1 change: 1 addition & 0 deletions Orso.Arpa.Domain/Interfaces/IArpaContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public interface IArpaContext
DbSet<Room> Rooms { get; set; }
DbSet<AuditLog> AuditLogs { get; set; }
DbSet<Localization> Localizations { get; set; }
DbSet<News> News { get; set; }

DbSet<MusicianProfileDocument> MusicianProfileDocuments { get; set; }
DbSet<MusicianProfileDeactivation> MusicianProfileDeactivations { get; set; }
Expand Down
5 changes: 5 additions & 0 deletions Tests/Orso.Arpa.Api.Tests/IntegrationTests/Shared/TestSeed.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ internal static async Task SeedDataAsync(
await SeedAppointmentParticipationsAsync(arpaContext);
await SeedUrlAsync(arpaContext);
await SeedAuditLogAsync(arpaContext);
await SeedNewsAsync(arpaContext);

if (await arpaContext.SaveChangesAsync(default) <= 0)
{
Expand Down Expand Up @@ -101,6 +102,10 @@ private static async Task SeedAuditLogAsync(IArpaContext arpaContext)
{
await arpaContext.AuditLogs.AddRangeAsync(AuditLogSeedData.AuditLogs);
}
private static async Task SeedNewsAsync(IArpaContext arpaContext)
{
await arpaContext.News.AddRangeAsync(NewsSeedData.News);
}

private static async Task SeedUsersAsync(ArpaUserManager userManager, SignInManager<User> signInManager)
{
Expand Down

0 comments on commit efc333f

Please sign in to comment.