incubator-depot-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject svn commit: rev 23099 - incubator/depot/trunk/update/src/test/org/apache/depot/update
Date Tue, 20 Jul 2004 21:02:20 GMT
Author: mmay
Date: Tue Jul 20 14:02:19 2004
New Revision: 23099

Added:
   incubator/depot/trunk/update/src/test/org/apache/depot/update/ArtifactInstanceTest.java
Log:
Added Test for ArtifactInstance

Added: incubator/depot/trunk/update/src/test/org/apache/depot/update/ArtifactInstanceTest.java
==============================================================================
--- (empty file)
+++ incubator/depot/trunk/update/src/test/org/apache/depot/update/ArtifactInstanceTest.java
Tue Jul 20 14:02:19 2004
@@ -0,0 +1,69 @@
+/*
+ * Created on Jul 15, 2004
+ *
+ * TODO To change the template for this generated file go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+package org.apache.depot.update;
+
+import junit.framework.TestCase;
+
+import org.apache.depot.update.artifact.ArtifactLocator;
+import org.apache.depot.update.util.net.VirtualResourceLocator;
+
+/**
+ * @author <a href="http://incubator.apache.org/depot">The Apache Incubator Depot Project</a>
+ */
+public class ArtifactInstanceTest extends TestCase {
+	
+	Artifact artifact;
+	VirtualResourceLocator vrl;
+	ArtifactLocator locator;
+	
+	public ArtifactInstanceTest(String name) {
+		super(name);
+	}
+	
+	/* (non-Javadoc)
+	 * @see junit.framework.TestCase#setUp()
+	 */
+	protected void setUp() throws Exception {
+		super.setUp();
+
+		artifact = new Artifact("identifier");
+		vrl = new VirtualResourceLocator("http://somewhere");
+		locator = new ArtifactLocator("junit","jar",vrl);
+		
+	}
+	
+	public void testEquals() {		
+		ArtifactInstance instance1 = new ArtifactInstance(artifact,locator);
+		ArtifactInstance instance2 = new ArtifactInstance(artifact,locator);
+		
+		assertEquals(instance1, instance2);
+	}
+	
+	public void testClone() {
+		ArtifactInstance instance1 = new ArtifactInstance(artifact,locator);
+		ArtifactInstance instance2 = (ArtifactInstance)instance1.clone();
+		
+		assertEquals(instance1, instance2);
+	}
+
+	public void testGetIdentifier() {
+		ArtifactInstance instance1 = new ArtifactInstance(artifact,locator);
+
+		assertEquals(artifact.getIdentifier(), instance1.getIdentifier());
+	}
+
+	public void testGetSelectionObject() {
+		
+	}
+
+	public void testGetArtifact() {
+	}
+
+	public void testGetLocator() {
+	}
+
+}

Mime
View raw message