From 47f0607c4976802b01a24cecc762545f06a3a9bc Mon Sep 17 00:00:00 2001 From: Oliver Gierke Date: Fri, 7 Mar 2014 08:27:26 +0100 Subject: [PATCH] DATAMONGO-809 - Polishing. Added ticket references to test cases in GridFsTemplateIntegratinoTests. --- .../GridFsTemplateIntegrationTests.java | 37 +++++++++++++------ 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/gridfs/GridFsTemplateIntegrationTests.java b/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/gridfs/GridFsTemplateIntegrationTests.java index 84944acbd..6803069c6 100644 --- a/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/gridfs/GridFsTemplateIntegrationTests.java +++ b/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/gridfs/GridFsTemplateIntegrationTests.java @@ -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 { assertSame(result.get(0), reference); } + /** + * @see DATAMONGO-6 + */ @Test public void writesMetadataCorrectly() throws IOException { @@ -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 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 { assertSame(result.get(0), reference); } + /** + * @see DATAMONGO-6 + */ @Test public void findsFilesByResourcePattern() throws IOException { @@ -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 { 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 result = operations.find(query(whereContentType().is("application/xml"))); + assertThat(result.size(), is(1)); + assertSame(result.get(0), reference); + } + /** * @see DATAMONGO-534 */