1 package com
.intellij
.localvcs
;
3 import java
.util
.ArrayList
;
4 import java
.util
.Arrays
;
5 import java
.util
.Collection
;
8 import org
.junit
.Assert
;
9 import org
.junit
.Before
;
11 public class TestCase
extends Assert
{
12 protected LocalVcs vcs
;
21 protected Path
p(String name
) {
22 return new Path(name
);
25 protected ChangeSet
cs(Change
... changes
) {
26 return new ChangeSet(Arrays
.asList(changes
));
29 @SuppressWarnings("unchecked")
30 protected void assertElements(Object
[] expected
, Collection actual
) {
31 assertEquals(expected
.length
, actual
.size());
32 assertTrue(actual
.containsAll(Arrays
.asList(expected
)));
35 protected void assertEntiesContents(String
[] expectedContents
,
36 Collection
<Entry
> actualEntries
) {
37 List
<String
> actualContents
= new ArrayList
<String
>();
38 for (Entry rev
: actualEntries
) {
39 actualContents
.add(rev
.getContent());
41 assertEquals(expectedContents
, actualContents
.toArray(new Object
[0]));