feat:删除无关紧要的代码

This commit is contained in:
Max
2023-11-23 18:44:33 +08:00
parent 45ab9ac463
commit c7ff6f0524
27 changed files with 3 additions and 1563 deletions

View File

@@ -8,7 +8,6 @@ android {
defaultConfig {
minSdkVersion MIN_SDK_VERSION.toInteger()
targetSdkVersion TARGET_SDK_VERSION.toInteger()
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
@@ -61,9 +60,6 @@ def Lombok = "1.18.24"
dependencies {
api fileTree(dir: 'libs', include: ['*.jar'])
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
api "com.orhanobut:logger:${loggerVersion}"

View File

@@ -1,27 +0,0 @@
package com.chwl.core;
import static org.junit.Assert.assertEquals;
import android.content.Context;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;
import org.junit.Test;
import org.junit.runner.RunWith;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.chwl.core.test", appContext.getPackageName());
}
}

View File

@@ -1,41 +0,0 @@
package com.chwl.core;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
import io.reactivex.Single;
import io.reactivex.SingleEmitter;
import io.reactivex.SingleOnSubscribe;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
@Test
public void test_blockingGet() throws Exception{
try {
String str = Single.create(new SingleOnSubscribe<String>() {
@Override
public void subscribe(SingleEmitter<String> e) throws Exception {
// e.onError(new Throwable("error!"));
e.onSuccess("hahaha!");
}
}).blockingGet();
System.out.println(str);
} catch (Exception e) {
e.printStackTrace();
System.out.println(e.getMessage());
}
}
}