DATAMONGO-1141 - Polishing.
Aligned assertion messages for consistency. Fixed imports in UpdateMapperUnitTests. Original pull request: #405.
This commit is contained in:
@@ -314,7 +314,7 @@ public class Update {
|
||||
*/
|
||||
public Update multiply(String key, Number multiplier) {
|
||||
|
||||
Assert.notNull(multiplier, "Multiplier must not be 'null'.");
|
||||
Assert.notNull(multiplier, "Multiplier must not be null.");
|
||||
addMultiFieldOperation("$mul", key, multiplier.doubleValue());
|
||||
return this;
|
||||
}
|
||||
@@ -331,7 +331,7 @@ public class Update {
|
||||
*/
|
||||
public Update max(String key, Object value) {
|
||||
|
||||
Assert.notNull(value, "Value for max operation must not be 'null'.");
|
||||
Assert.notNull(value, "Value for max operation must not be null.");
|
||||
addMultiFieldOperation("$max", key, value);
|
||||
return this;
|
||||
}
|
||||
@@ -348,7 +348,7 @@ public class Update {
|
||||
*/
|
||||
public Update min(String key, Object value) {
|
||||
|
||||
Assert.notNull(value, "Value for min operation must not be 'null'.");
|
||||
Assert.notNull(value, "Value for min operation must not be null.");
|
||||
addMultiFieldOperation("$min", key, value);
|
||||
return this;
|
||||
}
|
||||
@@ -780,7 +780,7 @@ public class Update {
|
||||
*/
|
||||
public PushOperatorBuilder sort(Direction direction) {
|
||||
|
||||
Assert.notNull(direction, "Direction must not be 'null'.");
|
||||
Assert.notNull(direction, "Direction must not be null.");
|
||||
this.modifiers.addModifier(new SortModifier(direction));
|
||||
return this;
|
||||
}
|
||||
@@ -795,7 +795,7 @@ public class Update {
|
||||
*/
|
||||
public PushOperatorBuilder sort(Sort sort) {
|
||||
|
||||
Assert.notNull(sort, "Sort must not be 'null'.");
|
||||
Assert.notNull(sort, "Sort must not be null.");
|
||||
this.modifiers.addModifier(new SortModifier(sort));
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
package org.springframework.data.mongodb.core.convert;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.*;
|
||||
import static org.hamcrest.Matchers.*;
|
||||
import static org.junit.Assert.*;
|
||||
import static org.mockito.Mockito.*;
|
||||
import static org.springframework.data.mongodb.core.DocumentTestUtils.*;
|
||||
@@ -76,6 +76,7 @@ public class UpdateMapperUnitTests {
|
||||
private Converter<NestedEntity, Document> writingConverterSpy;
|
||||
|
||||
@Before
|
||||
@SuppressWarnings("unchecked")
|
||||
public void setUp() {
|
||||
|
||||
this.writingConverterSpy = Mockito.spy(new NestedEntityWriteConverter());
|
||||
|
||||
Reference in New Issue
Block a user