1 package org.apache.archiva.web.test;
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied. See the License for the
18 * specific language governing permissions and limitations
22 import org.apache.archiva.web.test.parent.AbstractArtifactManagementTest;
23 import org.testng.annotations.Test;
25 @Test( groups = { "legacysupport" }, dependsOnMethods = { "testWithCorrectUsernamePassword" }, sequential = true )
26 public class LegacySupportTest
27 extends AbstractArtifactManagementTest
29 public void testAddLegacyArtifact_NullValues()
31 goToLegacySupportPage();
32 clickLinkWithText( "Add" );
33 addLegacyArtifactPath( "" , "" , "" , "" , "" , "");
34 assertTextPresent( "You must enter a legacy path." );
35 assertTextPresent( "You must enter a groupId." );
36 assertTextPresent( "You must enter an artifactId." );
37 assertTextPresent( "You must enter a version." );
38 assertTextPresent( "You must enter a type." );
41 @Test( dependsOnMethods = { "testAddLegacyArtifact_NullValues" })
42 public void testAddLegacyArtifact_NullLegacyPath()
44 addLegacyArtifactPath( "" , "test" , "test" , "1.0-SNAPSHOT" , "testing" , "jar");
45 assertTextPresent( "You must enter a legacy path." );
48 @Test( dependsOnMethods = { "testAddLegacyArtifact_NullLegacyPath" })
49 public void testAddLegacyArtifact_NullGroupId()
51 addLegacyArtifactPath( "test" , "" , "test" , "1.0-SNAPSHOT" , "testing" , "jar");
52 assertTextPresent( "You must enter a groupId." );
55 @Test( dependsOnMethods = { "testAddLegacyArtifact_NullGroupId" })
56 public void testAddLegacyArtifact_NullArtifactId()
58 addLegacyArtifactPath( "test" , "test" , "" , "1.0-SNAPSHOT" , "testing" , "jar");
59 assertTextPresent( "You must enter an artifactId." );
62 @Test( dependsOnMethods = { "testAddLegacyArtifact_NullArtifactId" })
63 public void testAddLegacyArtifact_NullVersion()
65 addLegacyArtifactPath( "test" , "test" , "test" , "" , "testing" , "jar");
66 assertTextPresent( "You must enter a version." );
69 @Test( dependsOnMethods = { "testAddLegacyArtifact_NullVersion" })
70 public void testAddLegacyArtifact_NullType()
72 addLegacyArtifactPath( "test" , "test" , "test" , "1.0-SNAPSHOT" , "testing" , "");
73 assertTextPresent( "You must enter a type." );