Create Synchronous BPEL with one input element and one output element.
Drag drop Assign Activity and on the output element i.e, to the result add below expression.
Unit Testing
Test Case 1:
Suppose input is HI as below
1. contains($inputVariable.payload/client:input,"SUCCESS") returns false
2. not(contains($inputVariable.payload/client:input,"SUCCESS")) returns true
3. 1 div false (false means 0) is infinity
4. 1 div true (true means 1) is 0
so the statement becomes
concat(substring("ture",infinity),substring("false",1)) which means false.
So the result is false.
Test Case 2:
Suppose input is HI SUCCESS as below
1. contains($inputVariable.payload/client:input,"SUCCESS") returns true
2. not(contains($inputVariable.payload/client:input,"SUCCESS")) returns false
3. 1 div true (true means 1) is 0
4. 1 div false (false means 0) is infinity
so the statement becomes
concat(substring("ture",1),substring("false",infinity)) which means true.
So the result is true.
Drag drop Assign Activity and on the output element i.e, to the result add below expression.
Unit Testing
Test Case 1:
Suppose input is HI as below
1. contains($inputVariable.payload/client:input,"SUCCESS") returns false
2. not(contains($inputVariable.payload/client:input,"SUCCESS")) returns true
3. 1 div false (false means 0) is infinity
4. 1 div true (true means 1) is 0
so the statement becomes
concat(substring("ture",infinity),substring("false",1)) which means false.
So the result is false.
Test Case 2:
Suppose input is HI SUCCESS as below
1. contains($inputVariable.payload/client:input,"SUCCESS") returns true
2. not(contains($inputVariable.payload/client:input,"SUCCESS")) returns false
3. 1 div true (true means 1) is 0
4. 1 div false (false means 0) is infinity
so the statement becomes
concat(substring("ture",1),substring("false",infinity)) which means true.
So the result is true.
No comments:
Post a Comment