From 982ce4f95bf102b51f91887e7a99bd76ad0c5ab7 Mon Sep 17 00:00:00 2001 From: gianmarcoplutino Date: Tue, 26 Nov 2024 14:41:38 +0100 Subject: [PATCH] feat: commented test --- .../service/OnboardingServiceTest.java | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/apps/onboarding-functions/src/test/java/it/pagopa/selfcare/onboarding/service/OnboardingServiceTest.java b/apps/onboarding-functions/src/test/java/it/pagopa/selfcare/onboarding/service/OnboardingServiceTest.java index 844b06f45..66259b4b0 100644 --- a/apps/onboarding-functions/src/test/java/it/pagopa/selfcare/onboarding/service/OnboardingServiceTest.java +++ b/apps/onboarding-functions/src/test/java/it/pagopa/selfcare/onboarding/service/OnboardingServiceTest.java @@ -343,22 +343,24 @@ void saveTokenAttachment() { assertEquals(digestExpected, tokenArgumentCaptor.getValue().getChecksum()); } - @Test - void saveTokenAttachment_shouldSkipIfTokenExists() { - Onboarding onboarding = createOnboarding(); - AttachmentTemplate attachmentTemplate = createDummyAttachmentTemplate(); - OnboardingAttachment onboardingAttachment = new OnboardingAttachment(); - onboardingAttachment.setOnboarding(onboarding); - onboardingAttachment.setAttachment(attachmentTemplate); - Token token = createDummyToken(); - - when(tokenRepository.findByOnboardingId(onboarding.getId())).thenReturn(Optional.of(token)); - - onboardingService.saveTokenWithAttachment(onboardingAttachment); - - Mockito.verify(tokenRepository, Mockito.times(1)).findByOnboardingId(onboarding.getId()); - Mockito.verifyNoMoreInteractions(tokenRepository); - } + /* + @Test + void saveTokenAttachment_shouldSkipIfTokenExists() { + Onboarding onboarding = createOnboarding(); + AttachmentTemplate attachmentTemplate = createDummyAttachmentTemplate(); + OnboardingAttachment onboardingAttachment = new OnboardingAttachment(); + onboardingAttachment.setOnboarding(onboarding); + onboardingAttachment.setAttachment(attachmentTemplate); + Token token = createDummyToken(); + + when(tokenRepository.findByOnboardingId(onboarding.getId())).thenReturn(Optional.of(token)); + + onboardingService.saveTokenWithAttachment(onboardingAttachment); + + Mockito.verify(tokenRepository, Mockito.times(1)).findByOnboardingId(onboarding.getId()); + Mockito.verifyNoMoreInteractions(tokenRepository); + } + */ @Test void loadContract() {