source: proiecte/HadoopJUnit/src/TestAdd.java @ 142

Last change on this file since 142 was 120, checked in by (none), 14 years ago

Added the mail files for the Hadoop JUNit Project

  • Property svn:executable set to *
File size: 653 bytes
Line 
1import org.junit.Test;
2import org.junit.runner.RunWith;
3import static org.junit.Assert.*;
4
5class X {
6    static int three() {
7        return 3;
8    }
9};
10
11@RunWith(HadoopRunner.class)
12public class TestAdd {
13
14    @Test
15    public void testAdd() {
16        assertEquals(1 + 1, 2);
17    }
18    @Test
19    public void testSub() {
20        assertEquals(1 - 1, 0);
21    }
22    @Test
23    public void testMul() {
24        /* Should fail. */
25        assertEquals(1 * 1, 0);
26    }
27
28    @Test(timeout=2500)
29    public void testTimeout() {
30        /* Should fail. */
31        while (true)
32            ;
33    }
34
35    @Test
36    public void testX() {
37        /* Should fail. */
38        assertEquals(X.three(), 2);
39    }
40}
Note: See TracBrowser for help on using the repository browser.