Update of /cvsroot/metamorphosis/ruper2/src/test/core/org/krysalis/ruper/repository
In directory sc8-pr-cvs1:/tmp/cvs-serv19607/src/test/core/org/krysalis/ruper/repository
Modified Files:
RepositoryTests.java
Log Message:
Started a mock repository, for unit testing.
Index: RepositoryTests.java
===================================================================
RCS file: /cvsroot/metamorphosis/ruper2/src/test/core/org/krysalis/ruper/repository/RepositoryTests.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** RepositoryTests.java 24 Sep 2003 16:37:58 -0000 1.1
--- RepositoryTests.java 25 Sep 2003 23:05:45 -0000 1.2
***************
*** 7,12 ****
package org.krysalis.ruper.repository;
- import java.util.List;
-
import junit.framework.TestCase;
--- 7,10 ----
***************
*** 21,25 ****
public class RepositoryTests extends TestCase {
! private RepositoryWrapper m_repo = null;
public RepositoryTests(String name) {
--- 19,24 ----
public class RepositoryTests extends TestCase {
! private RepositoryWrapper m_repo1 = null;
! private RepositoryWrapper m_repo2 = null;
public RepositoryTests(String name) {
***************
*** 28,60 ****
public void setUp() throws Exception {
! m_repo =
new RepositoryWrapper(
DefaultRepository.getLocalTestRepository(),
ResourceUpdaterContext.getTestContext());
}
- //
- // public void testListGroups1() throws Exception {
- //
- // List groups = m_repo.listGroups(AllSelector.getInstance());
- //
- // DebugUtils.dump(groups);
- // }
- //
- // public void testListResources1() throws Exception {
- // ResourceGroup testGroup = new ResourceGroup("junit");
- //
- // List resources =
- // m_repo.listResources(testGroup, AllSelector.getInstance());
- //
- // DebugUtils.dump(resources);
- // }
! public void testListSpecifiers1() throws Exception {
ResourceGroup testGroup = new ResourceGroup("junit");
! List resources =
! m_repo.listSpecifiers(testGroup, AllSelector.getInstance());
! DebugUtils.dump(resources);
}
--- 27,69 ----
public void setUp() throws Exception {
! m_repo1 =
new RepositoryWrapper(
DefaultRepository.getLocalTestRepository(),
ResourceUpdaterContext.getTestContext());
+ m_repo2 =
+ new RepositoryWrapper(
+ MockRepository.getMockRepository(),
+ 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()));
}
-------------------------------------------------------
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.