add code
This commit is contained in:
coderfengyun 2014-06-20 16:46:55 +08:00
parent e613738fa8
commit d33e8552c5
1 changed files with 9 additions and 3 deletions

View File

@ -74,9 +74,15 @@ public class Test_MongoDBPlugin extends TestBase {
batch.getBehaviors().add(
BehaviorModel.UserBehaviorBuilder(0, "Insert", pluginId, Arrays
.asList(ParameterModel.createParameter("key", "key2"),
ParameterModel.createParameter("value",
"value2"))));
.asList(ParameterModel.createParameter("id",
this.testId.toString()), ParameterModel
.createParameter("value", "value2"))));
batch.getBehaviors().add(
BehaviorModel.UserBehaviorBuilder(1, "Query", pluginId, Arrays
.asList(ParameterModel.createParameter(
"properties",
"propertyName=_id|propertyValue="
+ this.testId.toString() + "|;"))));
String scriptContent = MarshalHelper.tryMarshal(scenarioModel);
System.out.println(scriptContent);
File targetFile = new File("Scripts"