cvs commit: spice/sandbox/repository/componenthaus/src/tests/org/componenthaus/repository/impl ServiceImplTestCase.java
Mike Hogan <[email protected]> Sun, 09 Nov 2003 06:00:50 -0800
| Newsgroups | gmane.comp.java.spice.cvs |
|---|---|
| Message-ID | <[email protected]> |
hogie 03/11/09 06:00:50
Added: sandbox/repository/componenthaus/src/tests/org/componenthaus/repository/impl
ServiceImplTestCase.java
Log:
If components are classes, show as little of the class as necessary to show service offering
Revision Changes Path
1.1 spice/sandbox/repository/componenthaus/src/tests/org/componenthaus/repository/impl/ServiceImplTestCase.java
Index: ServiceImplTestCase.java
===================================================================
package org.componenthaus.repository.impl;
import junit.framework.TestCase;
public class ServiceImplTestCase extends TestCase {
private ServiceImpl impl = null;
protected void setUp() throws Exception {
impl = new ServiceImpl();
}
public void testDoesNotEqualAPlainObject() {
assertFalse(impl.equals(new Object()));
}
public void testDoesNotEqualNull() {
assertFalse(impl.equals(null));
}
public void testEqualsSameInstance() {
assertTrue(impl.equals(impl));
}
public void testEqualsSimilarEmptyInstance() {
assertTrue(impl.equals(new ServiceImpl()));
}
public void testEqualSimilarNonEmptyInstance() {
impl.setName("name");
ServiceImpl secondImpl = new ServiceImpl();
secondImpl.setName("name");
assertEquals(impl, secondImpl);
}
}
-------------------------------------------------------
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/