Ant JUnit 任务 : Is there a difference between on, 是的,真的吗?

标签 ant junit

TL;DR:要启用 Ant 功能,onyestrue 之间有区别吗?

我找不到有关此事的任何文档。我们有一些 Ant 构建脚本,它们似乎在 on yestrue 之间随机选择,以启用各种 Ant JUnit 功能。

示例属性:forkhaltonerror

引用号:http://ant.apache.org/manual/Tasks/junit.html

最佳答案

来自http://ant.apache.org/manual/develop.html :

The most common way to write an attribute setter is to use a java.lang.String argument. In this case Ant will pass the literal value (after property expansion) to your task. But there is more! If the argument of you setter method is

  • boolean, your method will be passed the value true if the value specified in the build file is one of true, yes, or on and false otherwise.

因此,yesontrue 是同一件事。

关于Ant JUnit 任务 : Is there a difference between on, 是的,真的吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26837960/

相关文章:

java - 使浏览器获取修改后的 JS 和 CSS 文件

mongodb - 为 MongoDB 提供种子以使用 Karate 进行自动化测试的正确方法

java - Apache Ant 有没有办法在构建后更新 jar 文件?

Android Ant 包含 Java 库项目

spring - http 状态 404 hello.jsp (apache tomcat 6)

regex - Apache Ant : Can I search all files for a specific regex and then print the matches to a file?

java - 在 JUnit 测试中模拟日期格式 (SimpleDateFormat)

java - 如何在 JUnit 和 Mockito 中模拟 ResultSet 以不返回 null

java - 我对这个 JUnit 测试用例感到困惑

java - 使用 Springs @Autowired 进行独立的 JUnit 测试