@Test public void onScanResult() { final ScanResult scanResult = MockScanResultFactory.createScanResult(); cut.onScanResult(1, scanResult); verifyLogger().onScanResult(1, scanResult); verifyWrappedCallback().onScanResult(1, scanResult); }
@Override public void onScanResult(int callbackType, ScanResult result) { logger.onScanResult(callbackType, result); callback.onScanResult(callbackType, result); }
DebugScanCallback extends ScanCallback implements LogControl { @Override public void onScanResult(int callbackType, ScanResult result) { logger.onScanResult(callbackType, result); callback.onScanResult(callbackType, result); } }
DebugScanCallback extends ScanCallback implements LogControl { @Override public void onScanResult(int callbackType, ScanResult result) { logger.onScanResult(callbackType, result); callback.onScanResult(callbackType, result); } @SuppressWarnings({"unused", "WeakerAccess"})  DebugScanCallback(); @SuppressWarnings({"unused", "WeakerAccess"})  DebugScanCallback(@NonNull final ScanCallback callback); @SuppressWarnings({"unused", "WeakerAccess"})  DebugScanCallback(@NonNull String logTag,
                             @NonNull final ScanCallback callback); @SuppressWarnings({"unused", "WeakerAccess"}) @VisibleForTesting  DebugScanCallback(
            @NonNull final String logTag,
            @NonNull final ScanCallbackLogger logger,
            @NonNull final ScanCallback callback); }
DebugScanCallback extends ScanCallback implements LogControl { @Override public void onScanResult(int callbackType, ScanResult result) { logger.onScanResult(callbackType, result); callback.onScanResult(callbackType, result); } @SuppressWarnings({"unused", "WeakerAccess"})  DebugScanCallback(); @SuppressWarnings({"unused", "WeakerAccess"})  DebugScanCallback(@NonNull final ScanCallback callback); @SuppressWarnings({"unused", "WeakerAccess"})  DebugScanCallback(@NonNull String logTag,
                             @NonNull final ScanCallback callback); @SuppressWarnings({"unused", "WeakerAccess"}) @VisibleForTesting  DebugScanCallback(
            @NonNull final String logTag,
            @NonNull final ScanCallbackLogger logger,
            @NonNull final ScanCallback callback); @Override void onScanResult(int callbackType, ScanResult result); @Override void onBatchScanResults(List<ScanResult> results); @Override void onScanFailed(int errorCode); @Override boolean isLoggingEnabled(); @Override void setLoggingEnabled(final boolean enabled); }
DebugScanCallback extends ScanCallback implements LogControl { @Override public void onScanResult(int callbackType, ScanResult result) { logger.onScanResult(callbackType, result); callback.onScanResult(callbackType, result); } @SuppressWarnings({"unused", "WeakerAccess"})  DebugScanCallback(); @SuppressWarnings({"unused", "WeakerAccess"})  DebugScanCallback(@NonNull final ScanCallback callback); @SuppressWarnings({"unused", "WeakerAccess"})  DebugScanCallback(@NonNull String logTag,
                             @NonNull final ScanCallback callback); @SuppressWarnings({"unused", "WeakerAccess"}) @VisibleForTesting  DebugScanCallback(
            @NonNull final String logTag,
            @NonNull final ScanCallbackLogger logger,
            @NonNull final ScanCallback callback); @Override void onScanResult(int callbackType, ScanResult result); @Override void onBatchScanResults(List<ScanResult> results); @Override void onScanFailed(int errorCode); @Override boolean isLoggingEnabled(); @Override void setLoggingEnabled(final boolean enabled);  }