Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 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;
 }
Exemplo n.º 4
0
 public void DontWaitForCompletion() {
    TestFixture tf = new TestFixture(typeof(ContainsLongTimedTest), _listener);
    tf.RunTests(new TestSpec());
 }
Exemplo n.º 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();
 }