Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: libadblockplus-android-tests/src/org/adblockplus/libadblockplus/MockLogSystem.java

Issue 29344967: Issue 4031 - Implement tests for libadblockplus-android (Closed)
Patch Set: fixed in README.md Created Sept. 13, 2016, 10:43 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: libadblockplus-android-tests/src/org/adblockplus/libadblockplus/MockLogSystem.java
diff --git a/libadblockplus-android/src/org/adblockplus/libadblockplus/AdblockPlusException.java b/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/MockLogSystem.java
similarity index 60%
copy from libadblockplus-android/src/org/adblockplus/libadblockplus/AdblockPlusException.java
copy to libadblockplus-android-tests/src/org/adblockplus/libadblockplus/MockLogSystem.java
index 7e655ba71e65c7a8bfbfe9a4fa9c6b30a385ba55..a65052610f3d700619430719b9cea2ff666601d1 100644
--- a/libadblockplus-android/src/org/adblockplus/libadblockplus/AdblockPlusException.java
+++ b/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/MockLogSystem.java
@@ -17,22 +17,34 @@
package org.adblockplus.libadblockplus;
-public class AdblockPlusException extends RuntimeException
+public class MockLogSystem extends LogSystem
{
- private static final long serialVersionUID = -8127654134450836743L;
+ private LogLevel lastLogLevel;
- public AdblockPlusException(final String message)
+ public LogLevel getLastLogLevel()
{
- super(message);
+ return lastLogLevel;
}
- public AdblockPlusException(final String message, final Throwable throwable)
+ private String lastMessage;
+
+ public String getLastMessage()
+ {
+ return lastMessage;
+ }
+
+ private String lastSource;
+
+ public String getLastSource()
{
- super(message, throwable);
+ return lastSource;
}
- public AdblockPlusException(final Throwable throwable)
+ @Override
+ public void logCallback(LogLevel logLevel, String message, String source)
{
- super(throwable);
+ lastLogLevel = logLevel;
+ lastMessage = message;
+ lastSource = source;
}
}

Powered by Google App Engine
This is Rietveld