Check order of files in test

This commit is contained in:
René Pfeuffer
2020-03-09 09:20:08 +01:00
parent b8ab729c45
commit 845a3ea72f

View File

@@ -66,6 +66,11 @@ public class HgBrowseCommandTest extends AbstractHgCommandTestBase {
@Test
public void testBrowse() throws IOException {
Collection<FileObject> foList = getRootFromTip(new BrowseCommandRequest());
assertThat(foList)
.extracting("name")
.containsExactly("c", "a.txt", "b.txt", "f.txt");
FileObject a = getFileObject(foList, "a.txt");
FileObject c = getFileObject(foList, "c");
@@ -108,6 +113,10 @@ public class HgBrowseCommandTest extends AbstractHgCommandTestBase {
assertEquals("c", c.getName());
Collection<FileObject> foList = c.getChildren();
assertThat(foList)
.extracting("name")
.containsExactly("d.txt", "e.txt");
assertNotNull(foList);
assertFalse(foList.isEmpty());
assertEquals(2, foList.size());