ruper2/src/test/core/org/krysalis/ruper2/repository RepositoryTests.java,1.1,1.2

[email protected]
Newsgroups gmane.comp.krysalis.metamorphosis.cvs
Message-ID <[email protected]>
Update of /cvsroot/metamorphosis/ruper2/src/test/core/org/krysalis/ruper2/repository
In directory sc8-pr-cvs1:/tmp/cvs-serv25526/src/test/core/org/krysalis/ruper2/repository

Modified Files:
	RepositoryTests.java 
Log Message:
1) Copied over Ruper1 documentation to work on
2) Worked on RepositoryTool [command line] to list groups/resoruces
3) Ignore .* files, and associate .MD5 w/ original. [Later check hash]

Index: RepositoryTests.java
===================================================================
RCS file: /cvsroot/metamorphosis/ruper2/src/test/core/org/krysalis/ruper2/repository/RepositoryTests.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** RepositoryTests.java	29 Sep 2003 18:09:17 -0000	1.1
--- RepositoryTests.java	1 Oct 2003 21:55:55 -0000	1.2
***************
*** 1,15 ****
  /*
   * Created on Aug 27, 2003
-  *
-  * To change the template for this generated file go to
-  * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
   */
  package org.krysalis.ruper2.repository;
  
  import junit.framework.TestCase;
  
  import org.krysalis.ruper2.impl.ResourceUpdaterContext;
  import org.krysalis.ruper2.resource.ResourceGroup;
  import org.krysalis.ruper2.util.select.AllSelector;
  
  /**
--- 1,16 ----
  /*
   * Created on Aug 27, 2003
   */
  package org.krysalis.ruper2.repository;
  
+ import java.util.List;
+ 
  import junit.framework.TestCase;
  
  import org.krysalis.ruper2.impl.ResourceUpdaterContext;
+ import org.krysalis.ruper2.log.Logger;
  import org.krysalis.ruper2.resource.ResourceGroup;
  import org.krysalis.ruper2.util.select.AllSelector;
+ import org.krysalis.version.util.debug.DebugUtils;
  
  /**
***************
*** 21,24 ****
--- 22,29 ----
  	private RepositoryWrapper m_repo2 = null;
  
+ //	static {
+ //		Logger.testInit();
+ //	}
+ 
  	public RepositoryTests(String name) {
  		super(name);
***************
*** 26,29 ****
--- 31,35 ----
  
  	public void setUp() throws Exception {
+ 
  		m_repo1 =
  			new RepositoryWrapper(
***************
*** 35,69 ****
  				ResourceUpdaterContext.getTestContext());
  	}
! 
! 	public void testListGroups1() throws Exception {
! 		assertNotNull(
! 			"List Groups",
! 			m_repo1.listGroups(AllSelector.getInstance()));
! 		assertNotNull(
! 			"List Groups",
! 			m_repo2.listGroups(AllSelector.getInstance()));
! 	}
  
  	public void testListResources1() throws Exception {
  		ResourceGroup testGroup = new ResourceGroup("junit");
  
! 		assertNotNull(
! 			"List Resources",
! 			m_repo1.listResources(testGroup, AllSelector.getInstance()));
! 		assertNotNull(
! 			"List Resources",
! 			m_repo2.listResources(testGroup, AllSelector.getInstance()));
! 	}
  
! 	public void testListSpecifiers1() throws Exception {
! 		ResourceGroup testGroup = new ResourceGroup("junit");
  
! 		assertNotNull(
! 			"List Specifiers",
! 			m_repo1.listSpecifiers(testGroup, AllSelector.getInstance()));
! 		assertNotNull(
! 			"List Specifiers",
! 			m_repo2.listSpecifiers(testGroup, AllSelector.getInstance()));
  	}
  
  	public static void main(String[] args) {
--- 41,85 ----
  				ResourceUpdaterContext.getTestContext());
  	}
! 	
! 		public void testListGroups1() throws Exception {
! 			List list1 = m_repo1.listGroups(AllSelector.getInstance());
! 			assertNotNull("List Groups", list1);
! 			assertFalse("List Groups Not Empty", list1.isEmpty());
! 	
! 			List list2 = m_repo2.listGroups(AllSelector.getInstance());
! 			assertNotNull("List Groups", list2);
! 			assertFalse("List Groups Not Empty", list2.isEmpty());
! 	
! 			//DebugUtils.dump("Test Groups", list1);
! 			//DebugUtils.dump("Mock Groups", list2);
! 		}
  
  	public void testListResources1() throws Exception {
  		ResourceGroup testGroup = new ResourceGroup("junit");
  
! 		List list1 =
! 			m_repo1.listResources(testGroup, AllSelector.getInstance());
! 		assertNotNull("List Resources", list1);
! 		assertFalse("List Resources not Empty", list1.isEmpty());
  
! 		List list2 =
! 			m_repo2.listResources(testGroup, AllSelector.getInstance());
! 		assertNotNull("List Resources", list2);
! 		assertFalse("List Resources not Empty", list2.isEmpty());
  
! //		DebugUtils.dump("Test Resources", list1);
! //		DebugUtils.dump("Mock Resources", list2);
  	}
+ 
+ 		public void testListSpecifiers1() throws Exception {
+ 			ResourceGroup testGroup = new ResourceGroup("junit");
+ 	
+ 			assertNotNull(
+ 				"List Specifiers",
+ 				m_repo1.listSpecifiers(testGroup, AllSelector.getInstance()));
+ 			assertNotNull(
+ 				"List Specifiers",
+ 				m_repo2.listSpecifiers(testGroup, AllSelector.getInstance()));
+ 		}
  
  	public static void main(String[] args) {




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.