Commits

Trey Howard  committed 3698114

Refactored spring bootstrap test to verify all environments programmatically. Formerly required spring.profiles.active property to be provided when running unit tests.

  • Participants
  • Parent commits bd0a3f1

Comments (0)

Files changed (1)

File src/test/java/TestSpringBootstrap.java

  */
 public class TestSpringBootstrap {
 
+	@Test(expected = Exception.class)
+	public void test_Missing() {
+		new ClassPathXmlApplicationContext("spring.xml");
+	}
+
+	@Test
+	public void test_Workstation() {
+		System.setProperty("spring.profiles.active", "workstation");
+		new ClassPathXmlApplicationContext("spring.xml");
+	}
+
 	@Test
-	public void test_LoadContext() {
+	public void test_Dev() {
+		System.setProperty("spring.profiles.active", "dev");
 		new ClassPathXmlApplicationContext("spring.xml");
 	}