Browse Source

Expose Sets helper to tests outside org.eclipse.jgit.api

A later patch will make use of this class in a org.eclipse.jgit.lib
test.

Change-Id: I2b268e6a5dbf12174201f45259f9f007686708d2
Signed-off-by: Jonathan Nieder <jrn@google.com>
stable-4.1
Jonathan Nieder 10 years ago
parent
commit
adbcbc791b
  1. 1
      org.eclipse.jgit.test/pom.xml
  2. 6
      org.eclipse.jgit.test/src/org/eclipse/jgit/lib/Sets.java
  3. 1
      org.eclipse.jgit.test/tst/org/eclipse/jgit/api/MergeCommandTest.java
  4. 1
      org.eclipse.jgit.test/tst/org/eclipse/jgit/api/StatusCommandTest.java

1
org.eclipse.jgit.test/pom.xml

@ -102,6 +102,7 @@
</dependencies>
<build>
<sourceDirectory>src/</sourceDirectory>
<testSourceDirectory>tst/</testSourceDirectory>
<testResources>

6
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/Sets.java → org.eclipse.jgit.test/src/org/eclipse/jgit/lib/Sets.java

@ -41,13 +41,13 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.eclipse.jgit.api;
package org.eclipse.jgit.lib;
import java.util.HashSet;
import java.util.Set;
class Sets {
static <T> Set<T> of(T... elements) {
public class Sets {
public static <T> Set<T> of(T... elements) {
Set<T> ret = new HashSet<T>();
for (T element : elements)
ret.add(element);

1
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/MergeCommandTest.java

@ -62,6 +62,7 @@ import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.Ref;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.lib.RepositoryState;
import org.eclipse.jgit.lib.Sets;
import org.eclipse.jgit.merge.MergeStrategy;
import org.eclipse.jgit.merge.ResolveMerger.MergeFailureReason;
import org.eclipse.jgit.revwalk.RevCommit;

1
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/StatusCommandTest.java

@ -53,6 +53,7 @@ import org.eclipse.jgit.api.errors.GitAPIException;
import org.eclipse.jgit.api.errors.NoFilepatternException;
import org.eclipse.jgit.errors.NoWorkTreeException;
import org.eclipse.jgit.junit.RepositoryTestCase;
import org.eclipse.jgit.lib.Sets;
import org.junit.Test;
public class StatusCommandTest extends RepositoryTestCase {

Loading…
Cancel
Save