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: Updated tests, also moved to libadblockplus-android repo Created June 21, 2016, 10:51 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 57%
copy from libadblockplus-android/src/org/adblockplus/libadblockplus/AdblockPlusException.java
copy to libadblockplus-android-tests/src/org/adblockplus/libadblockplus/MockLogSystem.java
index 7e655ba71e65c7a8bfbfe9a4fa9c6b30a385ba55..33deb3fcd1961f91cf010e3d13c8bb8a20e05816 100644
--- a/libadblockplus-android/src/org/adblockplus/libadblockplus/AdblockPlusException.java
+++ b/libadblockplus-android-tests/src/org/adblockplus/libadblockplus/MockLogSystem.java
@@ -17,22 +17,30 @@
package org.adblockplus.libadblockplus;
-public class AdblockPlusException extends RuntimeException
-{
- private static final long serialVersionUID = -8127654134450836743L;
-
- public AdblockPlusException(final String message)
- {
- super(message);
- }
-
- public AdblockPlusException(final String message, final Throwable throwable)
- {
- super(message, throwable);
- }
-
- public AdblockPlusException(final Throwable throwable)
- {
- super(throwable);
- }
+public class MockLogSystem extends LogSystem {
+
+ private LogLevel lastLogLevel;
+
+ public LogLevel getLastLogLevel() {
+ return lastLogLevel;
+ }
+
+ private String lastMessage;
+
+ public String getLastMessage() {
+ return lastMessage;
+ }
+
+ private String lastSource;
+
+ public String getLastSource() {
+ return lastSource;
+ }
+
+ @Override
+ public void logCallback(LogLevel logLevel, String message, String source) {
+ lastLogLevel = logLevel;
+ lastMessage = message;
+ lastSource = source;
+ }
}

Powered by Google App Engine
This is Rietveld