Browse Source

DATAMONGO-809 - Polishing.

Added ticket references to test cases in GridFsTemplateIntegratinoTests.
pull/145/head
Oliver Gierke 12 years ago
parent
commit
47f0607c49
  1. 37
      spring-data-mongodb/src/test/java/org/springframework/data/mongodb/gridfs/GridFsTemplateIntegrationTests.java

37
spring-data-mongodb/src/test/java/org/springframework/data/mongodb/gridfs/GridFsTemplateIntegrationTests.java

@ -61,6 +61,9 @@ public class GridFsTemplateIntegrationTests { @@ -61,6 +61,9 @@ public class GridFsTemplateIntegrationTests {
operations.delete(null);
}
/**
* @see DATAMONGO-6
*/
@Test
public void storesAndFindsSimpleDocument() throws IOException {
@ -71,6 +74,9 @@ public class GridFsTemplateIntegrationTests { @@ -71,6 +74,9 @@ public class GridFsTemplateIntegrationTests {
assertSame(result.get(0), reference);
}
/**
* @see DATAMONGO-6
*/
@Test
public void writesMetadataCorrectly() throws IOException {
@ -83,18 +89,8 @@ public class GridFsTemplateIntegrationTests { @@ -83,18 +89,8 @@ public class GridFsTemplateIntegrationTests {
}
/**
* @see DATAMONGO-503
* @see DATAMONGO-6
*/
@Test
public void storesContentType() throws IOException {
GridFSFile reference = operations.store(resource.getInputStream(), "foo2.xml", "application/xml");
List<GridFSDBFile> result = operations.find(query(whereContentType().is("application/xml")));
assertThat(result.size(), is(1));
assertSame(result.get(0), reference);
}
@Test
public void marshalsComplexMetadata() throws IOException {
@ -107,6 +103,9 @@ public class GridFsTemplateIntegrationTests { @@ -107,6 +103,9 @@ public class GridFsTemplateIntegrationTests {
assertSame(result.get(0), reference);
}
/**
* @see DATAMONGO-6
*/
@Test
public void findsFilesByResourcePattern() throws IOException {
@ -119,6 +118,9 @@ public class GridFsTemplateIntegrationTests { @@ -119,6 +118,9 @@ public class GridFsTemplateIntegrationTests {
assertThat(resources[0].getContentType(), is(reference.getContentType()));
}
/**
* @see DATAMONGO-6
*/
@Test
public void findsFilesByResourceLocation() throws IOException {
@ -131,6 +133,19 @@ public class GridFsTemplateIntegrationTests { @@ -131,6 +133,19 @@ public class GridFsTemplateIntegrationTests {
assertThat(resources[0].getContentType(), is(reference.getContentType()));
}
/**
* @see DATAMONGO-503
*/
@Test
public void storesContentType() throws IOException {
GridFSFile reference = operations.store(resource.getInputStream(), "foo2.xml", "application/xml");
List<GridFSDBFile> result = operations.find(query(whereContentType().is("application/xml")));
assertThat(result.size(), is(1));
assertSame(result.get(0), reference);
}
/**
* @see DATAMONGO-534
*/

Loading…
Cancel
Save