Skip to content

Commit

Permalink
fix: BounceManagerTest
Browse files Browse the repository at this point in the history
Signed-off-by: Oleh Astappiev <[email protected]>
  • Loading branch information
astappiev committed Sep 16, 2024
1 parent 063a846 commit 9a31162
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
15 changes: 12 additions & 3 deletions src/test/java/de/l3s/learnweb/web/BounceManagerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,35 @@

import static org.junit.jupiter.api.Assertions.*;

import jakarta.inject.Inject;
import jakarta.mail.Folder;
import jakarta.mail.Message;
import jakarta.mail.MessagingException;
import jakarta.mail.Store;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.jboss.weld.junit5.auto.AddPackages;
import org.jboss.weld.junit5.auto.EnableAutoWeld;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import de.l3s.learnweb.app.DaoProvider;

@EnableAutoWeld
@AddPackages(DaoProvider.class)
class BounceManagerTest {
private static final Logger log = LogManager.getLogger(BounceManagerTest.class);

@Inject
BounceManager bounceManager;

/**
* Debug/analysis function that checks contents of bounce folder.
* Debug/analysis function that checks the contents of bounce folder.
*/
@Test
@Disabled("Call to real mail server")
void testConnection() throws MessagingException {
BounceManager bounceManager = new BounceManager();
Store store = bounceManager.getStore();
store.connect();

Expand All @@ -32,7 +42,6 @@ void testConnection() throws MessagingException {
@Test
@Disabled("Debug/analysis function that checks contents of bounce folder")
void checkBounceFolder() throws MessagingException {
BounceManager bounceManager = new BounceManager();
Store store = bounceManager.getStore();
store.connect();

Expand Down
2 changes: 0 additions & 2 deletions src/test/java/de/l3s/mail/MailTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import jakarta.enterprise.inject.Produces;
import jakarta.inject.Inject;

import org.jboss.weld.junit5.auto.AddPackages;
import org.jboss.weld.junit5.auto.EnableAutoWeld;
import org.jboss.weld.junit5.auto.ExcludeBean;
import org.junit.jupiter.api.Disabled;
Expand All @@ -14,7 +13,6 @@
import de.l3s.learnweb.app.ConfigProvider;

@EnableAutoWeld
@AddPackages(MailService.class)
class MailTest {

@Produces
Expand Down

0 comments on commit 9a31162

Please sign in to comment.