Cannot show transaction details if not added to database. #633
174 passed, 1 failed and 0 skipped
✅ TEST-org.gnucash.android.service.ScheduledActionServiceTest.xml
10 tests were completed in 1s with 10 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
org.gnucash.android.service.ScheduledActionServiceTest | 10✅ | 1s |
✅ org.gnucash.android.service.ScheduledActionServiceTest
✅ scheduledTransactionsWithEndTimeInPast_shouldBeExecuted
✅ scheduledBackups_shouldNotRunBeforeNextScheduledExecution
✅ recurringTransactions_shouldHaveScheduledActionUID
✅ scheduledBackups_shouldNotIncludeTransactionsPreviousToTheLastRun
✅ futureScheduledActions_shouldNotRun
✅ scheduledBackups_shouldRunOnlyOnce
✅ disabledScheduledActions_shouldNotRun
✅ scheduledBackups_shouldIncludeTransactionsAfterTheLastRun
✅ missedScheduledTransactions_shouldBeGenerated
✅ exceededExecutionCounts_shouldNotRun
✅ TEST-org.gnucash.android.test.unit.CsvTransactionsExporterTest.xml
2 tests were completed in 6s with 2 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
org.gnucash.android.test.unit.CsvTransactionsExporterTest | 2✅ | 6s |
✅ org.gnucash.android.test.unit.CsvTransactionsExporterTest
✅ generate export in German locale
✅ generate export in US locale
❌ TEST-org.gnucash.android.test.unit.db.AccountsDbAdapterTest.xml
18 tests were completed in 2s with 17 passed, 1 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
org.gnucash.android.test.unit.db.AccountsDbAdapterTest | 17✅ | 1❌ | 2s |
❌ org.gnucash.android.test.unit.db.AccountsDbAdapterTest
✅ shouldClearAllTablesWhenDeletingAllAccounts
✅ shouldGetDescendantAccounts
✅ shouldRecursivelyDeleteAccount
✅ simpleAccountListShouldNotContainTransactions
✅ shouldUpdateFullNameAfterParentChange
✅ editingAccountShouldNotDeleteTemplateSplits
✅ shouldCreateAccountHierarchy
✅ shouldAddTransactionsAndSplitsWhenAddingAccounts
✅ shouldComputeAccountBalanceCorrectly
✅ importingXml_shouldSetDefaultCurrencyFromXml
❌ shouldAddAccountsToDatabase
android.database.sqlite.SQLiteConstraintException: FOREIGN KEY constraint failed (code 787 SQLITE_CONSTRAINT_FOREIGNKEY)
✅ shouldCreateImbalanceAccountOnDemand
✅ shouldDeleteSplitsWhenAccountDeleted
✅ shouldSetDefaultTransferColumnToNull_WhenTheAccountIsDeleted
✅ bulkAddAccountsShouldNotModifyTransactions
✅ shouldReassignDescendantAccounts
✅ shouldCreateDefaultRootAccount
✅ shouldBeAlphabeticallySortedByDefault
✅ TEST-org.gnucash.android.test.unit.db.BooksDbAdapterTest.xml
9 tests were completed in 563ms with 9 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
org.gnucash.android.test.unit.db.BooksDbAdapterTest | 9✅ | 563ms |
✅ org.gnucash.android.test.unit.db.BooksDbAdapterTest
✅ setBookActive
✅ savingBook_requiresRootAccountGUID
✅ addBook
✅ testGeneratedDisplayNames_shouldBeUnique
✅ recoverFromEmptyDatabase
✅ testGeneratedDisplayName
✅ deletingBook_shouldDeleteDbFile
✅ recoverFromNoActiveBookFound
✅ deleteBook
✅ TEST-org.gnucash.android.test.unit.db.BudgetsDbAdapterTest.xml
6 tests were completed in 346ms with 6 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
org.gnucash.android.test.unit.db.BudgetsDbAdapterTest | 6✅ | 346ms |
✅ org.gnucash.android.test.unit.db.BudgetsDbAdapterTest
✅ testBulkAddBudgets
✅ testGetAccountBudgets
✅ savingBudget_shouldRequireRecurrence
✅ savingBudget_shouldRequireExistingAccount
✅ testAddingBudget
✅ savingBudget_shouldRequireBudgetAmount
✅ TEST-org.gnucash.android.test.unit.db.PriceDbAdapterTest.xml
1 tests were completed in 54ms with 1 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
org.gnucash.android.test.unit.db.PriceDbAdapterTest | 1✅ | 54ms |
✅ org.gnucash.android.test.unit.db.PriceDbAdapterTest
✅ shouldOnlySaveOnePricePerCommodityPair
✅ TEST-org.gnucash.android.test.unit.db.ScheduledActionDbAdapterTest.xml
3 tests were completed in 119ms with 3 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
org.gnucash.android.test.unit.db.ScheduledActionDbAdapterTest | 3✅ | 119ms |
✅ org.gnucash.android.test.unit.db.ScheduledActionDbAdapterTest
✅ testGenerateRepeatString
✅ everyScheduledActionShouldHaveRecurrence
✅ testAddGetRecord
✅ TEST-org.gnucash.android.test.unit.db.SplitsDbAdapterTest.xml
4 tests were completed in 215ms with 4 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
org.gnucash.android.test.unit.db.SplitsDbAdapterTest | 4✅ | 215ms |
✅ org.gnucash.android.test.unit.db.SplitsDbAdapterTest
✅ addingSplitShouldUnsetExportedFlagOfTransaction
✅ testAddSplit
✅ shouldHaveTransactionInDatabase
✅ shouldHaveAccountInDatabase
✅ TEST-org.gnucash.android.test.unit.db.TransactionsDbAdapterTest.xml
4 tests were completed in 257ms with 4 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
org.gnucash.android.test.unit.db.TransactionsDbAdapterTest | 4✅ | 257ms |
✅ org.gnucash.android.test.unit.db.TransactionsDbAdapterTest
✅ shouldBalanceTransactionsOnSave
✅ testComputeBalance
✅ testTransactionsAreTimeSorted
✅ deletingTransactionsShouldDeleteSplits
✅ TEST-org.gnucash.android.test.unit.export.BackupTest.xml
1 tests were completed in 186ms with 1 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
org.gnucash.android.test.unit.export.BackupTest | 1✅ | 186ms |
✅ org.gnucash.android.test.unit.export.BackupTest
✅ shouldCreateBackupFileName
✅ TEST-org.gnucash.android.test.unit.export.GncXmlHelperTest.xml
9 tests were completed in 1s with 9 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
org.gnucash.android.test.unit.export.GncXmlHelperTest | 9✅ | 1s |
✅ org.gnucash.android.test.unit.export.GncXmlHelperTest
✅ testDateFormat_Leap_0200
✅ shouldFailToParseWronglyFormattedInput
✅ testDateFormat_to_DateTimeFormat
✅ testDateFormat_Threads
✅ testParseSplitAmount
✅ testDateTimeFormat_Timestamp_UTC
✅ testDateTimeFormat_forPattern
✅ testFormatSplitAmount
✅ testDateFormat_Leap_UTC
✅ TEST-org.gnucash.android.test.unit.export.OfxExporterTest.xml
3 tests were completed in 624ms with 3 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
org.gnucash.android.test.unit.export.OfxExporterTest | 3✅ | 624ms |
✅ org.gnucash.android.test.unit.export.OfxExporterTest
✅ testDateTime
✅ testWithNoTransactionsToExport_shouldNotCreateAnyFile
✅ testGenerateOFXExport
✅ TEST-org.gnucash.android.test.unit.export.QifExporterTest.xml
6 tests were completed in 547ms with 6 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
org.gnucash.android.test.unit.export.QifExporterTest | 6✅ | 547ms |
✅ org.gnucash.android.test.unit.export.QifExporterTest
✅ transactionWithNonDefaultSplitsImport
✅ memoAndDescription_shouldBeExported
✅ testWithNoTransactionsToExport_shouldNotCreateAnyFile
✅ amountAndSplit_shouldBeExported
✅ simpleTransactionExport
✅ testGenerateQIFExport
✅ TEST-org.gnucash.android.test.unit.importer.GncXmlHandlerTest.xml
7 tests were completed in 644ms with 7 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
org.gnucash.android.test.unit.importer.GncXmlHandlerTest | 7✅ | 644ms |
✅ org.gnucash.android.test.unit.importer.GncXmlHandlerTest
✅ multiCurrencyTransactionImport
✅ transactionWithNonDefaultSplitsImport
✅ importingScheduledAction_shouldSetByDays
✅ simpleTransactionImport
✅ accountsImport
✅ bug562_scheduledTransactionImportedWithImbalancedSplits
✅ commodities
✅ TEST-org.gnucash.android.test.unit.model.AccountTest.xml
9 tests were completed in 387ms with 9 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
org.gnucash.android.test.unit.model.AccountTest | 9✅ | 387ms |
✅ org.gnucash.android.test.unit.model.AccountTest
✅ testAccountAlwaysHasUID
✅ colors
✅ settingNameShouldNotChangeFullName
✅ testTransactionsHaveSameCurrencyAsAccount
✅ testSetColorWithAlphaComponent
✅ testAccountUsesDefaultCurrency
✅ shouldSetFullNameWhenCreated
✅ newInstance_shouldReturnNonNullValues
✅ testSetInvalidColorCode
✅ TEST-org.gnucash.android.test.unit.model.BudgetTest.xml
6 tests were completed in 55ms with 6 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
org.gnucash.android.test.unit.model.BudgetTest | 6✅ | 55ms |
✅ org.gnucash.android.test.unit.model.BudgetTest
✅ addingBudgetAmount_shouldSetBudgetUID
✅ shouldNotCompactBudgetAmountsWithDifferentAmounts
✅ addingSameAmounts_shouldCompactOnRetrieval
✅ testGetNumberOfAccounts
✅ shouldComputeAbsoluteAmountSum
✅ addingNegativePeriodNum_shouldExpandOnRetrieval
✅ TEST-org.gnucash.android.test.unit.model.CommodityTest.xml
2 tests were completed in 1ms with 2 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
org.gnucash.android.test.unit.model.CommodityTest | 2✅ | 1ms |
✅ org.gnucash.android.test.unit.model.CommodityTest
✅ setSmallestFraction_shouldNotUseDigits
✅ testSmallestFractionDigits
✅ TEST-org.gnucash.android.test.unit.model.MoneyTest.xml
16 tests were completed in 5s with 16 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
org.gnucash.android.test.unit.model.MoneyTest | 16✅ | 5s |
✅ org.gnucash.android.test.unit.model.MoneyTest
✅ testCreation
✅ testDivisionWithDifferentCurrency
✅ testMultiplication
✅ testAddition
✅ testPrinting
✅ testSubtractionWithDifferentCurrency
✅ testMultiplicationWithDifferentCurrencies
✅ overflow
✅ evaluate_25
✅ evaluate_26
✅ testDivision
✅ testFractionParts
✅ testAdditionWithIncompatibleCurrency
✅ testNegation
✅ testSubtraction
✅ nonMatchingCommodityFraction_shouldThrowException
✅ TEST-org.gnucash.android.test.unit.model.PriceTest.xml
5 tests were completed in 3ms with 5 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
org.gnucash.android.test.unit.model.PriceTest | 5✅ | 3ms |
✅ org.gnucash.android.test.unit.model.PriceTest
✅ getNumerator_shouldReduceAutomatically
✅ getDenominator_shouldReduceAutomatically
✅ toString_shouldNotFailForInfinitelyLongDecimalExpansion
✅ creatingFromExchangeRate_ShouldGetPrecisionRight
✅ toString_shouldUseDefaultLocale
✅ TEST-org.gnucash.android.test.unit.model.RecurrenceTest.xml
11 tests were completed in 6s with 11 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
org.gnucash.android.test.unit.model.RecurrenceTest | 11✅ | 6s |
✅ org.gnucash.android.test.unit.model.RecurrenceTest
✅ no_language
✅ settingCount_shouldComputeCorrectEndTime
✅ testRecurrenceCountComputation
✅ notSettingEndDate_shouldReturnSpecialCountValue
✅ nth_weekday
✅ frequency_formatted
✅ date
✅ budget_CurrentPeriod
✅ min_max
✅ rfc2445
✅ reoccurs_every_4th_wednesday
✅ TEST-org.gnucash.android.test.unit.model.ScheduledActionTest.xml
9 tests were completed in 504ms with 9 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
org.gnucash.android.test.unit.model.ScheduledActionTest | 9✅ | 504ms |
✅ org.gnucash.android.test.unit.model.ScheduledActionTest
✅ weeklyActionsWithoutDayOfWeekSet_shouldReturnDateInTheFuture
✅ testComputingNextScheduledExecution
✅ weeklyActionsWithMultiplier_shouldBeDueOnTheDayOfWeekSet
✅ settingStartTime_shouldSetRecurrenceStart
✅ settingRecurrence_shouldSetEndTime
✅ multiDayOfWeekWeeklyActions_shouldBeDueOnEachDayOfWeekSet
✅ settingEndTime_shouldSetRecurrenceEnd
✅ settingRecurrence_shouldSetScheduledActionStartTime
✅ testComputingTimeOfLastSchedule
✅ TEST-org.gnucash.android.test.unit.model.SplitTest.xml
6 tests were completed in 300ms with 6 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
org.gnucash.android.test.unit.model.SplitTest | 6✅ | 300ms |
✅ org.gnucash.android.test.unit.model.SplitTest
✅ shouldCreateInversePair
✅ shouldParseCsv
✅ testCloning
✅ amounts_shouldBeStoredUnsigned
✅ testAddingSplitToTransaction
✅ shouldGenerateValidCsv
✅ TEST-org.gnucash.android.test.unit.model.TransactionTest.xml
4 tests were completed in 181ms with 4 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
org.gnucash.android.test.unit.model.TransactionTest | 4✅ | 181ms |
✅ org.gnucash.android.test.unit.model.TransactionTest
✅ settingUID_shouldSetTransactionUidOfSplits
✅ testCloningTransaction
✅ addingSplitsShouldSetTransactionUID
✅ testCreateAutoBalanceSplit
✅ TEST-org.gnucash.android.test.unit.util.AmountParserTest.xml
6 tests were completed in 32ms with 6 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
org.gnucash.android.test.unit.util.AmountParserTest | 6✅ | 32ms |
✅ org.gnucash.android.test.unit.util.AmountParserTest
✅ withGarbageAtTheEnd_shouldFailWithException
✅ emptyString_shouldFailWithException
✅ parseDecimalAmountWithDifferentSeparator
✅ testParseIntegerAmount
✅ parseDecimalAmount
✅ withGarbageAtTheBeginning_shouldFailWithException
✅ TEST-org.gnucash.android.test.unit.util.ColorTest.xml
9 tests were completed in 693ms with 9 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
org.gnucash.android.test.unit.util.ColorTest | 9✅ | 693ms |
✅ org.gnucash.android.test.unit.util.ColorTest
✅ color_rgba_percent
✅ color_rgb_percent
✅ color_hex_alpha
✅ color_hsla
✅ color_name
✅ color_rgba
✅ color_hex
✅ color_hsl
✅ color_rgb
✅ TEST-org.gnucash.android.test.unit.util.PreferencesHelperTest.xml
2 tests were completed in 86ms with 2 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
org.gnucash.android.test.unit.util.PreferencesHelperTest | 2✅ | 86ms |
✅ org.gnucash.android.test.unit.util.PreferencesHelperTest
✅ shouldGetLastExportTimeDefaultValue
✅ shouldGetLastExportTimeCurrentValue
✅ TEST-org.gnucash.android.test.unit.util.TimestampHelperTest.xml
4 tests were completed in 183ms with 4 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
org.gnucash.android.test.unit.util.TimestampHelperTest | 4✅ | 183ms |
✅ org.gnucash.android.test.unit.util.TimestampHelperTest
✅ shouldGetUtcStringFromTimestamp
✅ shouldGetTimestampFromNow
✅ shouldGetTimestampFromEpochZero
✅ shouldGetTimestampFromUtcString
✅ TEST-org.gnucash.android.util.BackupManagerTest.xml
3 tests were completed in 1s with 3 passed, 0 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
org.gnucash.android.util.BackupManagerTest | 3✅ | 1s |
✅ org.gnucash.android.util.BackupManagerTest
✅ getBackupList
✅ whenNoBackupsHaveBeenDone_shouldReturnEmptyBackupList
✅ backupAllBooks
Annotations
Check failure on line 245 in app/src/main/java/org/gnucash/android/db/adapter/DatabaseAdapter.java
github-actions / Unit Test Report
org.gnucash.android.test.unit.db.AccountsDbAdapterTest ► shouldAddAccountsToDatabase
Failed test found in:
TEST-org.gnucash.android.test.unit.db.AccountsDbAdapterTest.xml
Error:
android.database.sqlite.SQLiteConstraintException: FOREIGN KEY constraint failed (code 787 SQLITE_CONSTRAINT_FOREIGNKEY)
Raw output
android.database.sqlite.SQLiteConstraintException: FOREIGN KEY constraint failed (code 787 SQLITE_CONSTRAINT_FOREIGNKEY)
at org.robolectric.nativeruntime.SQLiteConnectionNatives.nativeExecute(Native Method)
at org.robolectric.shadows.ShadowNativeSQLiteConnection.lambda$nativeExecute$9(ShadowNativeSQLiteConnection.java:123)
at app//org.robolectric.util.PerfStatsCollector.measure(PerfStatsCollector.java:82)
at org.robolectric.shadows.ShadowNativeSQLiteConnection.nativeExecute(ShadowNativeSQLiteConnection.java:121)
at android.database.sqlite.SQLiteConnection.nativeExecute(SQLiteConnection.java)
at android.database.sqlite.SQLiteConnection.execute(SQLiteConnection.java:555)
at android.database.sqlite.SQLiteSession.execute(SQLiteSession.java:619)
at android.database.sqlite.SQLiteStatement.execute(SQLiteStatement.java:44)
at org.gnucash.android.db.adapter.DatabaseAdapter.addRecord(DatabaseAdapter.java:245)
at org.gnucash.android.db.adapter.SplitsDbAdapter.addRecord(SplitsDbAdapter.java:89)
at org.gnucash.android.db.adapter.TransactionsDbAdapter.addRecord(TransactionsDbAdapter.java:127)
at org.gnucash.android.db.adapter.AccountsDbAdapter.addRecord(AccountsDbAdapter.java:157)
at org.gnucash.android.db.adapter.AccountsDbAdapter.addRecord(AccountsDbAdapter.java:67)
at org.gnucash.android.db.adapter.DatabaseAdapter.addRecord(DatabaseAdapter.java:216)
at org.gnucash.android.test.unit.db.AccountsDbAdapterTest.shouldAddAccountsToDatabase(AccountsDbAdapterTest.java:161)
at [email protected]/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at app//org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
at app//org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at app//org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
at app//org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at app//org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at app//org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at app//org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at app//org.robolectric.RobolectricTestRunner$HelperTestRunner$1.evaluate(RobolectricTestRunner.java:502)
at app//org.robolectric.internal.SandboxTestRunner$2.lambda$evaluate$2(SandboxTestRunner.java:285)
at app//org.robolectric.internal.bytecode.Sandbox.lambda$runOnMainThread$0(Sandbox.java:104)
at [email protected]/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at [email protected]/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at [email protected]/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at [email protected]/java.lang.Thread.run(Thread.java:1583)