public void InduceAction_10Times_ExpectInvoke10Times() { int times = 10; var sut = Mock.Create <Action>(); var st = new Stressor() .RunTimes(times) .ActOn(sut) .Induce(); Mock.Assert(() => sut.Invoke(), Occurs.Exactly(times)); }
public void StressOneTimeSetup() { var options = new StressorOptions(); options.RunningAssembly = Assembly.GetExecutingAssembly(); //INFO: Non-stress operations take about 5 minutes, or 9% of the total runtime options.TimeLimitPercentage = .91; #if STRESS options.IsFullStress = true; #else options.IsFullStress = false; #endif stressor = new Stressor(options); }
public void OneTimeStressSetup() { var options = new StressorOptions(); options.RunningAssembly = Assembly.GetExecutingAssembly(); //INFO: Non-stress operations take up to 23 minutes, or ~38% of the total runtime //Also, some of the stress tests occasionally run over considerably, so we are adding an additional 2% of buffer options.TimeLimitPercentage = .60; #if STRESS options.IsFullStress = true; #else options.IsFullStress = false; #endif stressor = new Stressor(options); }