Categories:
.NET (357)
C (330)
C++ (184)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (2)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Struts (1)
Windows (1)
XHTML (173)
Other Resources:
Why Does Poeple Import org.junit.Assert Statically
Why Does Poeple Import org.junit.Assert Statically?
✍: Guest
Poeple use the static import statement on org.junit.Assert to save coding time on calling its assetion methods. With a normal import statement, assertion method names must qualified with the class name like this:
import org.junit.Assert;
...
Assert.assertEquals(12, message.length());
With a static import statement, assertion method names can be used directly like this:
import static org.junit.Assert.*;
...
assertEquals(12, message.length());
2008-01-29, 5954👍, 0💬
Popular Posts:
How To Use "IN OUT" Parameter Properly? - Oracle DBA FAQ - Creating Your Own PL/SQL Procedures and F...
How To Enter a New Row into a Table Interactively? - Oracle DBA FAQ - Introduction to Oracle SQL Dev...
Jack developed a program by using a Map container to hold key/value pairs. He wanted to make a chang...
Can we have static indexer in C# ? No.
.NET INTERVIEW QUESTIONS - What is Suspend and Resume in Threading ? It is Similar to Sleep and Inte...