Browse Source

deleted redundant mocks

pull/9097/head
dashevchenko 3 years ago
parent
commit
9b8a48dc96
  1. 7
      application/src/test/java/org/thingsboard/server/service/mail/TbMailSenderTest.java

7
application/src/test/java/org/thingsboard/server/service/mail/TbMailSenderTest.java

@ -50,9 +50,6 @@ public class TbMailSenderTest {
List<MimeMessage> mimeMessages = new ArrayList<>(1);
mimeMessages.add(mimeMsg);
Mockito.doNothing().when(tbMailSender).updateOauth2PasswordIfExpired();
Mockito.doNothing().when(tbMailSender).doSendSuper(any(), any());
willCallRealMethod().given(tbMailSender).doSend(any(), any());
tbMailSender.doSend(mimeMessages.toArray(new MimeMessage[0]), null);
@ -62,9 +59,6 @@ public class TbMailSenderTest {
@Test
public void testTestConnection() throws MessagingException {
Mockito.doNothing().when(tbMailSender).updateOauth2PasswordIfExpired();
Mockito.doNothing().when(tbMailSender).testConnectionSuper();
willCallRealMethod().given(tbMailSender).testConnection();
tbMailSender.testConnection();
@ -78,7 +72,6 @@ public class TbMailSenderTest {
willReturn(oauth2).given(tbMailSender).getOauth2Enabled();
willReturn(expiresIn).given(tbMailSender).getTokenExpires();
Mockito.doNothing().when(tbMailSender).refreshAccessToken();
willCallRealMethod().given(tbMailSender).updateOauth2PasswordIfExpired();
tbMailSender.updateOauth2PasswordIfExpired();

Loading…
Cancel
Save