[Fat-develop] FAT/src/FAT.Core/Configuration FATConfiguration.cs,1.1,1.2
Brought to you by:
exortech
|
From: <exo...@us...> - 2004-01-15 00:57:01
|
Update of /cvsroot/fat/FAT/src/FAT.Core/Configuration
In directory sc8-pr-cvs1:/tmp/cvs-serv19380/src/FAT.Core/Configuration
Modified Files:
FATConfiguration.cs
Log Message:
commits to fat will now be sent out on developer mailing list
Index: FATConfiguration.cs
===================================================================
RCS file: /cvsroot/fat/FAT/src/FAT.Core/Configuration/FATConfiguration.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** FATConfiguration.cs 12 Dec 2003 23:28:50 -0000 1.1
--- FATConfiguration.cs 15 Jan 2004 00:56:58 -0000 1.2
***************
*** 10,17 ****
--- 10,19 ----
{
private Assembly[] assemblies;
+ private string[] paths;
public FATConfiguration(XmlNode root)
{
assemblies = ParseAssemblies(root);
+ paths = ParsePaths(root);
}
***************
*** 25,35 ****
ArrayList assemblies = new ArrayList();
! XmlNode assembliesNode = root.SelectSingleNode("Assemblies");
! if (assembliesNode == null)
! {
! throw new ConfigurationException("No test fixture assemblies have been specified. Please ensure to add the test fixture assemblies to the configuration file.");
! }
!
! foreach (XmlNode assemblyNode in assembliesNode.ChildNodes)
{
if (assemblyNode.NodeType == XmlNodeType.Element)
--- 27,32 ----
ArrayList assemblies = new ArrayList();
! XmlNodeList assemblyNodes = root.SelectNodes("Assemblies/Assembly");
! foreach (XmlNode assemblyNode in assemblyNodes)
{
if (assemblyNode.NodeType == XmlNodeType.Element)
***************
*** 41,44 ****
--- 38,57 ----
return (Assembly[])assemblies.ToArray(typeof(Assembly));
}
+
+ private string[] ParsePaths(XmlNode root)
+ {
+ ArrayList pathList = new ArrayList();
+ XmlNodeList pathNodes = root.SelectNodes("TestPaths/TestPath");
+ foreach (XmlNode node in pathNodes)
+ {
+ pathList.Add(node.InnerText);
+ }
+ return (string[])pathList.ToArray(typeof(string));
+ }
+
+ public ITestFileScanner TestFileScanner
+ {
+ get { return new TestFileScanner(paths); }
+ }
}
}
|