예제 #1
0
		/// <summary>
		/// VSTT unit test provider constructor; takes an assembly reference to 
		/// perform reflection on to retrieve all test class types. In this 
		/// implementation of an engine for the VSTT metadata, only a single 
		/// test Assembly can be utilized at a time for simplicity.
		/// </summary>
		/// <param name="testHarness">The unit test harness.</param>
		/// <param name="assemblyReference">Assembly reflection object.</param>
		/// <returns>Returns the assembly metadata interface.</returns>
		public IAssembly GetUnitTestAssembly(UnitTestHarness testHarness, Assembly assemblyReference)
		{
			if (_assemblyCache.ContainsKey(assemblyReference))
			{
				return _assemblyCache[assemblyReference];
			}
			else
			{
				_assemblyCache[assemblyReference] = new UnitTestFrameworkAssembly(this, testHarness, assemblyReference);
				return _assemblyCache[assemblyReference];
			}
		}
예제 #2
0
 /// <summary>
 /// VSTT unit test provider constructor; takes an assembly reference to
 /// perform reflection on to retrieve all test class types. In this
 /// implementation of an engine for the VSTT metadata, only a single
 /// test Assembly can be utilized at a time for simplicity.
 /// </summary>
 /// <param name="testHarness">The unit test harness.</param>
 /// <param name="assemblyReference">Assembly reflection object.</param>
 /// <returns>Returns the assembly metadata interface.</returns>
 public IAssembly GetUnitTestAssembly(UnitTestHarness testHarness, Assembly assemblyReference)
 {
     if (_assemblyCache.ContainsKey(assemblyReference))
     {
         return(_assemblyCache[assemblyReference]);
     }
     else
     {
         _assemblyCache[assemblyReference] = new UnitTestFrameworkAssembly(this, testHarness, assemblyReference);
         return(_assemblyCache[assemblyReference]);
     }
 }