Skip to content

Commit

Permalink
fixes for issues discovered during testing
Browse files Browse the repository at this point in the history
  • Loading branch information
mtotschnig committed Sep 26, 2023
1 parent 5021753 commit 10ada85
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ data class Transaction2(
KEY_REFERENCE_NUMBER,
KEY_STATUS,
KEY_TAGLIST,
KEY_ATTACHMENT_COUNT,
KEY_PARENTID,
when (grouping) {
Grouping.MONTH -> getYearOfMonthStart()
Expand All @@ -181,7 +180,8 @@ data class Transaction2(
).let {
if (extended) it + listOf(
KEY_CURRENCY,
"$TRANSFER_PEER_PARENT AS $KEY_TRANSFER_PEER_PARENT"
"$TRANSFER_PEER_PARENT AS $KEY_TRANSFER_PEER_PARENT",
KEY_ATTACHMENT_COUNT
) else it
}.toTypedArray()

Expand Down Expand Up @@ -234,7 +234,7 @@ data class Transaction2(
week = cursor.getInt(KEY_WEEK),
day = cursor.getInt(KEY_DAY),
icon = cursor.getStringOrNull(KEY_ICON),
attachmentCount = cursor.getInt(KEY_ATTACHMENT_COUNT)
attachmentCount = cursor.getIntIfExists(KEY_ATTACHMENT_COUNT) ?: 0
)
}
}
Expand Down
3 changes: 3 additions & 0 deletions myExpenses/src/main/res/values/version_info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -208,4 +208,7 @@
<item>@string/whats_new_364_1</item>
<item>@string/whats_new_364_2</item>
</string-array>
<string-array name="whats_new_365">
<item>@string/whats_new_365</item>
</string-array>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class ExportTest: BaseTestWithRepository() {
uuidList.add(op.uuid!!)
context.contentResolver.applyBatch(
TransactionProvider.AUTHORITY,
saveTagLinks(listOf(tag1Id, tag2Id), op.id, null, true)
ArrayList(saveTagLinks(listOf(tag1Id, tag2Id), op.id, null, true))
)
op.amount = (Money(CurrencyUnit.DebugInstance, expense2))
op.catId = cat1Id
Expand Down Expand Up @@ -168,7 +168,7 @@ class ExportTest: BaseTestWithRepository() {
uuidList.add(part.uuid!!)
context.contentResolver.applyBatch(
TransactionProvider.AUTHORITY,
saveTagLinks(listOf(tag1Id, tag2Id), part.id, null, true)
ArrayList(saveTagLinks(listOf(tag1Id, tag2Id), part.id, null, true))
)
split.status = DatabaseConstants.STATUS_NONE
split.save(contentResolver, true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package org.totschnig.myexpenses.sync

import com.google.common.truth.Truth
import org.junit.Test
import java.io.InputStream

class ResourceStorageTest {

Expand All @@ -17,6 +18,14 @@ class ResourceStorageTest {
)
}

override fun getCollection(collectionName: String, require: Boolean): Resource? {
TODO("Not yet implemented")
}

override fun getInputStream(resource: Resource): InputStream {
TODO("Not yet implemented")
}

override fun childrenForCollection(folder: Resource?): Collection<Resource> =
((folder ?: storage) as Folder).members

Expand Down

0 comments on commit 10ada85

Please sign in to comment.