|
27 | 27 | import org.junit.runners.Suite;
|
28 | 28 | import org.junit.runners.Suite.SuiteClasses;
|
29 | 29 | import org.springframework.data.mongodb.core.convert.CallableMongoScriptConvertsUnitTests.CallableMongoScriptToDboConverterUnitTests;
|
| 30 | +import org.springframework.data.mongodb.core.convert.CallableMongoScriptConvertsUnitTests.DboToCallableMongoScriptConverterUnitTests; |
30 | 31 | import org.springframework.data.mongodb.core.convert.MongoConverters.CallableMongoScriptToDBObjectConverter;
|
31 | 32 | import org.springframework.data.mongodb.core.convert.MongoConverters.DBObjectToCallableMongoScriptCoverter;
|
32 | 33 | import org.springframework.data.mongodb.core.script.CallableMongoScript;
|
|
39 | 40 | * @author Christoph Strobl
|
40 | 41 | */
|
41 | 42 | @RunWith(Suite.class)
|
42 |
| -@SuiteClasses({ CallableMongoScriptToDboConverterUnitTests.class }) |
| 43 | +@SuiteClasses({ CallableMongoScriptToDboConverterUnitTests.class, DboToCallableMongoScriptConverterUnitTests.class }) |
43 | 44 | public class CallableMongoScriptConvertsUnitTests {
|
44 | 45 |
|
45 | 46 | static final String FUNCTION_NAME = "echo";
|
@@ -86,7 +87,7 @@ public void convertShouldConvertScriptCodeCorreclty() {
|
86 | 87 |
|
87 | 88 | Object code = dbo.get("value");
|
88 | 89 | assertThat(code, instanceOf(Code.class));
|
89 |
| - assertThat(code.toString(), equalTo(JS_FUNCTION)); |
| 90 | + assertThat(code, equalTo((Object) new Code(JS_FUNCTION))); |
90 | 91 | }
|
91 | 92 | }
|
92 | 93 |
|
@@ -125,7 +126,7 @@ public void convertShouldConvertScriptValueCorreclty() {
|
125 | 126 | CallableMongoScript script = converter.convert(FUNCTION);
|
126 | 127 |
|
127 | 128 | assertThat(script.getCode(), notNullValue());
|
128 |
| - assertThat(script.getCode().toString(), equalTo(JS_FUNCTION)); |
| 129 | + assertThat(script.getCode(), equalTo(JS_FUNCTION)); |
129 | 130 | }
|
130 | 131 | }
|
131 | 132 |
|
|
0 commit comments