cvs commit: spice/sandbox/repository/componenthaus/src/tests/org/componenthaus/repository/impl ServiceImplTestCase.java
Mike Hogan <[email protected]> Mon, 10 Nov 2003 12:21:43 -0800
| Newsgroups | gmane.comp.java.spice.cvs |
|---|---|
| Message-ID | <[email protected]> |
hogie 03/11/10 12:21:43
Modified: sandbox/repository/componenthaus/src/tests/org/componenthaus/repository/impl
ServiceImplTestCase.java
Log:
Preview release with plexus-utils components
Revision Changes Path
1.2 +41 -0 spice/sandbox/repository/componenthaus/src/tests/org/componenthaus/repository/impl/ServiceImplTestCase.java
Index: ServiceImplTestCase.java
===================================================================
RCS file: /cvsroot/spice/spice/sandbox/repository/componenthaus/src/tests/org/componenthaus/repository/impl/ServiceImplTestCase.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ServiceImplTestCase.java 9 Nov 2003 14:00:50 -0000 1.1
+++ ServiceImplTestCase.java 10 Nov 2003 20:21:43 -0000 1.2
@@ -2,6 +2,9 @@
import junit.framework.TestCase;
+import java.util.List;
+import java.util.ArrayList;
+
public class ServiceImplTestCase extends TestCase {
private ServiceImpl impl = null;
@@ -30,5 +33,43 @@
ServiceImpl secondImpl = new ServiceImpl();
secondImpl.setName("name");
assertEquals(impl, secondImpl);
+ }
+
+ public void testCanGetSetVersion() {
+ String version = "1234123";
+ assertNull(impl.getVersion());
+ impl.setVersion(version);
+ assertSame(version,impl.getVersion());
+ }
+
+ public void testCanGetSetAuthors() {
+ assertEquals(0,impl.getAuthors().size());
+ List newAuthors = new ArrayList();
+ final String authorName = "An author";
+ newAuthors.add(authorName);
+ impl.setAuthors(newAuthors);
+ assertEquals(1,impl.getAuthors().size());
+ assertTrue(impl.getAuthors().contains(authorName));
+ }
+
+ public void testCanGetSetOneLineDescription() {
+ assertNull(impl.getOneLineDescription());
+ String desc = "elkjlkjlkjlkj";
+ impl.setOneLineDescription(desc);
+ assertSame(desc, impl.getOneLineDescription());
+ }
+
+ public void testCanGetSetFullDescription() {
+ assertNull(impl.getFullDescription());
+ String desc = "elkjlkjlkjlkj";
+ impl.setFullDescription(desc);
+ assertSame(desc, impl.getFullDescription());
+ }
+
+ public void testCanGetSetFulllyQualifiedName() {
+ assertNull(impl.getFullyQualifiedName());
+ String name = "elkjlkjlkjlkj";
+ impl.setFullyQualifiedName(name);
+ assertSame(name, impl.getFullyQualifiedName());
}
}
-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/