From: <lh...@us...> - 2008-08-05 13:28:32
|
Revision: 95 http://tinytim.svn.sourceforge.net/tinytim/?rev=95&view=rev Author: lheuer Date: 2008-08-05 13:28:39 +0000 (Tue, 05 Aug 2008) Log Message: ----------- - Added test case for bug #2038853 (Subject locators are not removable) Modified Paths: -------------- tinytim/trunk/src/test/java/org/tinytim/AllTests.java Added Paths: ----------- tinytim/trunk/src/test/java/org/tinytim/TestTopic.java Modified: tinytim/trunk/src/test/java/org/tinytim/AllTests.java =================================================================== --- tinytim/trunk/src/test/java/org/tinytim/AllTests.java 2008-08-05 12:46:53 UTC (rev 94) +++ tinytim/trunk/src/test/java/org/tinytim/AllTests.java 2008-08-05 13:28:39 UTC (rev 95) @@ -45,6 +45,7 @@ suite.addTestSuite(TestItemIdentifierConstraint.class); suite.addTestSuite(TestReifiable.class); suite.addTestSuite(TestScoped.class); + suite.addTestSuite(TestTopic.class); suite.addTestSuite(TestSignatureGenerator.class); suite.addTest(TestTMAPICore.suite()); suite.addTest(TestTMAPIIndex.suite()); Added: tinytim/trunk/src/test/java/org/tinytim/TestTopic.java =================================================================== --- tinytim/trunk/src/test/java/org/tinytim/TestTopic.java (rev 0) +++ tinytim/trunk/src/test/java/org/tinytim/TestTopic.java 2008-08-05 13:28:39 UTC (rev 95) @@ -0,0 +1,44 @@ +/* + * This is tinyTiM, a tiny Topic Maps engine. + * + * Copyright (C) 2008 Lars Heuer (heuer[at]semagia.com) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free + * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + */ +package org.tinytim; + +import org.tmapi.core.Locator; +import org.tmapi.core.Topic; + +/** + * Tests against the {@link org.tmapi.core.Topic}. + * + * @author Lars Heuer (heuer[at]semagia.com) <a href="http://www.semagia.com/">Semagia</a> + * @version $Rev:$ - $Date:$ + */ +public class TestTopic extends TinyTimTestCase { + + public void testSubjectLocators() { + final Topic topic = _tm.createTopic(); + assertEquals(0, topic.getSubjectLocators().size()); + final Locator loc = _tm.createLocator("http://www.example.org/"); + topic.addSubjectLocator(loc); + assertEquals(1, topic.getSubjectLocators().size()); + assertTrue(topic.getSubjectLocators().contains(loc)); + topic.removeSubjectLocator(loc); + assertEquals(0, topic.getSubjectLocators().size()); + } +} Property changes on: tinytim/trunk/src/test/java/org/tinytim/TestTopic.java ___________________________________________________________________ Added: svn:keywords + Rev Date Id Added: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |