1010using Riber . Infrastructure . Persistence . Identity ;
1111using Riber . Api . Tests ;
1212using Riber . Api . Tests . Fixtures ;
13+ using Riber . Infrastructure . Services . Authentication ;
1314
1415namespace Riber . Infrastructure . Tests . Services . Authentication ;
1516
1617public sealed class PermissionDataServiceTests (
17- WebAppFixture webAppFixture ,
18+ WebAppFixture webAppFixture ,
1819 DatabaseFixture databaseFixture )
1920 : IntegrationTestBase ( webAppFixture , databaseFixture )
2021{
@@ -104,7 +105,7 @@ public async Task UpdatePermissionStatusAsync_WhenPermissionExists_ShouldToggleI
104105
105106 // Assert
106107 result . IsSuccess . Should ( ) . BeTrue ( ) ;
107-
108+
108109 var updatedPermission = await context . Set < ApplicationPermission > ( )
109110 . FirstAsync ( p => p . Name == permission . Name ) ;
110111 updatedPermission . IsActive . Should ( ) . BeTrue ( ) ;
@@ -155,8 +156,8 @@ public async Task GetAllWithDescriptionsAsync_WhenCalled_ShouldReturnAllPermissi
155156
156157 #region Helper Methods
157158
158- private IPermissionDataService CreatePermissionService ( AppDbContext context )
159- => new Infrastructure . Services . Authentication . PermissionDataService ( context , _mockMemoryCache . Object ) ;
159+ private PermissionDataService CreatePermissionService ( AppDbContext context )
160+ => new ( context , _mockMemoryCache . Object ) ;
160161
161162 private ApplicationPermission CreatePermission ( string name , bool isActive = true )
162163 => new ( )
@@ -169,16 +170,18 @@ private ApplicationPermission CreatePermission(string name, bool isActive = true
169170 } ;
170171
171172 private List < ApplicationPermission > CreatePermissions ( int count )
172- => Enumerable . Range ( 1 , count )
173- . Select ( i => new ApplicationPermission
174- {
175- Id = _faker . Random . UInt ( ) ,
176- Name = $ "permission-{ i } ",
177- Description = _faker . Random . String2 ( 10 ) ,
178- IsActive = _faker . Random . Bool ( ) ,
179- Category = "test"
180- } )
181- . ToList ( ) ;
173+ =>
174+ [
175+ .. Enumerable . Range ( 1 , count )
176+ . Select ( i => new ApplicationPermission
177+ {
178+ Id = _faker . Random . UInt ( ) ,
179+ Name = $ "permission-{ i } ",
180+ Description = _faker . Random . String2 ( 10 ) ,
181+ IsActive = _faker . Random . Bool ( ) ,
182+ Category = "test"
183+ } )
184+ ] ;
182185
183186 private void SetupCacheMiss ( )
184187 {
0 commit comments