Working with query parameters and saved test data in files

TODO: explain in greater detail

In brief, when data is "Recorded" by SnapDAL, it is put into saved xml files in the cachedData folder of your statements directory in a file named by the test name and the statement name. However, it's possible that the recording will have encountered the same query multiple times with different parameters. When the data is saved, the root element has the statement parameter values concatentated as a single string that is used as a key to fetch the correct data when "played back" using the mock reader functionality. So if you called a statement with id=5 and name="test" the dataset will be saved in an element with an element called params and a value of "5test"; Since you are in control of the parameters you can substitute test specific parameters. For example, the query_customers call was used in some of the sample code like:

  <data params="test1" dataType="dataset">
  <Table ID="Table1">

In addition, you may not have easy access in your test code to the parameters, or may wish to select test data with different parameters than the code under test. In this case, the MockProvider has an option for you to account for that situation.
public testSomethingWithParms()
    HybridDictionary testParms = new HybridDictionary();
    testParms.Add("customerid", "test1")
    MockProvider.TestName = "thenameofthetest";
    MockProvider.TestParams["theStatementName"] = testParms;
    .....your test code