Skip to content
This repository has been archived by the owner on Dec 18, 2019. It is now read-only.

Commit

Permalink
junit handling improved
Browse files Browse the repository at this point in the history
Change-Id: I480e31457d72512b6d16a6570e3f1a329c4b4fb2
Signed-off-by: Matthias Steiner <matthias.steiner@inscope.net>
  • Loading branch information
steinermatt committed Nov 29, 2015
1 parent 0740257 commit e18afe1
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 16 deletions.
4 changes: 2 additions & 2 deletions enterprise-granny-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.1</version>
<artifactId>javax.servlet.jsp-api</artifactId>
<version>2.3.2-b02</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import com.sap.hana.cloud.samples.granny.api.ContactFacade;
import com.sap.hana.cloud.samples.granny.model.Address;
Expand All @@ -28,6 +33,9 @@
/**
* Tests for the {@link ContactFacade} class.
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ActiveProfiles(profiles = "test")
@Ignore("As it assumes the Addressbook Service to run on a hardcoded port on localhost!")
public class TestAddressbookSrv
{
static String endPoint = null;
Expand Down Expand Up @@ -72,7 +80,7 @@ public void tearDown() throws Exception
/**
* Tests getting all contacts
*/
//@Test
@Test
public void testGetContacts()
{

Expand All @@ -85,7 +93,7 @@ public void testGetContacts()
/**
* Tests creating a contact.
*/
//@Test
@Test
public void testCRUD()
{
// create test data
Expand Down Expand Up @@ -123,7 +131,7 @@ public void testCRUD()
*
* @see http://www.historyrundown.com/top-5-people-with-the-longest-names/
*/
//@Test
@Test
public void testDataValidation()
{

Expand Down
1 change: 1 addition & 0 deletions enterprise-granny-service/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/target/
/.settings/
/derby.log
6 changes: 3 additions & 3 deletions enterprise-granny-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,8 @@
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.1</version>
<artifactId>javax.servlet.jsp-api</artifactId>
<version>2.3.2-b02</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -343,7 +343,7 @@
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.el</artifactId>
<version>3.0.1-b05</version>
<version>3.0.1-b08</version>
</dependency>

<!-- Google Phone Lib -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,9 @@
/**
* Tests for the {@link ContactDAO} class.
*/
@ContextConfiguration("classpath:/META-INF/spring/app-context.xml")
@ContextConfiguration("classpath:/META-INF/spring/spring-persistence-config.xml")
@RunWith(SpringJUnit4ClassRunner.class)
@ActiveProfiles(profiles = "test")
@Ignore("does not work due to missing spring app-context.")
public class TestContactDAO
{
@Autowired
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
Expand All @@ -25,10 +24,9 @@
/**
* Tests for the {@link ContactService} class.
*/
@ContextConfiguration("classpath:/META-INF/spring/app-context.xml")
@ContextConfiguration("classpath:/META-INF/spring/spring-persistence-config.xml")
@RunWith(SpringJUnit4ClassRunner.class)
@ActiveProfiles(profiles = "test")
@Ignore("does not work due to missing spring app-context.")
public class TestContactService
{
@Autowired
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import javax.validation.ValidatorFactory;

import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
Expand All @@ -27,10 +26,9 @@
/**
* Tests for the {@link ValidPhoneNumberValidator} class.
*/
@ContextConfiguration("classpath:/META-INF/spring/app-context.xml")
@ContextConfiguration("classpath:/META-INF/spring/spring-persistence-config.xml")
@RunWith(SpringJUnit4ClassRunner.class)
@ActiveProfiles(profiles = "test")
@Ignore("does not work due to missing spring app-context.")
public class ValidPhoneNumberValidatorTest
{

Expand Down

0 comments on commit e18afe1

Please sign in to comment.