Changeset 6063
- Timestamp:
- 02/25/15 21:20:50 (10 years ago)
- Location:
- DASISH/t5.6/backend/annotator-backend/tags/git-copy-censored/annotator-backend/src/test/java/eu/dasish/annotation/backend
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
DASISH/t5.6/backend/annotator-backend/tags/git-copy-censored/annotator-backend/src/test/java/eu/dasish/annotation/backend/dao/impl/DBDispatcherTest.java
r6021 r6063 1299 1299 mockeryDao.checking(new Expectations() { 1300 1300 { 1301 oneOf(principalDao).principalExists(" olhsha@mpi.nl");1301 oneOf(principalDao).principalExists("alice@mail.domain"); 1302 1302 will(returnValue(true)); 1303 1303 … … 1307 1307 PrincipalExists ex = null; 1308 1308 try { 1309 dbDispatcher.addPrincipal(principal, " olhsha@mpi.nl");1309 dbDispatcher.addPrincipal(principal, "alice@mail.domain"); 1310 1310 } catch (PrincipalExists e) { 1311 1311 ex = e; -
DASISH/t5.6/backend/annotator-backend/tags/git-copy-censored/annotator-backend/src/test/java/eu/dasish/annotation/backend/dao/impl/JdbcPrincipalDaoTest.java
r5468 r6063 153 153 System.out.println("test principalExists"); 154 154 assertEquals(false,jdbcPrincipalDao.principalExists("guisil@mpi.nl")); 155 assertTrue(jdbcPrincipalDao.principalExists(" olhsha@mpi.nl"));155 assertTrue(jdbcPrincipalDao.principalExists("alice@mail.domain")); 156 156 } 157 157 … … 184 184 // System.out.println("*****"); 185 185 // System.out.println("generate hashes"); 186 // System.out.println(Helpers.hashPswd("1234", 512, " olhsha@mpi.nl"));186 // System.out.println(Helpers.hashPswd("1234", 512, "alice@mail.domain")); 187 187 // System.out.println(Helpers.hashPswd("5678", 512, "olasei@mpi.nl")); 188 188 // System.out.println("*****"); -
DASISH/t5.6/backend/annotator-backend/tags/git-copy-censored/annotator-backend/src/test/java/eu/dasish/annotation/backend/rest/AnnotationResourceTest.java
r5850 r6063 92 92 final Annotation expectedAnnotation = (new TestInstances("/api")).getAnnotationOne(); 93 93 annotationResource.setHttpServletRequest(mockRequest); 94 mockRequest.setRemoteUser(" olhsha@mpi.nl");94 mockRequest.setRemoteUser("alice@mail.domain"); 95 95 mockRequest.setContextPath("/backend"); 96 96 mockRequest.setServletPath("/api"); … … 100 100 oneOf(mockDbDispatcher).setResourcesPaths("/backend/api"); 101 101 102 oneOf(mockDbDispatcher).getPrincipalInternalIDFromRemoteID(" olhsha@mpi.nl");102 oneOf(mockDbDispatcher).getPrincipalInternalIDFromRemoteID("alice@mail.domain"); 103 103 will(returnValue(3)); 104 104 … … 134 134 135 135 annotationResource.setHttpServletRequest(mockRequest); 136 mockRequest.setRemoteUser(" olhsha@mpi.nl");136 mockRequest.setRemoteUser("alice@mail.domain"); 137 137 mockRequest.setContextPath("/backend"); 138 138 mockRequest.setServletPath("/api"); … … 142 142 oneOf(mockDbDispatcher).setResourcesPaths("/backend/api"); 143 143 144 oneOf(mockDbDispatcher).getPrincipalInternalIDFromRemoteID(" olhsha@mpi.nl");144 oneOf(mockDbDispatcher).getPrincipalInternalIDFromRemoteID("alice@mail.domain"); 145 145 will(returnValue(3)); 146 146 … … 192 192 193 193 annotationResource.setHttpServletRequest(mockRequest); 194 mockRequest.setRemoteUser(" olhsha@mpi.nl");194 mockRequest.setRemoteUser("alice@mail.domain"); 195 195 mockRequest.setContextPath("/backend"); 196 196 mockRequest.setServletPath("/api"); … … 200 200 oneOf(mockDbDispatcher).setResourcesPaths("/backend/api"); 201 201 202 oneOf(mockDbDispatcher).getPrincipalInternalIDFromRemoteID(" olhsha@mpi.nl");202 oneOf(mockDbDispatcher).getPrincipalInternalIDFromRemoteID("alice@mail.domain"); 203 203 will(returnValue(3)); 204 204 -
DASISH/t5.6/backend/annotator-backend/tags/git-copy-censored/annotator-backend/src/test/java/eu/dasish/annotation/backend/rest/AnnotationsTest.java
r5850 r6063 334 334 335 335 protected Builder getAuthenticatedResource(WebResource resource) { 336 return resource.header(HttpHeaders.AUTHORIZATION, "Basic " + new String(Base64.encode(DummyPrincipal.DUMMY_PRINCIPAL.getName()+": olhapassword")));336 return resource.header(HttpHeaders.AUTHORIZATION, "Basic " + new String(Base64.encode(DummyPrincipal.DUMMY_PRINCIPAL.getName()+":alicepassword"))); 337 337 } 338 338 } -
DASISH/t5.6/backend/annotator-backend/tags/git-copy-censored/annotator-backend/src/test/java/eu/dasish/annotation/backend/rest/DummyPrincipal.java
r4800 r6063 29 29 30 30 public static final DummyPrincipal DUMMY_ADMIN_PRINCIPAL = new DummyPrincipal("JUnit.Admin@test.com"); 31 public static final DummyPrincipal DUMMY_PRINCIPAL = new DummyPrincipal(" olhsha@mpi.nl");31 public static final DummyPrincipal DUMMY_PRINCIPAL = new DummyPrincipal("alice@mail.domain"); 32 32 public static final PrincipalCredentials DUMMY_CREDENTIALS = new PrincipalCredentials(DUMMY_PRINCIPAL) { 33 33
Note: See TracChangeset
for help on using the changeset viewer.