Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
333 commits
Select commit Hold shift + click to select a range
1653679
added action bar
drazumova May 16, 2019
4196e8b
add methods for tags
misha-nik May 15, 2019
b10b75c
add tests for tags
misha-nik May 16, 2019
af24df4
add javadoc for tag methods
misha-nik May 16, 2019
c4c4a0d
products adapter added
drazumova May 16, 2019
2ac19de
Merge branch 'alpha' of https://github.com/Shasha33/Spender into shas…
drazumova May 16, 2019
993a466
added checkroller init
drazumova May 17, 2019
2f557db
updated adapters
drazumova May 17, 2019
6d0a3d0
update database
misha-nik May 17, 2019
27d69c6
Merge branch 'mishock_working' into alpha
misha-nik May 17, 2019
17e16d5
Merge branch 'alpha' of https://github.com/Shasha33/Spender into shas…
drazumova May 17, 2019
18ff6b4
fixed items type
drazumova May 17, 2019
f64a2bf
Merge branch 'alpha' into mishock_working
misha-nik May 24, 2019
97e2d1e
add delete + test + sort all dao methods
misha-nik May 24, 2019
7453f30
Merge branch 'mishock_working' into alpha
misha-nik May 24, 2019
1ccb0ad
little changes
drazumova May 24, 2019
7484364
Merge branch 'alpha' of https://github.com/Shasha33/Spender into shas…
drazumova May 24, 2019
1d75d34
some attempts to add tags for products
drazumova May 24, 2019
e278e99
fix insertTagForProduct
misha-nik May 25, 2019
6544164
Merge branch 'mishock_working' into alpha
misha-nik May 25, 2019
58cca21
Merge branch 'alpha' into mishock_working
misha-nik May 25, 2019
035aba8
Merge branch 'alpha' of https://github.com/Shasha33/Spender into shas…
drazumova May 25, 2019
831d1f9
add registration
misha-nik May 25, 2019
0ddd8ed
add checkUserSync
misha-nik May 25, 2019
2fb2d2c
add phone/password in getCheck methods
misha-nik May 25, 2019
e136cce
update tests and NetworkException
misha-nik May 25, 2019
eb7fc39
Merge branch 'mishock_working' into alpha
misha-nik May 25, 2019
b7caf86
add javadoc
misha-nik May 25, 2019
3d95cd7
Merge branch 'mishock_working' into alpha
misha-nik May 25, 2019
f8fa6dc
Merge branch 'alpha' of https://github.com/Shasha33/Spender into shas…
drazumova May 25, 2019
0af39b3
add a few dao tests
misha-nik May 25, 2019
6bfd17d
Merge branch 'alpha' into mishock_working
misha-nik May 25, 2019
180170f
TAGS ADDED FINALLY
drazumova May 25, 2019
d157885
trying to add tag removing
drazumova May 25, 2019
acb25b7
add deleteTagProductRealation
misha-nik May 25, 2019
9bd94ac
Merge branch 'mishock_working' into alpha
misha-nik May 25, 2019
82936a6
tags fixed a little
drazumova May 25, 2019
34183b0
Merge branch 'alpha' of https://github.com/Shasha33/Spender into shas…
drazumova May 25, 2019
bb22a91
add simple tag menu
drazumova May 26, 2019
925d9b9
Merge branch 'alpha' into mishock_working
misha-nik May 26, 2019
e402ed4
add MPAndroidChart dependency
misha-nik May 26, 2019
7ccd09a
added tags for check
drazumova May 26, 2019
3b98ea5
added login ability
drazumova May 26, 2019
35239e4
cleaned up
drazumova May 26, 2019
cdd711c
fixed buttons and new tag
drazumova May 26, 2019
3e9e723
do migration to androidx
misha-nik May 26, 2019
e04ff3f
register and resotre
drazumova May 26, 2019
c817ee9
add getTagsWithSum and lib for LiveData Testing
misha-nik May 26, 2019
8f27a5d
update room to 2.1.0-beta01
misha-nik May 26, 2019
360d4f6
add alpha pieChart
misha-nik May 26, 2019
15906e9
Merge branch 'alpha' into mishock_working
misha-nik May 26, 2019
1da65c0
some fix after merge
misha-nik May 26, 2019
212d2fb
Merge branch 'mishock_working' into alpha
misha-nik May 26, 2019
dcef6ab
PieChartController
misha-nik May 26, 2019
5f4bd6c
add custom colors
misha-nik May 26, 2019
8c77103
Merge branch 'mishock_working' into alpha
misha-nik May 26, 2019
65257aa
added check search
drazumova May 27, 2019
f4a256a
fix dependency
misha-nik May 27, 2019
effdb23
default login fixed
drazumova May 27, 2019
2898ab1
Merge branch 'alpha' into mishock_working
misha-nik May 27, 2019
0116901
Merge branch 'mishock_working' into alpha
misha-nik May 27, 2019
90d9af1
make pie animation only on create
misha-nik May 27, 2019
34e47c9
remove legend
misha-nik May 27, 2019
0c5c8e1
change default check name
misha-nik May 27, 2019
a5bc37b
not very good logging
drazumova May 27, 2019
7b76d8b
Merge branch 'alpha' of https://github.com/Shasha33/Spender into shas…
drazumova May 27, 2019
5e1bfaf
new tag activity fixed
drazumova May 27, 2019
a86e1a4
defiled the crown of creation
drazumova May 27, 2019
5306be3
type in exception method fixed
drazumova May 27, 2019
40d79bc
update check entity
misha-nik May 27, 2019
02440c9
overriding is canceled
drazumova May 27, 2019
39439a0
added subStrings for tags
drazumova May 27, 2019
bb6d780
typo fixed
drazumova May 27, 2019
74ce484
Merge branch 'alpha' into mishock_working
misha-nik May 27, 2019
71de94f
Merge branch 'mishock_working' into alpha
misha-nik May 27, 2019
325af83
Merge remote-tracking branch 'origin/alpha' into alpha
misha-nik May 27, 2019
7e36bfe
Merge branch 'alpha' into mishock_working
misha-nik May 27, 2019
59ee727
auto sort by substring added
drazumova May 27, 2019
b52c87a
small update activity_list.xml
misha-nik May 27, 2019
fb3dd5d
Merge branch 'shasha_working' into alpha
drazumova May 27, 2019
cc64127
adding tags for all products in check
drazumova May 27, 2019
30896ef
Merge branch 'shasha_working' into alpha
drazumova May 27, 2019
2d04ed2
add getRawCheck to retrofit
misha-nik May 27, 2019
7982096
Merge branch 'mishock_working' into alpha
misha-nik May 27, 2019
88fa390
Merge branch 'alpha' of https://github.com/Shasha33/Spender into shas…
drazumova May 28, 2019
17030fa
fix restore password
misha-nik May 28, 2019
279e13f
return format check date format and add getChecksByDate
misha-nik May 28, 2019
7813ae9
Merge branch 'alpha' into mishock_working
misha-nik May 28, 2019
311cc33
Merge branch 'mishock_working' into alpha
misha-nik May 28, 2019
35ccaff
list view improved
drazumova May 28, 2019
6d4ef16
Merge branch 'alpha' of https://github.com/Shasha33/Spender into shas…
drazumova May 28, 2019
700c4ee
fix getByTime
misha-nik May 28, 2019
108661a
Merge branch 'alpha' into mishock_working
misha-nik May 28, 2019
4d04588
Merge branch 'mishock_working' into alpha
misha-nik May 28, 2019
405040c
trying to add time search
drazumova May 28, 2019
a7eecb3
Merge branch 'alpha' of https://github.com/Shasha33/Spender into shas…
drazumova May 28, 2019
855c8f9
add search by data
drazumova May 28, 2019
c436d6a
added search by substring and date
drazumova May 28, 2019
4319d19
Merge branch 'shasha_working' into alpha
drazumova May 28, 2019
40ce5f3
add pieFragment
misha-nik May 28, 2019
aec9037
half of search in check
drazumova May 28, 2019
c993f0a
add package fragments and charts
misha-nik May 28, 2019
9bb87bf
preparing for cool graphics
drazumova May 28, 2019
07646ed
intent for tags choice
drazumova May 28, 2019
1c05387
xml fixes
drazumova May 28, 2019
92fa408
add getProductByRegEx
misha-nik May 28, 2019
19d0766
add getProductByRegExTest
misha-nik May 28, 2019
e4868ba
Merge branch 'adding_getProductInChaeck' into alpha
misha-nik May 28, 2019
40af470
pretty buttons
drazumova May 28, 2019
3e94f1f
Merge branch 'alpha' of https://github.com/Shasha33/Spender into sha…
drazumova May 28, 2019
4f93e25
add LineChartController and getTagsWithSumAndDate
misha-nik May 28, 2019
26602a2
search in check items added
drazumova May 28, 2019
45e3ef8
Merge branch 'shasha_working' into alpha
drazumova May 28, 2019
f8b2f8a
colors update
drazumova May 28, 2019
ac976fb
removed kek
drazumova May 28, 2019
d6f57d0
fixed checksroller
drazumova May 28, 2019
feab9e7
add setData for LineChartController
misha-nik May 28, 2019
3178082
add LineChartFragment
misha-nik May 28, 2019
c2f388f
Merge branch 'shasha_working' into alpha
drazumova May 28, 2019
2282558
Merge branch 'mishock_working' into alpha
misha-nik May 28, 2019
331f884
Merge branch 'alpha' into mishock_working
misha-nik May 28, 2019
9c3c2ec
add working lineChart
misha-nik May 28, 2019
a460921
fixed new tag input
drazumova May 28, 2019
a91f77a
Merge branch 'alpha' of https://github.com/Shasha33/Spender into shas…
drazumova May 28, 2019
b94cc9e
add valueFormatter for lineChart
misha-nik May 28, 2019
a1bd3d5
Merge branch 'alpha' into mishock_working
misha-nik May 28, 2019
766d3b2
Merge branch 'mishock_working' into alpha
misha-nik May 28, 2019
6a2803a
preparing for chart changing
drazumova May 28, 2019
cb14240
Merge branch 'alpha' of https://github.com/Shasha33/Spender into shas…
drazumova May 28, 2019
d67afa5
comments about my uselessness
drazumova May 28, 2019
01b8532
Merge branch 'alpha' into mishock_working
misha-nik May 28, 2019
eb5c2e5
add pie/donat toggle
misha-nik May 28, 2019
7875a44
improve main ui
misha-nik May 29, 2019
f5da1fc
added product list
drazumova May 29, 2019
bef5db3
Merge branch 'alpha' of https://github.com/Shasha33/Spender into alpha
drazumova May 29, 2019
e208120
not working terrible code
drazumova May 29, 2019
7761658
Merge branch 'alpha' into mishock_working
misha-nik May 29, 2019
dc464c4
fixed list by tags
drazumova May 29, 2019
c4b2379
fixed tag adding and list view
drazumova May 29, 2019
9a26cf3
portrait mode set
drazumova May 29, 2019
9c76e6b
add time dependency in charts
misha-nik May 29, 2019
827d83d
add tag choose in pieChart
misha-nik May 29, 2019
1226a73
add whiteList to lineChart
misha-nik May 29, 2019
268dbb1
add time period in lineChart
misha-nik May 29, 2019
c5140d8
Merge branch 'alpha' into mishock_working
misha-nik May 29, 2019
601d647
Merge branch 'mishock_working' into alpha
misha-nik May 29, 2019
adbd577
changed tags list
drazumova May 29, 2019
2738804
Merge branch 'alpha' of https://github.com/Shasha33/Spender into shas…
drazumova May 29, 2019
7ba4ec1
remove secret
misha-nik May 29, 2019
aa563c8
fixed new tag creation bug
drazumova May 29, 2019
243826a
add some for StuctBar item
misha-nik May 29, 2019
e96cbe0
fixed date and buttons
drazumova May 29, 2019
8228f61
some ui changes
misha-nik May 29, 2019
c06140d
color and tag choice fixed
drazumova May 30, 2019
b9dd319
Merge branch 'shasha_working' into mishock_working
drazumova May 30, 2019
de73d8a
some ui trying
drazumova May 30, 2019
d733990
view changed
drazumova May 30, 2019
9726050
Merge branch 'activity_improve' of https://github.com/Shasha33/Spende…
drazumova May 30, 2019
ccd3119
trying to move to livedata
drazumova May 30, 2019
fa8d1a2
fixed update problems
drazumova May 31, 2019
32a755a
tag add button moved
drazumova May 31, 2019
79f8ec0
pretty buttons
drazumova May 31, 2019
9d48fe6
messages fixed
drazumova May 31, 2019
da8b1f9
fix all tests
misha-nik Jun 1, 2019
b043f12
add better look lineChart
misha-nik Jun 1, 2019
275aca8
Merge branch 'alpha' of https://github.com/Shasha33/Spender into alpha
drazumova Jun 1, 2019
43a2013
adapters fixed
drazumova Jun 1, 2019
655298c
trying to fix
drazumova Jun 1, 2019
894d1ab
still trying
drazumova Jun 1, 2019
d673317
separated tag params
drazumova Jun 1, 2019
d9cfecb
Merge branch 'shasha_working' into alpha
drazumova Jun 1, 2019
1d17709
questionable design
drazumova Jun 1, 2019
c8ac329
add base stacked bar chart
misha-nik Jun 1, 2019
fa2c1f5
renamed and moved some classes
drazumova Jun 2, 2019
a554868
reg fixed + scan class moved
drazumova Jun 2, 2019
a3b8333
Merge branch 'shasha_working' into alpha
drazumova Jun 2, 2019
3b699ab
changed cat button
drazumova Jun 2, 2019
0e40699
requests history
drazumova Jun 2, 2019
13d3c24
empty tag list bug fixed
drazumova Jun 2, 2019
b5d6bda
Merge branch 'shasha_working' into alpha
drazumova Jun 2, 2019
b8592b9
added info
drazumova Jun 2, 2019
840548a
added info about application
drazumova Jun 2, 2019
75e3cc8
mode change bug fixed
drazumova Jun 2, 2019
758fe5c
Merge branch 'shasha_working' into alpha
drazumova Jun 2, 2019
6bf87cc
update password in test
misha-nik Jun 4, 2019
acd9a8d
help fixed
drazumova Jun 4, 2019
1d22b89
fixed tag adding
drazumova Jun 4, 2019
fee2a6f
fixed help view
drazumova Jun 4, 2019
ed28e8f
trying to fix EOF
drazumova Jun 4, 2019
9a228dc
changed help and login
drazumova Jun 4, 2019
0c8a0d6
fixed login
drazumova Jun 4, 2019
9ed28af
removing fixed
drazumova Jun 4, 2019
5cc7e13
fixed removing
drazumova Jun 4, 2019
9a5040b
added orientation
drazumova Jun 4, 2019
bbeeee5
tring to fix lists view
drazumova Jun 4, 2019
295cd4a
update changed
drazumova Jun 4, 2019
d405e2e
strange codes abolished
drazumova Jun 5, 2019
dcede9e
invalid data format toasts fixed
drazumova Jun 5, 2019
f6997fa
item selection fixed
drazumova Jun 5, 2019
0f9d366
fixed scan result size check
drazumova Jun 5, 2019
e431d7e
null cause bug fixed
drazumova Jun 6, 2019
889f28e
split ERROR status to NETWORK_ERROR and WRONG_RESPONSE_ERROR
misha-nik Jun 6, 2019
9a0f89c
add async login and code constant
misha-nik Jun 7, 2019
394e1ed
add tests for async login
misha-nik Jun 7, 2019
d0b1358
Merge branch 'mishock_working' into alpha
misha-nik Jun 7, 2019
c39d825
add constants in javadoc
misha-nik Jun 7, 2019
74a7acb
Merge branch 'alpha' into mishock_working
misha-nik Jun 7, 2019
0e816b7
add getUserReadableMassage
misha-nik Jun 7, 2019
fee34f8
Merge branch 'mishock_working' into alpha
misha-nik Jun 7, 2019
eb0e05f
add valueFormatter for barData
misha-nik Jun 7, 2019
6f66afe
add UpdatableChartController
misha-nik Jun 7, 2019
abc74e8
add whiteIdList in barChart
misha-nik Jun 7, 2019
e0b10e3
Merge branch 'alpha' of https://github.com/Shasha33/Spender into shas…
drazumova Jun 7, 2019
1de7623
tag view updated
drazumova Jun 7, 2019
4932173
Merge branch 'alpha' into stuced_bar_chart
misha-nik Jun 7, 2019
a1cf132
Merge branch 'stuced_bar_chart' into alpha
misha-nik Jun 7, 2019
9031ae5
fix formater
misha-nik Jun 7, 2019
a244bc5
Merge branch 'alpha' into stuced_bar_chart
misha-nik Jun 7, 2019
5c7ce8e
Merge branch 'stuced_bar_chart' into alpha
misha-nik Jun 7, 2019
470fd83
added async registration and password
drazumova Jun 7, 2019
321db52
updated history messages
drazumova Jun 7, 2019
7afc1e3
Merge branch 'alpha' of https://github.com/Shasha33/Spender into alpha
drazumova Jun 7, 2019
4e7933f
fixed view reusing in tags
drazumova Jun 7, 2019
bbf033b
access modifiers fixed
drazumova Jun 7, 2019
7b89829
javadocs added
drazumova Jun 7, 2019
1d18e06
added javadocs
drazumova Jun 7, 2019
8b2422e
help updated
drazumova Jun 7, 2019
bc5dc41
help fixed
drazumova Jun 7, 2019
3e6244d
empty string in tag bug fixed
drazumova Jun 7, 2019
a931dd7
add gradlew
misha-nik Jun 8, 2019
c68e112
fixed messages in empty string case
drazumova Jun 8, 2019
35c3def
Merge branch 'alpha' of https://github.com/Shasha33/Spender into alpha
drazumova Jun 8, 2019
b682c8a
new threads for databse requests added
drazumova Jun 8, 2019
c299a50
Merge branch 'shasha_working' into alpha
drazumova Jun 8, 2019
e1c6d12
single thread pool added
drazumova Jun 8, 2019
d433fc1
Merge branch 'shasha_working' into alpha
drazumova Jun 8, 2019
897d2b0
some java docs
drazumova Jun 9, 2019
9de9aec
Merge branch 'shasha_working' into alpha
drazumova Jun 9, 2019
40f58ea
undo change
drazumova Jun 9, 2019
bf7efc5
Merge branch 'shasha_working' into alpha
drazumova Jun 9, 2019
682f768
adapters fixed
drazumova Jun 19, 2019
6a0a82f
variables and access levels fixed
drazumova Jun 19, 2019
492c518
readability issues fixed
drazumova Jun 19, 2019
8e388fe
made networkManager more social
drazumova Jun 19, 2019
afadd3d
part of singlton fixes
drazumova Jun 19, 2019
9cab00c
notworking part
drazumova Jun 19, 2019
114692a
still workingnt but better
drazumova Jun 20, 2019
4aec51d
working, but questionable
drazumova Jun 20, 2019
420ec27
similar to previous version
drazumova Jun 20, 2019
459caa5
Merge branch 'shasha_working' into alpha
drazumova Jun 20, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions Spender/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
4 changes: 4 additions & 0 deletions Spender/.idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions Spender/.idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 44 additions & 0 deletions Spender/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions Spender/.idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Spender/app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
93 changes: 93 additions & 0 deletions Spender/app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
apply plugin: 'com.android.application'
apply plugin: 'de.mannodermaus.android-junit5'

android {
compileSdkVersion 28
defaultConfig {
applicationId "com.project.spender"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}

android.applicationVariants.all { variant ->
variant.outputs.all {
def appName = "Spender"
outputFileName = appName+"-${variant.versionName}.apk"
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.annotation:annotation:1.0.2'

// junit 5
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
testImplementation "org.junit.jupiter:junit-jupiter-api:5.3.2"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:5.3.2"
testImplementation "org.junit.jupiter:junit-jupiter-params:5.3.2"

// junit 4
testImplementation "junit:junit:4.12"
testRuntimeOnly "org.junit.vintage:junit-vintage-engine:5.3.2"

// rule fo tests
androidTestImplementation "androidx.arch.core:core-testing:2.0.1"
testImplementation "androidx.arch.core:core-testing:2.0.1"

// androidX for testing
androidTestImplementation 'androidx.test:core:1.1.0'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test:rules:1.1.1'

// Hamcrest library
androidTestImplementation 'org.hamcrest:hamcrest-library:1.3'

// LiveData
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
annotationProcessor 'androidx.lifecycle:lifecycle-compiler:2.0.0'
// LiveData Testing
androidTestImplementation 'com.jraska.livedata:testing:1.1.0'

// implementation group: 'org.xerial', name: 'sqlite-jdbc', version: '3.25.2'
implementation 'com.google.android.gms:play-services-vision:17.0.2'

implementation 'me.dm7.barcodescanner:zxing:1.9'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'com.google.android.material:material:1.0.0'

// retrofit2 + gson
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'

// Dagger dependencies
implementation 'com.google.dagger:dagger:2.13'
annotationProcessor 'com.google.dagger:dagger-compiler:2.13'

//Colors
implementation 'com.github.matthewyork:ColoursLibrary:1.0.+@aar'

// Room db
def room_version = "2.1.0-beta01"
implementation "androidx.room:room-runtime:$room_version"
annotationProcessor "androidx.room:room-compiler:$room_version"

// MPAndroidChart
implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
}
Binary file added Spender/app/itemsTable.db
Binary file not shown.
21 changes: 21 additions & 0 deletions Spender/app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package com.project.spender;

import androidx.arch.core.executor.testing.InstantTaskExecutorRule;
import androidx.lifecycle.MutableLiveData;
import android.content.Context;

import androidx.test.core.app.ApplicationProvider;
import androidx.test.filters.SmallTest;

import com.jraska.livedata.TestObserver;

import org.junit.Rule;
import org.junit.Test;

import java.util.concurrent.CountDownLatch;

import static org.junit.Assert.assertEquals;

/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/

@SmallTest
public class ExampleInstrumentedTest {

@Rule
public InstantTaskExecutorRule instantTaskExecutorRule = new InstantTaskExecutorRule();

@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = ApplicationProvider.getApplicationContext();
assertEquals("com.project.spender", appContext.getPackageName());
}

@Test
public void getLiveDataTest() throws InterruptedException {

MutableLiveData<Integer> liveData = new MutableLiveData<>();

liveData.postValue(1);
TestObserver.test(liveData).awaitValue().assertValue(i -> i == 1);
}
}
Loading