提交 731c86ea 编写于 作者: O Oliver Gondža

Better defect localization

上级 a4698bac
package jenkins.model;
import static org.junit.Assert.assertTrue;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsString;
import com.gargoylesoftware.htmlunit.html.HtmlInput;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
......@@ -24,6 +25,6 @@ public class JenkinsLocationConfigurationTest {
HtmlPage p = j.createWebClient().goTo("configure");
HtmlInput url = p.getFormByName("config").getInputByName("_.url");
url.setValueAttribute("http://localhost:1234/");
assertTrue(p.getDocumentElement().getTextContent().contains("instead of localhost"));
assertThat(p.getDocumentElement().getTextContent(), containsString("instead of localhost"));
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册