01 package fr.isae.tags;
02
03 import org.junit.*;
04 import static org.junit.Assert.*;
05 import java.util.Date;
06
07 /**
08 * Unit Test for class MarquePage.
09 *
10 * <p>Created: Mon Nov 8 23:48:29 2010</p>
11 *
12 * @author <a href="mailto:garion@isae.fr">Christophe Garion</a>
13 * @version 1.0
14 */
15 public class MarquePageTest {
16
17 private Date d;
18 private MarquePage mp;
19
20 /**
21 * Setup for the tests.
22 */
23 @Before public void setUp() {
24 this.d = new Date();
25 this.mp = new MarquePage("Java 6 API javadoc",
26 "http://download.oracle.com/javase/6/docs/api/",
27 d);
28 }
29
30 /**
31 * Test method for getTitre.
32 */
33 @Test public void testGetTitre() {
34 assertEquals("Java 6 API javadoc", this.mp.getTitre());
35 }
36
37 /**
38 * Test method for getURL.
39 */
40 @Test public void testGetURL() {
41 assertEquals("http://download.oracle.com/javase/6/docs/api/", this.mp.getURL());
42 }
43
44 /**
45 * Test method for getDate.
46 */
47 @Test public void testGetDate() {
48 assertEquals(this.d, this.mp.getDate());
49 }
50
51 /**
52 * Test method for setTitre.
53 */
54 @Test public void testSetTitre() {
55 this.mp.setTitre("coucou");
56 assertEquals("coucou", this.mp.getTitre());
57 }
58 }
|