- modified the scripts to use a property file(testng.properties) for dotnet artifact's groupId, artifactId and version

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@925149 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Marecor M. Baclay 2010-03-19 09:13:31 +00:00
parent 203660343d
commit 8d9c3f7613
2 changed files with 12 additions and 4 deletions

View File

@ -85,6 +85,10 @@ PACKAGING1=jar
ARTIFACTFILEPATH1=test ARTIFACTFILEPATH1=test
REPOSITORYID1=internal REPOSITORYID1=internal
GROUPID_DOTNETARTIFACT=dotNetTypes
ARTIFACTID_DOTNETARTIFACT=dotNetTypes
PACKAGING_DOTNETARTIFACT=library
SNAPSHOT_GROUPID=org.apache.archiva SNAPSHOT_GROUPID=org.apache.archiva
SNAPSHOT_ARTIFACTID=archiva-test SNAPSHOT_ARTIFACTID=archiva-test
SNAPSHOT_VERSION=1.0-SNAPSHOT SNAPSHOT_VERSION=1.0-SNAPSHOT

View File

@ -96,15 +96,19 @@ public class ArtifactManagementTest
@Test( groups = "requiresUpload" ) @Test( groups = "requiresUpload" )
public void testDotNetTypes() public void testDotNetTypes()
{ {
addArtifact( "dotNetTypes", "dotNetTypes", getVersion(), "library", getArtifactFilePath(), String groupId = getProperty( "GROUPID_DOTNETARTIFACT" );
String artifactId = getProperty( "ARTIFACTID_DOTNETARTIFACT" );
String packaging = getProperty ( "PACKAGING_DOTNETARTIFACT" );
addArtifact( groupId, artifactId, getVersion(), packaging, getArtifactFilePath(),
getRepositoryId() ); getRepositoryId() );
assertTextPresent( "Artifact 'dotNetTypes:dotNetTypes:1.0' was successfully deployed to repository 'internal'" ); assertTextPresent( "Artifact '" + groupId + ":" + artifactId + ":" + getVersion() + "' was successfully deployed to repository 'internal'" );
getSelenium().open( baseUrl + "/browse/" + "dotNetTypes" + "/dotNetTypes/" + getVersion() ); getSelenium().open( baseUrl + "/browse/" + groupId + "/" + artifactId + "/" + getVersion() );
waitPage(); waitPage();
assertTextPresent( "<type>library</type>" ); assertTextPresent( "<type>library</type>" );
String basePath = String basePath =
"/archiva/repository/internal/" + "dotNetTypes" + "/dotNetTypes/" + getVersion() + "/dotNetTypes-" + "/archiva/repository/internal/" + groupId + "/" + artifactId + "/" + getVersion() + "/dotNetTypes-" +
getVersion(); getVersion();
assertLinkPresent( ".NET Library" ); assertLinkPresent( ".NET Library" );
assertElementPresent( "//a[@href='" + basePath + ".dll']" ); assertElementPresent( "//a[@href='" + basePath + ".dll']" );