org.testng.asserts.LoggingAssert Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of testng Show documentation
Show all versions of testng Show documentation
Testing framework for Java
package org.testng.asserts;
import org.testng.collections.Lists;
import java.util.List;
/** Log the messages of all the assertions that get run. */
public class LoggingAssert extends Assertion {
private List m_messages = Lists.newArrayList();
@Override
public void onBeforeAssert(IAssert a) {
m_messages.add("Test:" + a.getMessage());
}
public List getMessages() {
return m_messages;
}
}