Assert为静态方法直接调用即可junit注解@Test
:测试该方法@Ignore:忽略该方法@Before:测试每个方法前调用该方法(可以用来打开数据库)@After:测试每个方法后调用该方法@BeforeClass:在调用junit类之前调用该方法(如果要测试的方法都需要连接数据库,可以用该...
分类:
其他好文 时间:
2014-05-26 14:26:27
阅读次数:
280
报错详情:Failure to transfer
com.thoughtworks.xstream:xstream:pom:1.3.1 from
http://repo.maven.apache.org/maven2 was cached in the local repository, resol...
分类:
其他好文 时间:
2014-05-26 13:27:05
阅读次数:
2261
JUnit 4 使用 Java 5 中的注解(annotation),以下是JUnit 4
常用的几个 annotation
介绍@Before:初始化方法@After:释放资源@Test:测试方法,在这里可以测试期望异常和超时时间@Ignore:忽略的测试方法@BeforeClass:针对所有测试...
分类:
编程语言 时间:
2014-05-26 09:32:04
阅读次数:
302
Given a linked list, remove the nth node from
the end of list and return its head. For example, Given linked list:
1->2->3->4->5, and n = 2. After rem...
分类:
其他好文 时间:
2014-05-26 09:08:23
阅读次数:
262
Problem Description
We have a special convex that all points have the same distance to origin point.
As you know we can get N segments after linking the origin point and the points on the convex. ...
分类:
其他好文 时间:
2014-05-25 09:50:19
阅读次数:
217
Problem Description
We have a special convex that all points have the same distance to origin point.
As you know we can get N segments after linking the origin point and the points on the convex. ...
分类:
其他好文 时间:
2014-05-25 06:55:54
阅读次数:
188
It seems like the year of 2013 came only yesterday. Do you know a curious fact? The year of 2013 is the first year after the old 1987 with only distinct digits.
Now you are suggested to solve the f...
分类:
其他好文 时间:
2014-05-24 21:52:34
阅读次数:
320
Given n non-negative integers representing an
elevation map where the width of each bar is 1, compute how much water it is
able to trap after raining....
分类:
移动开发 时间:
2014-05-23 03:59:43
阅读次数:
364
H. Happy Reversal
64-bit integer IO format: %lld
Java class name: Main
Elfness is studying in an operation "NOT".
For a binary number A, if we do operation "NOT A", after that, all digit...
分类:
移动开发 时间:
2014-05-23 00:43:49
阅读次数:
430
【题目】
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.
For example,
Given [0,1,0,2,1,0,1,3,2,1,2,1], return 6.
The above elevation map is represente...
分类:
移动开发 时间:
2014-05-21 06:44:38
阅读次数:
359