参数测试(XML和@DataProvider)

时间:2019-03-27 06:45:54

标签: testng

func numberOfSections(in tableView: UITableView) -> Int {
  return 2
}


func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
   switch section {  
     case 0:
         return Menu.More.items.count
     default: return 0
    }
}


func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {

    switch indexPath.section {
      case 0:
          let cell = tableView.dequeueReusableCell(withIdentifier: menuIdentifier, for: indexPath) as! DoctorMenuTableCell
          cell.titleLabel.text = Menu.More.items[row].value

          if indexPath.row == 1{
              cell.titleLabel.textColor = UIColor.red
              cell.accessoryType = .none   
          }

         return cell
      default:
         return UITableViewCell()
      }
 }



func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
   switch indexPath.section {
    case 1: break
    case 0:
         switch indexPath.row {
           case 0:
              let alertController = UIAlertController(title: "Info", message: "No available data", preferredStyle: .alert)
              alertController.addAction(UIAlertAction(title: "OK", style: .default))

              self.present(alertController, animated: true, completion: nil) 
            break
            case 1: showLogoutDialog()
            break
            default: break
         }
         break
         default: break

     }

  }

想要在<test name="globalProps_1" preserve-order="true"> <classes> <class name=""> <methods> <include name="testSaveGlobalProperties"> <parameter name="searchKey" value="UK" /> </include> <include name="testGetGlobalProperties"> <parameter name="names" value="Cedric, Julien"/> </include> </methods> </class> </classes> </test> 中获取参数名称和值,就像我的方法中我的参数值不同。

0 个答案:

没有答案