[Fat-develop] FAT/src/FAT.Core/Configuration FATConfiguration.cs,1.3,1.4 IConfiguration.cs,1.2,1.3
Brought to you by:
exortech
|
From: <dmc...@us...> - 2004-02-20 21:21:28
|
Update of /cvsroot/fat/FAT/src/FAT.Core/Configuration In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3930/src/FAT.Core/Configuration Modified Files: FATConfiguration.cs IConfiguration.cs Log Message: Can now click on question mark gif next to selected fixture name to get a pop-up window giving help on available methods. Index: FATConfiguration.cs =================================================================== RCS file: /cvsroot/fat/FAT/src/FAT.Core/Configuration/FATConfiguration.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** FATConfiguration.cs 20 Jan 2004 06:01:19 -0000 1.3 --- FATConfiguration.cs 20 Feb 2004 17:56:48 -0000 1.4 *************** *** 12,15 **** --- 12,16 ---- private string[] paths; private Type parserType; + private Type htmlFormatterType; public FATConfiguration(XmlNode root) *************** *** 17,21 **** assemblies = ParseAssemblies(root); paths = ParsePaths(root); ! parserType = ParseParserType(root); } --- 18,23 ---- assemblies = ParseAssemblies(root); paths = ParsePaths(root); ! parserType = ParseType(root, "Parser", typeof(TestParser)); ! htmlFormatterType = ParseType(root, "TestFixtureHtmlFormatter", typeof(TestFixtureHtmlFormatter)); } *************** *** 38,41 **** --- 40,44 ---- } } + return (Assembly[])assemblies.ToArray(typeof(Assembly)); } *************** *** 53,69 **** } ! private Type ParseParserType(XmlNode root) { ! XmlNode parserTypeNode = root.SelectSingleNode("Parser"); ! if (parserTypeNode != null) { ! Type parserType = Type.GetType(parserTypeNode.InnerText); ! if (parserType != null) { ! return parserType; } ! Log.Warning("Unable to load parser using type string from configuration file: " + parserTypeNode.InnerText); } ! return typeof(TestParser); } --- 56,72 ---- } ! private Type ParseType(XmlNode root, string typeNodeName, Type defaultType) { ! XmlNode typeNode = root.SelectSingleNode(typeNodeName); ! if (typeNode != null) { ! Type type = Type.GetType(typeNode.InnerText); ! if (type != null) { ! return type; } ! Log.Warning("Unable to load " + typeNodeName + "using type string from configuration file: " + typeNode.InnerText); } ! return defaultType; } *************** *** 82,85 **** --- 85,93 ---- get { return new TestRunner(new TestFixtureLoader(this)); } } + + public ITestFixtureHtmlFormatter TestFixtureHtmlFormatter + { + get { return (ITestFixtureHtmlFormatter)Activator.CreateInstance(htmlFormatterType); } + } } } Index: IConfiguration.cs =================================================================== RCS file: /cvsroot/fat/FAT/src/FAT.Core/Configuration/IConfiguration.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IConfiguration.cs 20 Jan 2004 06:01:19 -0000 1.2 --- IConfiguration.cs 20 Feb 2004 17:56:48 -0000 1.3 *************** *** 10,13 **** --- 10,14 ---- ITestParser TestParser { get; } ITestRunner TestRunner { get; } + ITestFixtureHtmlFormatter TestFixtureHtmlFormatter { get; } } } |