Beispiel #1
0
        private Type getDynamicImplementationType()
        {
            StubClassMaker classMaker = new StubClassMaker();
            IStubMaker     stubMaker  = null;
            Assembly       assembly   = null;

            if ((assembly = _linker.LoadAssembly(NUNIT_ASSEMBLY_NAME)) != null)
            {
                stubMaker = new NUnitStubMaker(assembly, _linker);
            }
            else if ((assembly = _linker.LoadAssembly(MBUNIT_ASSEMBLY_NAME)) != null)
            {
                stubMaker = new MbUnitStubMaker(assembly, _linker);
            }
            else if ((assembly = _linker.LoadAssembly(CSUNIT_ASSEMBLY_NAME)) != null)
            {
                stubMaker = new csUnitStubMaker(assembly, _linker);
            }
            else if ((assembly = _linker.LoadAssemblyWithPartialName(NUNIT_ASSEMBLY_NAME)) != null)
            {
                stubMaker = new NUnitStubMaker(assembly, _linker);
            }
            else if ((assembly = _linker.LoadAssemblyWithPartialName(MBUNIT_ASSEMBLY_NAME)) != null)
            {
                stubMaker = new MbUnitStubMaker(assembly, _linker);
            }
            else if ((assembly = _linker.LoadAssemblyWithPartialName(CSUNIT_ASSEMBLY_NAME)) != null)
            {
                stubMaker = new csUnitStubMaker(assembly, _linker);
            }
            else
            {
                return(null);
            }
            Type stubClass = classMaker.MakeStubClass(
                typeof(ITestFramework),
                stubMaker
                );

            return(stubClass);
        }
		private Type getDynamicImplementationType() 
		{
			StubClassMaker classMaker = new StubClassMaker();
			IStubMaker stubMaker = null;
			Assembly assembly = null;
			if ( (assembly=_linker.LoadAssembly(NUNIT_ASSEMBLY_NAME))!=null ) 
			{
				stubMaker = new NUnitStubMaker(assembly, _linker);
			}
			else if ( (assembly=_linker.LoadAssembly(MBUNIT_ASSEMBLY_NAME))!=null ) 
			{
				stubMaker = new MbUnitStubMaker(assembly, _linker);
			}
			else if ( (assembly=_linker.LoadAssembly(CSUNIT_ASSEMBLY_NAME))!=null ) 
			{
				stubMaker = new csUnitStubMaker(assembly, _linker);
			} 
			else if ( (assembly=_linker.LoadAssemblyWithPartialName(NUNIT_ASSEMBLY_NAME))!=null ) 
			{
				stubMaker = new NUnitStubMaker(assembly, _linker);
			}
			else if ( (assembly=_linker.LoadAssemblyWithPartialName(MBUNIT_ASSEMBLY_NAME))!=null ) 
			{
				stubMaker = new MbUnitStubMaker(assembly, _linker);
			}
			else if ( (assembly=_linker.LoadAssemblyWithPartialName(CSUNIT_ASSEMBLY_NAME))!=null ) 
			{
				stubMaker = new csUnitStubMaker(assembly, _linker);
			} 
			else 
			{
				return null;
			}
			Type stubClass = classMaker.MakeStubClass(
				typeof(ITestFramework),
				stubMaker
				);
			return stubClass;
		}