自动测试:变化多端的输出(5)

发表于:2012-01-13来源:未知作者:娃娃点击数: 标签:自动化测试
} 35 36 public void Remove(IOutputter outputter) { 37 outputterVector.remove(outputter); 38 } 39 40 } Code 1 package my.cnblog.output; 2 3 /**//*Modified Outputter Factory*/ 4 5 public class Outputter
} 35
36
public void Remove(IOutputter outputter)
{ 37
outputterVector.remove(outputter); 38
} 39
40
}
Code 1
package my.cnblog.output; 2
3
/**//*Modified Outputter Factory*/ 4
5
public class OutputterFactory
{ 6
IOutputter Create(String outputterList)
{ 7
OutputterContainer oc = new OutputterContainer(); 8
String[] list = outputterList.split(";"); 9
for (int i=0;i
 
{ 10
String outputter = list[i]; 11
if (outputter.equalsIgnoreCase("TXTOutputter"))
{ 12
oc.Add(new TXTOutputter()); 13
} 14
else if(outputter.equalsIgnoreCase("XMLOutputter"))
{ 15
/**//*oc.Add(new TXTOutputter());*/ 16
} 17

原文转自:http://www.ltesting.net