01: /**********************************************************************************
02: * $URL: https://source.sakaiproject.org/svn/rwiki/tags/sakai_2-4-1/rwiki-model/src/test/uk/ac/cam/caret/sakai/rwiki/model/test/RWikiObjectContentImplTest.java $
03: * $Id: RWikiObjectContentImplTest.java 20726 2007-01-26 22:45:44Z ian@caret.cam.ac.uk $
04: ***********************************************************************************
05: *
06: * Copyright (c) 2003, 2004, 2005, 2006, 2007 The Sakai Foundation.
07: *
08: * Licensed under the Educational Community License, Version 1.0 (the "License");
09: * you may not use this file except in compliance with the License.
10: * You may obtain a copy of the License at
11: *
12: * http://www.opensource.org/licenses/ecl1.php
13: *
14: * Unless required by applicable law or agreed to in writing, software
15: * distributed under the License is distributed on an "AS IS" BASIS,
16: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: * See the License for the specific language governing permissions and
18: * limitations under the License.
19: *
20: **********************************************************************************/package uk.ac.cam.caret.sakai.rwiki.model.test;
21:
22: /**
23: * @author David Haines
24: *
25: */
26: import uk.ac.cam.caret.sakai.rwiki.model.RWikiObjectContentImpl;
27: import junit.framework.TestCase;
28:
29: public class RWikiObjectContentImplTest extends TestCase {
30:
31: RWikiObjectContentImpl roci = null;
32:
33: protected void setUp() throws Exception {
34: super .setUp();
35: roci = new RWikiObjectContentImpl();
36: }
37:
38: public void testSetContentString() {
39: String testContent = "testContentString";
40: roci.setContent(testContent);
41: assertTrue("content mismatch", testContent.equals(roci
42: .getContent()));
43: }
44:
45: public void testSetContentEmptyString() {
46: String testContent = "";
47: roci.setContent(testContent);
48: assertTrue("content mismatch", testContent.equals(roci
49: .getContent()));
50: }
51:
52: public void testSetContentNull() {
53: String testContent = null;
54: roci.setContent(testContent);
55: assertTrue("content mismatch", "".equals(roci.getContent()));
56: }
57:
58: }
|