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); }
internal TestFixtureInfo(TestFixture tf) { // Don't store a reference to the TestFixture object in order to ensure // the test assembly can be unloaded. [11Feb07, ml] // No longer sure about this. [16aug09, ml] _fullName = tf.FullName; _testMethods = tf.TestMethods; _categories = tf.Categories; }
public void DontWaitForCompletion() { TestFixture tf = new TestFixture(typeof(ContainsLongTimedTest), _listener); tf.RunTests(new TestSpec()); }
/// <summary> /// Creates an instance of the TestMethod class. /// </summary> /// <param name="testFixture">TestFixture instance the TestMethod belongs to.</param> /// <param name="methodInfo">MethodInfo the test method.</param> public TestMethod(TestFixture testFixture, MethodInfo methodInfo) { _fixture = testFixture; _methodInfo = methodInfo; _framework = FrameworkAdapter.CreateInstance(_fixture.AssemblyName); ScanForAttributes(); }