public void ConcatStrings() { var input = new RowsBuilder().Row().Field("f1", "v1").Field("f2", "v2").ToOperation(); var parameters = new ParametersBuilder().Parameters("f1", "f2").ToParameters(); var concat = new ConcatOperation("o1", parameters); var rows = TestOperation(input, concat); Assert.AreEqual("v1v2", rows[0]["o1"]); }
public void ConcatNumbers() { var input = new RowsBuilder().Row().Field("f1", 1).Field("f2", 2).ToOperation(); var parameters = new ParametersBuilder().Parameter("f1").Type("int32").Parameter("f2").Type("int32").ToParameters(); var concat = new ConcatOperation("o1", parameters); var rows = TestOperation(input, concat); Assert.AreEqual("12", rows[0]["o1"]); }
public void TestCopyConcat() { var input = new RowsBuilder() .Row("in1", 1).Field("in2", 2) .Row("in1", 3).Field("in2", 4) .ToOperation(); var copyParameters = new Parameters(new DefaultFactory(new TestLogger())) { { "in1", "in1", null, "int" }, { "in2", "in2", null, "int" } }; var concatOperation = new ConcatOperation("out", copyParameters); var output = TestOperation(input, concatOperation); Assert.AreEqual("12", output[0]["out"].ToString()); Assert.AreEqual("34", output[1]["out"].ToString()); }