示例#1
0
 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);
 }
示例#2
0
 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);
 }
示例#3
0
 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;
 }
示例#4
0
 public void DontWaitForCompletion() {
    TestFixture tf = new TestFixture(typeof(ContainsLongTimedTest), _listener);
    tf.RunTests(new TestSpec());
 }
示例#5
0
 /// <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();
 }