iOS单元测试和UI测试全面解析(20)

发表于:2017-03-31来源:51CTO作者:朱先忠点击数: 标签:单元测试iOS
varcontrollerUnderTest:SearchViewController! overridefuncsetUp(){ super.setUp() controllerUnderTest=UIStoryboard( name : Main , bundle:nil).instantiateInitialViewController() as !SearchViewController!


  1. var controllerUnderTest: SearchViewController! 
  2.   
  3. override func setUp() { 
  4.   super.setUp() 
  5.   controllerUnderTest = UIStoryboard(name"Main",  
  6.       bundle: nil).instantiateInitialViewController() as! SearchViewController! 
  7.   

    原文转自:http://mobile.51cto.com/iphone-535758.htm