示例声明:
if (conditionA && conditionB && conditionC && conditionD) {
return true;
}
Run Code Online (Sandbox Code Playgroud)
我可以为所有2 ^ 4组合编写单元测试,但如果添加更多条件,这很容易失控.
我的单元测试策略应该涵盖这样的声明的所有条件?有没有其他方法可以使代码更健壮?
我正在尝试在 JSP 页面中显示图像。该图像只是 Google 图像,我将图像 URL 传递到 JSP 页面内的 src。
下面是我将链接传递给 img 标记的代码
<img src="http://tigerday.org/wp-content/uploads/2013/04/Siberischer_tiger.jpg" width="100" height="100">
Run Code Online (Sandbox Code Playgroud)
但是图像没有显示;它只显示图像应该出现的框。