Skip to content

Commit 45280cc

Browse files
authored
Update README with test data and BlockData details
Added section on test data handling and BlockData usage.
1 parent c6d448d commit 45280cc

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,15 @@ public async Task Test1()
120120

121121
Also note that current behavior is that TestFramework will take the result of the awaited test block task and use that for future test block dependencies. If you have a test block that returns Task<bool>, TestFramework will capture the bool result to use.
122122

123+
Test Data
124+
-----
125+
In normal situations, test blocks typically only return a single datapoint if any data is returned at all. The underlying container picks that object up and uses it for subsequent test blocks like demonstrated in the example project or unit tests. In some cases, it's not feasible to return just a single object, and so the BlockData object can handle returning 2 - 4 different data points. The execute method would look similar to this:
126+
```
127+
public BlockData<string, bool> Execute()
128+
{
129+
return new BlockData<string, bool>("Testing", true);
130+
}
131+
```
132+
Note that in the out of the box BlockData objects, it will validate that the types are all unique; otherwise duplicate types would simply overwrite each other and cause unexpected behavior in subsquent block executions.
133+
123134
More in depth examples are coming later!

0 commit comments

Comments
 (0)