本文整理汇总了C#中TestSuite.AddTestSuite方法的典型用法代码示例。如果您正苦于以下问题:C# TestSuite.AddTestSuite方法的具体用法?C# TestSuite.AddTestSuite怎么用?C# TestSuite.AddTestSuite使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TestSuite
的用法示例。
在下文中一共展示了TestSuite.AddTestSuite方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: suite
public static TestSuite suite()
{
TestSuite suite = new TestSuite();
suite.AddTestSuite(typeof(IdentityTest));
suite.AddTestSuite(typeof(AllTest));
suite.AddTestSuite(typeof(FailTest));
suite.AddTestSuite(typeof(OneTest));
suite.AddTestSuite(typeof(FailAtNodesTest));
suite.AddTestSuite(typeof(SomeTest));
suite.AddTestSuite(typeof(TopDownUntilTest));
suite.AddTestSuite(typeof(SpineBottomUpTest));
suite.AddTestSuite(typeof(SpineTopDownTest));
suite.AddTestSuite(typeof(SuccessCounterTest));
suite.AddTestSuite(typeof(IfThenElseTest));
suite.AddTestSuite(typeof(AllSpinesBottomUpTest));
suite.AddTestSuite(typeof(ChildTest));
suite.AddTestSuite(typeof(CollectTest));
suite.AddTestSuite(typeof(DescendantTest));
suite.AddTestSuite(typeof(DoWhileSuccessTest));
suite.AddTestSuite(typeof(LoggerTest));
suite.AddTestSuite(typeof(NestingDepthTest));
suite.AddTestSuite(typeof(OnceTopDownTest));
suite.AddTestSuite(typeof(TimeLogVisitorTest));
suite.AddTestSuite(typeof(LibraryTest));
return suite;
}
示例2: build
void build() {
List<String> lst = new ArrayList<String>();
//collect unit tests
Console.WriteLine("Collecting unit tests from " + _testDir);
collectTests(_testDir, _testDir, lst, ".+?\\.Test.+?\\.class$");
TestSuite suite = new TestSuite();
for (String arg : lst) {
//ignore inner classes defined in tests
if (arg.IndexOf('$') != -1) continue;
String cls = arg.Replace(".class", "");
try {
Class test = Class.forName(cls);
suite.AddTestSuite(test);
} catch (ClassNotFoundException e) {
throw new RuntimeException(e);
}
}
//run tests
TestRunner.Run(suite);
//see what classes from the ooxml-schemas.jar are loaded
Console.WriteLine("Copying classes to " + _destDest);
Map<String, Class<?>> classes = GetLoadedClasses(_ooxmlJar.getName());
for (Class<?> cls : classes.values()) {
String className = cls.GetName();
String classRef = className.Replace('.', '/') + ".class";
File destFile = new File(_destDest, classRef);
copyFile(cls.GetResourceAsStream('/' + classRef), destFile);
if(cls.isInterface()){
/**
* Copy classes and interfaces declared as members of this class
*/
for(Class fc : cls.GetDeclaredClasses()){
className = fc.GetName();
classRef = className.Replace('.', '/') + ".class";
destFile = new File(_destDest, classRef);
copyFile(fc.GetResourceAsStream('/' + classRef), destFile);
}
}
}
//finally copy the compiled .xsb files
Console.WriteLine("Copying .xsb resources");
JarFile jar = new JarFile(_ooxmlJar);
for(Enumeration<JarEntry> e = jar.entries(); e.hasMoreElements(); ){
JarEntry je = e.nextElement();
if(je.GetName().matches("schemaorg_apache_xmlbeans/system/\\w+/\\w+\\.xsb")) {
File destFile = new File(_destDest, je.GetName());
copyFile(jar.GetInputStream(je), destFile);
}
}
jar.close();
}