Skip to content

Commit 822873d

Browse files
committed
Fix unit tests
1 parent d92207e commit 822873d

File tree

19 files changed

+86
-48
lines changed

19 files changed

+86
-48
lines changed

example/build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,13 @@ android {
1212
versionCode 1
1313
versionName "1.0"
1414
}
15+
1516
buildTypes {
1617
release {
1718
minifyEnabled false
1819
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
1920
}
2021
}
21-
22-
2322
}
2423

2524
dependencies {

example/src/androidTest/java/com/quarkworks/android/realmtypesafequery/example/ApplicationTest.java

Lines changed: 0 additions & 13 deletions
This file was deleted.

example/src/test/java/com/quarkworks/android/realmtypesafequery/example/ExampleUnitTest.java

Lines changed: 0 additions & 15 deletions
This file was deleted.

query/build.gradle

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ dependencies {
2828
compile fileTree(dir: 'libs', include: ['*.jar'])
2929
provided "com.android.support:support-annotations:$support_library_version"
3030
provided "io.realm:realm-android-library:$realm_version"
31-
androidTestProvided project(':annotationprocessor')
32-
androidTestCompile 'com.android.support.test:runner:0.5'
33-
3431
}
3532

3633
// build a jar with source files

settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
include ':example', ':annotations', ':annotationprocessor', ':query'
1+
include ':annotations', ':annotationprocessor', ':query', ':tests'

tests/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

tests/build.gradle

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
apply plugin: 'com.android.library'
2+
apply plugin: 'realm-android'
3+
4+
android {
5+
compileSdkVersion sdk_version
6+
buildToolsVersion build_tools_version
7+
8+
defaultConfig {
9+
minSdkVersion 19
10+
targetSdkVersion sdk_version
11+
versionCode 1
12+
versionName "1.0"
13+
14+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
15+
16+
}
17+
}
18+
19+
dependencies {
20+
compile fileTree(dir: 'libs', include: ['*.jar'])
21+
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
22+
exclude group: 'com.android.support', module: 'support-annotations'
23+
})
24+
androidTestCompile 'com.android.support.test:runner:0.5'
25+
testCompile 'junit:junit:4.12'
26+
27+
androidTestProvided project(':annotationprocessor')
28+
androidTestCompile project(':query')
29+
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
package com.quarkworks.android.realmtypesafequery;
1+
package com.quarkworks.android.tests;
22

33

44
import android.annotation.SuppressLint;
55
import android.support.test.runner.AndroidJUnit4;
66

7+
import com.quarkworks.android.realmtypesafequery.RealmTypeSafeQuery;
78
import com.quarkworks.android.realmtypesafequery.generated.BaseTestRecordFields;
89

910
import org.junit.AfterClass;
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
package com.quarkworks.android.realmtypesafequery;
1+
package com.quarkworks.android.tests;
22

33

44
import android.support.annotation.NonNull;
55
import android.support.annotation.Nullable;
66

7+
import com.quarkworks.android.realmtypesafequery.RealmDefaultValues;
78
import com.quarkworks.android.realmtypesafequery.annotations.GenerateRealmFieldNames;
89
import com.quarkworks.android.realmtypesafequery.annotations.GenerateRealmFields;
910

@@ -17,6 +18,7 @@
1718
import io.realm.annotations.RealmClass;
1819
import io.realm.annotations.Required;
1920

21+
@SuppressWarnings("WeakerAccess")
2022
@RealmClass
2123
@GenerateRealmFieldNames
2224
@GenerateRealmFields
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.quarkworks.android.realmtypesafequery;
1+
package com.quarkworks.android.tests;
22
// from intro examples realm-java
33

44
import com.quarkworks.android.realmtypesafequery.annotations.GenerateRealmFieldNames;

0 commit comments

Comments
 (0)