Skip to content

Commit

Permalink
fix: linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
rubuy-74 committed Nov 28, 2024
1 parent 024dae6 commit efd4b4e
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,16 @@ package pt.up.fe.ni.website.backend.service

import jakarta.mail.Session
import jakarta.mail.internet.MimeMessage
import java.io.File
import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.extension.ExtendWith
import org.mockito.ArgumentCaptor
import org.mockito.ArgumentMatchers.any
import org.mockito.Mockito
import org.mockito.Mockito.times
import org.mockito.Mockito.verify
import org.mockito.junit.jupiter.MockitoExtension
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.mail.javamail.JavaMailSender
import org.springframework.mail.javamail.MimeMessageHelper
import pt.up.fe.ni.website.backend.email.EmailBuilder
import pt.up.fe.ni.website.backend.email.SimpleEmailBuilder

Expand All @@ -40,8 +36,8 @@ class EmailServiceTest {

verify(mailSender, times(1)).createMimeMessage()

val argumentCaptor= ArgumentCaptor.forClass(MimeMessage::class.java)
verify(mailSender,times(1)).send(argumentCaptor.capture())
Assertions.assertEquals("subject",argumentCaptor.value.subject)
val argumentCaptor = ArgumentCaptor.forClass(MimeMessage::class.java)
verify(mailSender, times(1)).send(argumentCaptor.capture())
Assertions.assertEquals("subject", argumentCaptor.value.subject)
}
}

0 comments on commit efd4b4e

Please sign in to comment.