mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-13 15:42:23 +00:00
Upgrade Gradle to 5.6.2 and AGP to 3.5.1
This commit is contained in:
committed by
Greyson Parrelli
parent
86d088bce2
commit
9e3475ed94
@@ -1,15 +1,31 @@
|
||||
package org.thoughtcrime.securesms.util;
|
||||
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mockito;
|
||||
import org.mockito.stubbing.Answer;
|
||||
import org.powermock.api.mockito.PowerMockito;
|
||||
import org.powermock.core.classloader.annotations.PrepareForTest;
|
||||
import org.powermock.modules.junit4.PowerMockRunner;
|
||||
|
||||
import static junit.framework.Assert.assertEquals;
|
||||
|
||||
@RunWith(PowerMockRunner.class)
|
||||
@PrepareForTest(TextUtils.class)
|
||||
public class DelimiterUtilTest {
|
||||
|
||||
@Before
|
||||
public void setup() {}
|
||||
public void setup() {
|
||||
PowerMockito.mockStatic(TextUtils.class);
|
||||
PowerMockito.when(TextUtils.isEmpty(Mockito.anyString())).thenAnswer((Answer<Boolean>) invocation -> {
|
||||
if (invocation.getArguments()[0] == null) return true;
|
||||
return ((String) invocation.getArguments()[0]).isEmpty();
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testEscape() {
|
||||
|
||||
Reference in New Issue
Block a user