public void DoesNotTimeOut() { TestSpec ts = new TestSpec(); ts.Add(typeof(ClassWithTimedTests).FullName, "DoesNotTimeOut"); TestFixture tf = new TestFixture(typeof(ClassWithTimedTests), _listener); tf.RunTests(ts); Assert.Equals("DoesNotTimeOut", _sequence); }
public void TimesOut() { TestSpec ts = new TestSpec(); ts.Add(typeof(ClassWithTimedTests).FullName, "TimesOut"); TestFixture tf = new TestFixture(typeof(ClassWithTimedTests), _listener); tf.RunTests(ts); Assert.Equals("TimesOut", _sequence); Assert.Equals("Test was expected to finish within 100 milliseconds.", _listener.FailureMessage); }
public override void Execute(object sender, EventArgs args) { if(Recipe.Current != null) { TestSpec ts = new TestSpec(); foreach(object item in CommandTarget.SelectedItems) { UiElementInfo uiElemInfo = item as UiElementInfo; if( uiElemInfo != null ) { ts.AddTest(uiElemInfo.TestSpecName); } } if( ts.FixtureCount > 0 ) { Recipe.Current.RunTests(ts); } } }
private void OnRecipeLoaded(object sender, RecipeEventArgs args) { _testSpec = new TestSpec(); Recipe.Current.AssemblyRemoving += _onAssemblyRemoving; foreach(TestAssembly ass in Recipe.Current.Assemblies) { ass.TestError += _onTestErrorOrFail; ass.TestFailed += _onTestErrorOrFail; } OnUiUpdate(sender, args); }