Skip to content

Commit

Permalink
Implemented requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
DeFi3298 committed Dec 12, 2024
1 parent c424e91 commit f5c2ca2
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ import { PersonalNummerForPersonWithTrailingSpaceError } from '../domain/persona
import { Personenkontext } from '../../personenkontext/domain/personenkontext.js';
import { PersonID } from '../../../shared/types/aggregate-ids.types.js';
import { UserLock } from '../../keycloak-administration/domain/user-lock.js';
import { ClassLogger } from '../../../core/logging/class-logger.js';
import { DownstreamKeycloakError } from '../domain/person-keycloak.error.js';

describe('PersonRepository Integration', () => {
Expand Down Expand Up @@ -115,10 +114,6 @@ describe('PersonRepository Integration', () => {
provide: KeycloakUserService,
useValue: createMock<KeycloakUserService>(),
},
{
provide: ClassLogger,
useValue: createMock<ClassLogger>(),
},
// the following are required to prepare the test for findByIds()
OrganisationRepository,
ServiceProviderRepo,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
DatabaseTestModule,
DoFactory,
KeycloakConfigTestModule,
LoggingTestModule,
MapperTestModule,
} from '../../../../test/utils/index.js';
import { GlobalValidationPipe } from '../../../shared/validation/index.js';
Expand Down Expand Up @@ -42,7 +43,6 @@ import { DuplicatePersonalnummerError } from '../../../shared/error/duplicate-pe
import { PersonenkontexteUpdateError } from '../domain/error/personenkontexte-update.error.js';
import { generatePassword } from '../../../shared/util/password-generator.js';
import { StepUpGuard } from '../../authentication/api/steup-up.guard.js';
import { ClassLogger } from '../../../core/logging/class-logger.js';

function createRolle(this: void, rolleFactory: RolleFactory, params: Partial<Rolle<boolean>> = {}): Rolle<false> {
const rolle: Rolle<false> | DomainError = rolleFactory.createNew(
Expand Down Expand Up @@ -83,6 +83,7 @@ describe('DbiamPersonenkontextWorkflowController Integration Test', () => {
DatabaseTestModule.forRoot({ isDatabaseRequired: true }),
PersonenKontextApiModule,
KeycloakAdministrationModule,
LoggingTestModule,
],
providers: [
{
Expand All @@ -93,10 +94,6 @@ describe('DbiamPersonenkontextWorkflowController Integration Test', () => {
provide: PersonPermissionsRepo,
useValue: createMock<PersonPermissionsRepo>(),
},
{
provide: ClassLogger,
useValue: createMock<ClassLogger>(),
},
{
provide: APP_INTERCEPTOR,
useValue: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { faker } from '@faker-js/faker';
import { Test, TestingModule } from '@nestjs/testing';
import { DoFactory, MapperTestModule } from '../../../../test/utils/index.js';
import { DoFactory, LoggingTestModule, MapperTestModule } from '../../../../test/utils/index.js';
import { Rolle } from '../../rolle/domain/rolle.js';
import { RollenArt } from '../../rolle/domain/rolle.enums.js';
import { PersonPermissionsRepo } from '../../authentication/domain/person-permission.repo.js';
Expand All @@ -19,7 +19,6 @@ import { DbiamPersonenkontextWorkflowController } from './dbiam-personenkontext-
import { PersonenkontextWorkflowResponse } from './response/dbiam-personenkontext-workflow-response.js';
import { PersonenkontextCreationService } from '../domain/personenkontext-creation.service.js';
import { DbiamUpdatePersonenkontexteQueryParams } from './param/dbiam-update-personenkontexte.query.params.js';
import { ClassLogger } from '../../../core/logging/class-logger.js';

describe('DbiamPersonenkontextWorkflowController Test', () => {
let module: TestingModule;
Expand All @@ -29,7 +28,7 @@ describe('DbiamPersonenkontextWorkflowController Test', () => {

beforeAll(async () => {
module = await Test.createTestingModule({
imports: [MapperTestModule],
imports: [MapperTestModule, LoggingTestModule],
providers: [
DbiamPersonenkontextWorkflowController,
{
Expand All @@ -48,10 +47,6 @@ describe('DbiamPersonenkontextWorkflowController Test', () => {
provide: PersonenkontextCreationService,
useValue: createMock<PersonenkontextCreationService>(),
},
{
provide: ClassLogger,
useValue: createMock<ClassLogger>(),
},
],
}).compile();
sut = module.get(DbiamPersonenkontextWorkflowController);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { OrganisationRepository } from '../../organisation/persistence/organisat
import { EventService } from '../../../core/eventbus/index.js';
import { EmailRepo } from '../../email/persistence/email.repo.js';
import { Organisation } from '../../organisation/domain/organisation.js';
import { ClassLogger } from '../../../core/logging/class-logger.js';
import { LoggingModule } from '../../../shared/logging/logging.module.js';

function createPersonenkontext<WasPersisted extends boolean>(
this: void,
Expand Down Expand Up @@ -70,6 +70,7 @@ describe('PersonenkontextSpecifications Integration', () => {
DatabaseTestModule.forRoot({ isDatabaseRequired: true }),
KeycloakAdministrationModule,
MapperTestModule,
LoggingModule,
],
providers: [
PersonRepository,
Expand Down Expand Up @@ -100,10 +101,6 @@ describe('PersonenkontextSpecifications Integration', () => {
provide: RolleRepo,
useValue: createMock<RolleRepo>(),
},
{
provide: ClassLogger,
useValue: createMock<ClassLogger>(),
},
],
})
.overrideModule(KeycloakConfigModule)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import { PrivacyIdeaAdministrationController } from './privacy-idea-administrati
import { PrivacyIdeaAdministrationService } from './privacy-idea-administration.service.js';
import { AssignTokenResponse, PrivacyIdeaToken, ResetTokenResponse } from './privacy-idea-api.types.js';
import { TokenStateResponse } from './token-state.response.js';
import { ClassLogger } from '../../core/logging/class-logger.js';
import { SoftwareTokenInitializationError } from './api/error/software-token-initialization.error.js';
import { LoggingTestModule } from '../../../test/utils/logging-test.module.js';

Expand Down Expand Up @@ -54,10 +53,6 @@ describe('PrivacyIdeaAdministrationController', () => {
provide: PersonRepository,
useValue: createMock<PersonRepository>(),
},
{
provide: ClassLogger,
useValue: createMock<ClassLogger>(),
},
],
}).compile();

Expand Down

0 comments on commit f5c2ca2

Please sign in to comment.