All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.securegraph.test.util.IterableUtils Maven / Gradle / Ivy

The newest version!
package org.securegraph.test.util;

import static org.junit.Assert.assertTrue;

public class IterableUtils {
    public static  void assertContains(Object expected, Iterable iterable) {
        StringBuilder found = new StringBuilder();
        boolean first = true;
        for (T o : iterable) {
            if (expected.equals(o)) {
                return;
            }
            if (!first) {
                found.append(", ");
            }
            found.append(o);
            first = false;
        }
        assertTrue("Iterable does not contain [" + expected + "], found [" + found + "]", false);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy