Skip to content

Commit

Permalink
Excluded the MailService bean from creation in the abstractServiceTest.
Browse files Browse the repository at this point in the history
  • Loading branch information
VikashSingh94 committed Jan 15, 2019
1 parent f9fbc4d commit 1434a00
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
import com.hashmapinc.server.dao.event.EventService;
import com.hashmapinc.server.dao.gatewayconfiguration.TempusGatewayConfigurationService;
import com.hashmapinc.server.dao.logo.LogoService;
import com.hashmapinc.server.dao.mail.DefaultMailService;
import com.hashmapinc.server.dao.metadataingestion.MetadataIngestionService;
import com.hashmapinc.server.dao.plugin.PluginService;
import com.hashmapinc.server.dao.relation.RelationService;
Expand All @@ -72,12 +73,14 @@
import com.hashmapinc.server.dao.user.UserService;
import com.hashmapinc.server.dao.widget.WidgetTypeService;
import com.hashmapinc.server.dao.widget.WidgetsBundleService;
import jnr.ffi.annotations.Meta;
import org.junit.Assert;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.FilterType;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.ContextConfiguration;
Expand All @@ -95,7 +98,9 @@
@ContextConfiguration(classes = {AbstractServiceTest.class, UserServiceTestConfiguration.class}, loader = AnnotationConfigContextLoader.class)
@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_CLASS)
@Configuration
@ComponentScan("com.hashmapinc.server")
@ComponentScan(basePackages = {"com.hashmapinc.server"} ,excludeFilters =
@ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, value = DefaultMailService.class))

public abstract class AbstractServiceTest {

protected ObjectMapper mapper = new ObjectMapper();
Expand Down

0 comments on commit 1434a00

Please sign in to comment.