Hi All , <br><br>I have defined a function name <b>join </b>using guvnor guided editor which is mentioned below <br><br>function String join(String firstname , String lastname) {<br> return firstname + " " + lastname;<br>
}<br><br>then i created rule using guided editor which make use of the function and when i validate the rule is validates successfully<br><br>rule "persontest"<br> dialect "mvel"<br> when<br>
p : Person( firstname != "" && lastname != "" )<br> then<br> p.setFullname( join(firstname,lastname) );<br>end<br><br>now i created a test scenario for testing the rule which is like below <br>
<br>GIVEN<br> insert Person<br> firstname =Sujit<br> lastname =Sharma<br><br>EXPECT<br> fullname = Sujit Sharma<br>
<br>and when i run the test i am getting below error <br><br>[p] field [fullname] was [] expected [Sujit Sharma ]<br><br><br>Please help.<br><br>Regards,<br>Ashish<br>