how can i change the attributes parameters dynamically(in run time) in the following code( for TestFixture and TestConfiguration):
[
TestFixture("Setup 1"),
TestConfiguration("http://spiratest", "rin", "rin", 30, 924, 2577,
TestConfigurationAttribute.RunnerName.NUnit)
]
public class SampleTestFixture
{
protected static int testFixtureState = 1;
[TestFixtureSetUp]
public void FixureInit()
{
//Set the state to 2
testFixtureState = 2;
}
[SetUp]
public void Init()
{
//Do Nothing
}
/// <summary>
/// Sample test that asserts a failure
/// </summary>
[
Test,
TestCase(41681)
]
public void _01_SampleFailure()
{
//Verify the state
Assert.AreEqual (2, testFixtureState, "*Real Error*: State not persisted");
//Failure Assertion
Assert.AreEqual (1, 1, "Failed as Expected");
}
}
i need to change the attributes parameters for TestFixture and TestConfiguration on RunTime.(with no using const parameters)
how can i change it by reflection or annotation?