1 package com.android.documentsui.testing; 2 3 import static junit.framework.Assert.assertEquals; 4 5 import com.android.documentsui.base.DocumentInfo; 6 import com.android.documentsui.base.DocumentStack; 7 import com.android.documentsui.base.RootInfo; 8 9 import java.util.List; 10 11 /** 12 * Helpers for assertions on {@link DocumentStack}. 13 */ 14 public class DocumentStackAsserts { 15 DocumentStackAsserts()16 private DocumentStackAsserts() {} 17 assertEqualsTo(DocumentStack stack, RootInfo root, List<DocumentInfo> docs)18 public static void assertEqualsTo(DocumentStack stack, RootInfo root, List<DocumentInfo> docs) { 19 assertEquals(root, stack.getRoot()); 20 assertEquals(docs.size(), stack.size()); 21 for (int i = 0; i < docs.size(); ++i) { 22 assertEquals(docs.get(i), stack.get(i)); 23 } 24 } 25 } 26