Skip to content

Commit

Permalink
BAEL-8939: Adding a Spring Context test in all Spring Modules (change…
Browse files Browse the repository at this point in the history
…s for around 9 more modules.. work in progress..)
  • Loading branch information
sachin29aug committed Sep 16, 2018
1 parent dd273f6 commit b96244d
Show file tree
Hide file tree
Showing 10 changed files with 162 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package org.baeldung;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import com.baeldung.ecommerce.EcommerceApplicationIntegrationTest;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = EcommerceApplicationIntegrationTest.class)
public class SpringContextIntegrationTest {

@Test
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package org.baeldung;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.test.context.junit4.SpringRunner;

import com.baeldung.autoconfiguration.example.AutoconfigurationApplication;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = AutoconfigurationApplication.class)
@EnableJpaRepositories(basePackages = { "com.baeldung.autoconfiguration.example" })
public class SpringContextIntegrationTest {

@Test
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@
<version>${greeter.version}</version>
<optional>true</optional>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>1.5.10.RELEASE</version>
<scope>test</scope>
</dependency>

</dependencies>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package org.baeldung;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import com.baeldung.greeter.autoconfigure.GreeterAutoConfiguration;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = GreeterAutoConfiguration.class)
public class SpringContextIntegrationTest {

@Test
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package org.baeldung;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import com.baeldung.greeter.sample.GreeterSampleApplication;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = GreeterSampleApplication.class)
public class SpringContextIntegrationTest {

@Test
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package org.baeldung;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import com.baeldung.h2db.demo.SpringBootApp;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = SpringBootApp.class)
public class SpringContextIntegrationTest {

@Test
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package org.baeldung;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import com.baeldung.h2db.demo.ClientSpringBootApp;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = ClientSpringBootApp.class)
public class SpringContextIntegrationTest {

@Test
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package org.baeldung;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import com.baeldung.jasypt.Main;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = Main.class)
public class SpringContextIntegrationTest {

@Test
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package org.baeldung;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import com.baeldung.Application;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = Application.class)
public class SpringContextIntegrationTest {

@Test
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package org.baeldung;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import com.baeldung.Application;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = Application.class)
public class SpringContextIntegrationTest {

@Test
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
}
}

0 comments on commit b96244d

Please sign in to comment.