Change DataContext of Parent TestCase
Posted: Mon Mar 04, 2013 3:56 pm
Hi,
I've got following Testcase-Structure within my Testsuite:
Testsuite:
- MainTestcase
- Testcase1
- Testcase2
On the main Testcase level I've attached via Databinding a file with more than one datarow.
During the tests, there should only be one datarow used. (its a language file containing all strings in different languages)
Within Testcase2 I change the language of my Application, so I need to change the datacontext of the MainTestcase. How can I access the Parent of the current Testcase?
I know, I can change the DataContext of the actual Testcase by using:
TestCase.Current.DataContext.SetRange(min, max);
Thank you for your assistance.
Regards
Anja
I've got following Testcase-Structure within my Testsuite:
Testsuite:
- MainTestcase
- Testcase1
- Testcase2
On the main Testcase level I've attached via Databinding a file with more than one datarow.
During the tests, there should only be one datarow used. (its a language file containing all strings in different languages)
Within Testcase2 I change the language of my Application, so I need to change the datacontext of the MainTestcase. How can I access the Parent of the current Testcase?
I know, I can change the DataContext of the actual Testcase by using:
TestCase.Current.DataContext.SetRange(min, max);
Thank you for your assistance.
Regards
Anja