1 /*
2 * The Harness API. Details can be found at: http://harness.dyndns.org
3 * Copyright (C) 2000 - 2002, Marcel Schepers
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public License
7 * as published by the Free Software Foundation; either version 2.1
8 * of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free
17 * Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18 * 02111-1307 USA
19 */
20 package net.sourceforge.harness.xml.jaxb.harness;
21
22 import net.sourceforge.harness.CheckFailedException;
23 import net.sourceforge.harness.RunException;
24 import net.sourceforge.harness.TestCase;
25 import net.sourceforge.harness.xml.jaxb.Author;
26
27 /**
28 * Test case for net.sourceforge.harness.xml.jaxb.Author.
29 *
30 * <p><b>Usage:</b> <code>trivial</code>
31 *
32 * <p><b>History:</b>
33 * <ul>
34 * <li>20020406, Initial file</li>
35 * </ul>
36 *
37 * <p><b>CVS Information:</b><br>
38 * <i>
39 * $Date: 2003/01/24 10:10:21 $<br>
40 * $Revision: 1.5 $<br>
41 * $Author: mgl $<br>
42 * </i>
43 *
44 * @author <a href="mailto:mgl@users.sourceforge.net>Marcel Schepers</a>
45 */
46 public class AuthorTestCase extends TestCase{
47
48 /**
49 * Implements the actual test code.
50 * Note: setup and tear down code required by the code under test is
51 * implemented in TestCase.postConstruct() and TestCase.preDestruct().
52 *
53 * @exception RunException indicating a test failure.
54 * @exception CheckFailedException indicating a assertion failure
55 */
56 public void run() throws RunException, CheckFailedException {
57 Author author = new Author();
58 check(author != null, "instantiation");
59
60 String name = "Dummy name";
61 author.setContent(name);
62 String newName = author.getContent();
63 check(name.equals(newName), "content");
64 }
65
66 }