-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: https://svn.apache.org/repos/asf/maven/release/trunk@1334063 13f79535-47bb-0310-9956-ffa450edef68
- Loading branch information
Showing
5 changed files
with
251 additions
and
0 deletions.
There are no files selected for viewing
50 changes: 50 additions & 0 deletions
50
...manager/src/test/java/org/apache/maven/shared/release/scm/ClearCaseScmTranslatorTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package org.apache.maven.shared.release.scm; | ||
|
||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
import junit.framework.TestCase; | ||
|
||
public class ClearCaseScmTranslatorTest | ||
extends TestCase | ||
{ | ||
private ClearCaseScmTranslator scmTranslator = new ClearCaseScmTranslator(); | ||
|
||
/** | ||
* @see org.apache.maven.model.Scm#getTag() | ||
*/ | ||
public void testResolveTag() | ||
{ | ||
// with current implementation you can't call your tag 'HEAD' (which is the default) | ||
assertEquals( null, scmTranslator.resolveTag( "HEAD" ) ); | ||
assertEquals( "project-1.0", scmTranslator.resolveTag( "project-1.0" ) ); | ||
} | ||
|
||
public void testTranslateTagUrl() | ||
{ | ||
assertEquals( "url", scmTranslator.translateTagUrl( "url", "tag", null ) ); | ||
assertEquals( "url", scmTranslator.translateTagUrl( "url", "tag", "tagBase" ) ); | ||
} | ||
|
||
public void testTranslateBranchUrl() | ||
{ | ||
assertEquals( "url", scmTranslator.translateBranchUrl( "url", "branchName", null ) ); | ||
assertEquals( "url", scmTranslator.translateBranchUrl( "url", "branchName", "tagBase" ) ); | ||
} | ||
} |
50 changes: 50 additions & 0 deletions
50
...lease-manager/src/test/java/org/apache/maven/shared/release/scm/GitScmTranslatorTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package org.apache.maven.shared.release.scm; | ||
|
||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
import junit.framework.TestCase; | ||
|
||
public class GitScmTranslatorTest | ||
extends TestCase | ||
{ | ||
|
||
private GitScmTranslator scmTranslator = new GitScmTranslator(); | ||
|
||
/** | ||
* @see org.apache.maven.model.Scm#getTag() | ||
*/ | ||
public void testResolveTag() | ||
{ | ||
assertEquals( "HEAD", scmTranslator.resolveTag( "HEAD" ) ); | ||
assertEquals( "project-1.0", scmTranslator.resolveTag( "project-1.0" ) ); | ||
} | ||
|
||
public void testTranslateTagUrl() | ||
{ | ||
assertEquals( "url", scmTranslator.translateTagUrl( "url", "tag", null ) ); | ||
assertEquals( "url", scmTranslator.translateTagUrl( "url", "tag", "tagBase" ) ); | ||
} | ||
|
||
public void testTranslateBranchUrl() | ||
{ | ||
assertEquals( "url", scmTranslator.translateBranchUrl( "url", "branchName", null ) ); | ||
assertEquals( "url", scmTranslator.translateBranchUrl( "url", "branchName", "tagBase" ) ); | ||
} | ||
} |
49 changes: 49 additions & 0 deletions
49
...elease-manager/src/test/java/org/apache/maven/shared/release/scm/HgScmTranslatorTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package org.apache.maven.shared.release.scm; | ||
|
||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
import junit.framework.TestCase; | ||
|
||
public class HgScmTranslatorTest | ||
extends TestCase | ||
{ | ||
private HgScmTranslator scmTranslator = new HgScmTranslator(); | ||
|
||
/** | ||
* @see org.apache.maven.model.Scm#getTag() | ||
*/ | ||
public void testResolveTag() | ||
{ | ||
assertEquals( "HEAD", scmTranslator.resolveTag( "HEAD" ) ); | ||
assertEquals( "project-1.0", scmTranslator.resolveTag( "project-1.0" ) ); | ||
} | ||
|
||
public void testTranslateTagUrl() | ||
{ | ||
assertEquals( "url", scmTranslator.translateTagUrl( "url", "tag", null ) ); | ||
assertEquals( "url", scmTranslator.translateTagUrl( "url", "tag", "tagBase" ) ); | ||
} | ||
|
||
public void testTranslateBranchUrl() | ||
{ | ||
assertEquals( "url", scmTranslator.translateBranchUrl( "url", "branchName", null ) ); | ||
assertEquals( "url", scmTranslator.translateBranchUrl( "url", "branchName", "tagBase" ) ); | ||
} | ||
} |
51 changes: 51 additions & 0 deletions
51
...ease-manager/src/test/java/org/apache/maven/shared/release/scm/JazzScmTranslatorTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
package org.apache.maven.shared.release.scm; | ||
|
||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
import junit.framework.TestCase; | ||
|
||
public class JazzScmTranslatorTest | ||
extends TestCase | ||
{ | ||
|
||
private JazzScmTranslator scmTranslator = new JazzScmTranslator(); | ||
|
||
/** | ||
* @see org.apache.maven.model.Scm#getTag() | ||
*/ | ||
public void testResolveTag() | ||
{ | ||
assertNull( scmTranslator.resolveTag( "HEAD" ) ); | ||
assertNull( scmTranslator.resolveTag( "project-1.0" ) ); | ||
} | ||
|
||
//@todo define expected results | ||
// public void testTranslateTagUrl() | ||
// { | ||
// assertEquals( , scmTranslator.translateTagUrl( "url", "tag", null ) ); | ||
// assertEquals( , scmTranslator.translateTagUrl( "url", "tag", "tagBase" ) ); | ||
// } | ||
// | ||
// public void testTranslateBranchUrl() | ||
// { | ||
// assertEquals( , scmTranslator.translateBranchUrl( "url", "branchName", null ) ); | ||
// assertEquals( , scmTranslator.translateBranchUrl( "url", "branchName", "tagBase" ) ); | ||
// } | ||
} |
51 changes: 51 additions & 0 deletions
51
...anager/src/test/java/org/apache/maven/shared/release/scm/SubversionScmTranslatorTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
package org.apache.maven.shared.release.scm; | ||
|
||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
import junit.framework.TestCase; | ||
|
||
public class SubversionScmTranslatorTest | ||
extends TestCase | ||
{ | ||
|
||
private SubversionScmTranslator scmTranslator = new SubversionScmTranslator(); | ||
|
||
/** | ||
* @see org.apache.maven.model.Scm#getTag() | ||
*/ | ||
public void testResolveTag() | ||
{ | ||
// "HEAD"is default | ||
assertNull( scmTranslator.resolveTag( "HEAD" ) ); | ||
assertNull( scmTranslator.resolveTag( "project-1.0" ) ); | ||
} | ||
|
||
public void testTranslateTagUrl() | ||
{ | ||
assertEquals( "url/tags/tag", scmTranslator.translateTagUrl( "url", "tag", null ) ); | ||
assertEquals( "tagBase/tag", scmTranslator.translateTagUrl( "url", "tag", "tagBase" ) ); | ||
} | ||
|
||
public void testTranslateBranchUrl() | ||
{ | ||
assertEquals( "url/branches/branchName", scmTranslator.translateBranchUrl( "url", "branchName", null ) ); | ||
assertEquals( "tagBase/branchName", scmTranslator.translateBranchUrl( "url", "branchName", "tagBase" ) ); | ||
} | ||
} |