changing anonymous subclass to lambda

This commit is contained in:
James Kerak 2016-11-10 09:02:46 -05:00
parent 6708feb70c
commit 997b3cabbe
1 changed files with 3 additions and 6 deletions

View File

@ -56,13 +56,10 @@ public class OkHttpFileUploadingLiveTest {
.build(); .build();
ProgressRequestWrapper.ProgressListener listener = new ProgressRequestWrapper.ProgressListener() { ProgressRequestWrapper.ProgressListener listener = (bytesWritten, contentLength) -> {
public void onRequestProgress(long bytesWritten, long contentLength) {
float percentage = 100f * bytesWritten / contentLength; float percentage = 100f * bytesWritten / contentLength;
assertFalse(Float.compare(percentage, 100) > 0); assertFalse(Float.compare(percentage, 100) > 0);
}
}; };
ProgressRequestWrapper countingBody = new ProgressRequestWrapper(requestBody, listener); ProgressRequestWrapper countingBody = new ProgressRequestWrapper(requestBody, listener);