public TestEventArgs(TestAction action,
                      string name, Exception exception)
 {
     this.action    = action;
     this.name      = name;
     this.exception = exception;
 }
 public TestEventArgs(TestAction action,
                      string name, Test test)
 {
     this.action = action;
     this.name   = name;
     this.tests  = new Test[] { test };
 }
Exemple #3
0
		public TestEventArgs( TestAction action, string name )
		{
			this.action = action;
			this.name = name;
		}
		// TestFinished, SuiteFinished, RunFinished
		public TestEventArgs( TestAction action, TestResult testResult )
		{
			Debug.Assert( action == TestAction.TestFinished || action == TestAction.SuiteFinished ||
				action == TestAction.RunFinished,
				"Invalid TestAction argument to TestEventArgs constructor" );

			this.action = action;
			this.testResult = testResult;
		}
		// TestOutput
		public TestEventArgs( TestAction action, TestOutput testOutput )
		{
			Debug.Assert( action == TestAction.TestOutput,
				"Invalid TestAction argument to TestEventArgs constructor" );

			this.action = action;
			this.testOutput = testOutput;
		}
		// ProjectLoading, ProjectLoaded, ProjectUnloading, ProjectUnloaded,
		// TestLoading, TestUnloading, TestUnloaded, TestReloading
		public TestEventArgs( TestAction action, string name )
		{
			Debug.Assert( 
				action == TestAction.ProjectLoading || action == TestAction.ProjectLoaded ||
				action == TestAction.ProjectUnloading || action == TestAction.ProjectUnloaded ||
				action == TestAction.TestLoading || action == TestAction.TestUnloading ||
				action == TestAction.TestUnloaded || action == TestAction.TestReloading,
				"Invalid TestAction argument to TestEventArgs constructor" );

			this.action = action;
			this.name = name;
		}
		// ProjectLoadFailed, ProjectUnloadFailed, TestLoadFailed, TestUnloadFailed, TestReloadFailed, TestException
		public TestEventArgs( TestAction action,
			string name, Exception exception )
		{
			Debug.Assert(
				action == TestAction.ProjectLoadFailed || action == TestAction.ProjectUnloadFailed ||
				action == TestAction.TestLoadFailed || action == TestAction.TestUnloadFailed ||
				action == TestAction.TestReloadFailed || action == TestAction.TestException, 
				"Invalid TestAction argument to TestEventArgs constructor" );

			this.action = action;
			this.name = name;
			this.exception = exception;
		}
Exemple #8
0
		public TestEventArgs( TestAction action, Test test )
		{
			this.action = action;
			this.tests = new Test[] { test };
			this.count = test.CountTestCases();
		}
		private void CheckEvent( TestAction action, TestResult result )
		{
			CheckEvent( action );
			Assert.AreEqual( TESTNAME, result.Name );
		}
Exemple #10
0
 public TestEventArgs(TestAction action, string name)
 {
     this.action = action;
     this.name   = name;
 }
		private void CheckEvent( TestAction action, string fileName, int testCount )
		{
			CheckEvent( action, fileName );
			Assert.AreEqual( testCount, ((TestEventArgs)catcher.Events[0]).TestCount );
		}
Exemple #12
0
		public TestEventArgs( TestAction action, Test[] tests, int count) 
		{
			this.action = action;
			this.tests = tests;
			this.count = count;
		}
Exemple #13
0
		public TestEventArgs( TestAction action, 
			string name, Test test )
		{
			this.action = action;
			this.name = name;
			this.tests = new Test[] { test };
		}
Exemple #14
0
		public TestEventArgs( TestAction action, Exception exception )
		{
			this.action = action;
			this.exception = exception;
		}
Exemple #15
0
		public TestEventArgs( TestAction action, TestResult[] results )
		{
			this.action = action;
			this.results = results;
		}
Exemple #16
0
		public TestEventArgs( TestAction action, TestResult result )
		{
			this.action = action;
			this.results = new TestResult[] { result };
		}
		private void CheckEvent( TestAction action )
		{
			Assert.AreEqual( 1, catcher.Events.Count );
			Assert.AreEqual( action, ((TestEventArgs)catcher.Events[0]).Action );
		}
		private void CheckEvent( TestAction action, string fileName, Exception exception )
		{
			CheckEvent( action, fileName );
			Assert.AreEqual( MESSAGE, ((TestEventArgs)catcher.Events[0]).Exception.Message );
		}
		private void CheckEvent( TestAction action, string fileName )
		{
			CheckEvent( action );
			Assert.AreEqual( fileName, ((TestEventArgs)catcher.Events[0]).Name );
		}
Exemple #20
0
		public TestEventArgs( TestAction action,
			string name, Exception exception )
		{
			this.action = action;
			this.name = name;
			this.exception = exception;
		}
		private void CheckEvent( TestAction action, string fileName, TestInfo test )
		{
			CheckEvent( action, fileName );
			Assert.AreEqual( TESTNAME, ((TestEventArgs)catcher.Events[0]).Test.TestName.Name );
		}
Exemple #22
0
 public TestEventArgs(TestAction action, Test test)
 {
     this.action = action;
     this.tests  = new Test[] { test };
     this.count  = test.CountTestCases();
 }
		private void CheckEvent( TestAction action, TestName testName )
		{
			CheckEvent( action );
			Assert.AreEqual( TESTNAME, ((TestEventArgs)catcher.Events[0]).TestName.Name );
		}
Exemple #24
0
 public TestEventArgs(TestAction action, TestResult result)
 {
     this.action  = action;
     this.results = new TestResult[] { result };
 }
		private void CheckEvent( TestAction action, Exception exception )
		{
			CheckEvent( TestAction.RunFinished );
			Assert.AreEqual( MESSAGE, ((TestEventArgs)catcher.Events[0]).Exception.Message );
		}
Exemple #26
0
 public TestEventArgs(TestAction action, TestResult[] results)
 {
     this.action  = action;
     this.results = results;
 }
		public TestEventArgs( TestAction action, string name, int testCount )
		{
			Debug.Assert( action == TestAction.RunStarting,
				"Invalid TestAction argument to TestEventArgs constructor" );

			this.action = action;
			this.name = name;
			this.testCount = testCount;
		}
Exemple #28
0
 public TestEventArgs(TestAction action, Exception exception)
 {
     this.action    = action;
     this.exception = exception;
 }
		// TestStarting, SuiteStarting
		public TestEventArgs( TestAction action, TestName testName )
		{
			Debug.Assert( action == TestAction.TestStarting || action == TestAction.SuiteStarting,
				"Invalid TestAction argument to TestEventArgs constructor" );

			this.action = action;
			this.testName = testName;
		}
Exemple #30
0
 public TestEventArgs(TestAction action, Test[] tests, int count)
 {
     this.action = action;
     this.tests  = tests;
     this.count  = count;
 }
		// RunFinished
		public TestEventArgs( TestAction action, Exception exception )
		{
			Debug.Assert( action == TestAction.RunFinished,
				"Invalid TestAction argument to TestEventArgs constructor" );

			this.action = action;
			this.exception = exception;
		}
Exemple #32
0
 private static int SortByTargetDescending(TestAction x, TestAction y)
 {
     return(y.Targets.CompareTo(x.Targets));
 }
		// TestLoaded, TestReloaded
		public TestEventArgs( TestAction action, 
			string name, ITest test )
		{
			Debug.Assert( 
				action == TestAction.TestLoaded || action == TestAction.TestReloaded,
				"Invalid TestAction argument to TestEventArgs constructor" );

			this.action = action;
			this.name = name;
			this.test = test;
			if ( test != null )
				this.testCount = test.TestCount;
		}
Exemple #34
0
 private static int SortByTargetDescending(TestAction x, TestAction y)
 {
     return y.Targets.CompareTo(x.Targets);
 }