fix mocks compilation

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1400903 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2012-10-22 14:50:49 +00:00
parent 69a9edb4c4
commit f1d408f40e
9 changed files with 69 additions and 7 deletions

View File

@ -207,4 +207,11 @@ public class TestMetadataRepository
{ {
} }
public void removeProject( String repositoryId, String namespace, String projectId )
throws MetadataRepositoryException
{
throw new UnsupportedOperationException();
}
} }

View File

@ -267,6 +267,13 @@ public class MockRepositorySessionFactory
{ {
} }
public void removeProject( String repositoryId, String namespace, String projectId )
throws MetadataRepositoryException
{
throw new UnsupportedOperationException();
}
}; };
} }
}; };

View File

@ -212,4 +212,11 @@ public class TestMetadataRepository
{ {
} }
public void removeProject( String repositoryId, String namespace, String projectId )
throws MetadataRepositoryException
{
throw new UnsupportedOperationException();
}
} }

View File

@ -267,6 +267,13 @@ public class MockRepositorySessionFactory
{ {
} }
public void removeProject( String repositoryId, String namespace, String projectId )
throws MetadataRepositoryException
{
throw new UnsupportedOperationException();
}
}; };
} }
}; };

View File

@ -267,6 +267,13 @@ public class MockRepositorySessionFactory
{ {
} }
public void removeProject( String repositoryId, String namespace, String projectId )
throws MetadataRepositoryException
{
throw new UnsupportedOperationException();
}
}; };
} }
}; };

View File

@ -31,6 +31,7 @@ import org.apache.archiva.metadata.repository.MetadataRepository;
import org.apache.archiva.metadata.repository.MetadataRepositoryException; import org.apache.archiva.metadata.repository.MetadataRepositoryException;
import org.apache.archiva.metadata.repository.MetadataResolutionException; import org.apache.archiva.metadata.repository.MetadataResolutionException;
import org.apache.archiva.rss.RssFeedGenerator; import org.apache.archiva.rss.RssFeedGenerator;
import org.apache.archiva.test.utils.ArchivaBlockJUnit4ClassRunner;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@ -43,9 +44,8 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.TimeZone; import java.util.TimeZone;
import org.apache.archiva.test.utils.ArchivaBlockJUnit4ClassRunner;
@RunWith( ArchivaBlockJUnit4ClassRunner.class ) @RunWith (ArchivaBlockJUnit4ClassRunner.class)
public class NewArtifactsRssFeedProcessorTest public class NewArtifactsRssFeedProcessorTest
extends TestCase extends TestCase
{ {
@ -67,7 +67,7 @@ public class NewArtifactsRssFeedProcessorTest
metadataRepository = new MetadataRepositoryMock(); metadataRepository = new MetadataRepositoryMock();
} }
@SuppressWarnings( "unchecked" ) @SuppressWarnings ("unchecked")
@Test @Test
public void testProcess() public void testProcess()
throws Exception throws Exception
@ -99,15 +99,15 @@ public class NewArtifactsRssFeedProcessorTest
assertEquals( TEST_REPO, metadataRepository.getRepoId() ); assertEquals( TEST_REPO, metadataRepository.getRepoId() );
assertTrue( feed.getTitle().equals( "New Artifacts in Repository 'test-repo'" ) ); assertTrue( feed.getTitle().equals( "New Artifacts in Repository 'test-repo'" ) );
assertTrue( feed.getDescription().equals( assertTrue(
"New artifacts found in repository 'test-repo' during repository scan." ) ); feed.getDescription().equals( "New artifacts found in repository 'test-repo' during repository scan." ) );
assertTrue( feed.getLanguage().equals( "en-us" ) ); assertTrue( feed.getLanguage().equals( "en-us" ) );
assertTrue( feed.getPublishedDate().equals( whenGathered ) ); assertTrue( feed.getPublishedDate().equals( whenGathered ) );
List<SyndEntry> entries = feed.getEntries(); List<SyndEntry> entries = feed.getEntries();
assertEquals( entries.size(), 1 ); assertEquals( entries.size(), 1 );
assertTrue( entries.get( 0 ).getTitle().equals( assertTrue(
"New Artifacts in Repository 'test-repo' as of " + whenGathered ) ); entries.get( 0 ).getTitle().equals( "New Artifacts in Repository 'test-repo' as of " + whenGathered ) );
assertTrue( entries.get( 0 ).getPublishedDate().equals( whenGathered ) ); assertTrue( entries.get( 0 ).getPublishedDate().equals( whenGathered ) );
} }
@ -286,6 +286,12 @@ public class NewArtifactsRssFeedProcessorTest
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
public void removeProject( String repositoryId, String namespace, String projectId )
throws MetadataRepositoryException
{
throw new UnsupportedOperationException();
}
public void setFrom( Date from ) public void setFrom( Date from )
{ {
this.from = from; this.from = from;

View File

@ -247,4 +247,11 @@ public class TestMetadataRepository
{ {
} }
public void removeProject( String repositoryId, String namespace, String projectId )
throws MetadataRepositoryException
{
throw new UnsupportedOperationException();
}
} }

View File

@ -208,4 +208,11 @@ public class TestMetadataRepository
{ {
} }
public void removeProject( String repositoryId, String namespace, String projectId )
throws MetadataRepositoryException
{
throw new UnsupportedOperationException();
}
} }

View File

@ -223,4 +223,11 @@ public class TestMetadataRepository
{ {
} }
public void removeProject( String repositoryId, String namespace, String projectId )
throws MetadataRepositoryException
{
throw new UnsupportedOperationException();
}
} }