Changeset View
Changeset View
Standalone View
Standalone View
kmymoney/mymoney/tests/mymoneytransactionfilter-test.cpp
Show First 20 Lines • Show All 515 Lines • ▼ Show 20 Line(s) | 491 | { | |||
---|---|---|---|---|---|
516 | QVERIFY(filter.match(transaction)); | 516 | QVERIFY(filter.match(transaction)); | ||
517 | // -1 because categories are not supported yet | 517 | // -1 because categories are not supported yet | ||
518 | QCOMPARE(filter.matchingSplits(transaction).size(), 2); | 518 | QCOMPARE(filter.matchingSplits(transaction).size(), 2); | ||
519 | 519 | | |||
520 | filter.setReportAllSplits(false); | 520 | filter.setReportAllSplits(false); | ||
521 | QVERIFY(filter.match(transaction)); | 521 | QVERIFY(filter.match(transaction)); | ||
522 | QCOMPARE(filter.matchingSplits(transaction).size(), 1); | 522 | QCOMPARE(filter.matchingSplits(transaction).size(), 1); | ||
523 | 523 | | |||
524 | // check no category support | 524 | // check disabled category splits support | ||
525 | MyMoneySplit split4; | 525 | MyMoneySplit split4; | ||
526 | split4.setAccountId(acExpenseId); | 526 | split4.setAccountId(acExpenseId); | ||
527 | split4.setShares(MyMoneyMoney(123.00)); | 527 | split4.setShares(MyMoneyMoney(123.00)); | ||
528 | split4.setTagIdList(tagIdList); | 528 | split4.setTagIdList(tagIdList); | ||
529 | 529 | | |||
530 | MyMoneyTransaction transaction2; | 530 | MyMoneyTransaction transaction2; | ||
531 | transaction2.setPostDate(QDate(2014, 1, 2)); | 531 | transaction2.setPostDate(QDate(2014, 1, 2)); | ||
532 | transaction2.addSplit(split4); | 532 | transaction2.addSplit(split4); | ||
533 | 533 | | |||
534 | filter.setReportAllSplits(true); | 534 | filter.setReportAllSplits(true); | ||
535 | QVERIFY(!filter.match(transaction2)); | 535 | QVERIFY(!filter.match(transaction2)); | ||
536 | QCOMPARE(filter.matchingSplits(transaction2).size(), 0); | 536 | QCOMPARE(filter.matchingSplits(transaction2).size(), 0); | ||
537 | 537 | | |||
538 | qDebug() << "tags on categories could not be tested"; | 538 | // check enabled category splits support | ||
539 | filter.setConsiderCategorySplits(true); | ||||
tbaumgart: Looks like this did not get updated after renaming. I get
error: ‘class… | |||||
540 | QVERIFY(filter.match(transaction2)); | ||||
541 | QCOMPARE(filter.matchingSplits(transaction2).size(), 1); | ||||
539 | } | 542 | } | ||
540 | 543 | | |||
541 | void MyMoneyTransactionFilterTest::testMatchTransactionTypeAllTypes() | 544 | void MyMoneyTransactionFilterTest::testMatchTransactionTypeAllTypes() | ||
542 | { | 545 | { | ||
543 | /* | 546 | /* | ||
544 | alltypes | 547 | alltypes | ||
545 | - account group == MyMoneyAccount::Income || | 548 | - account group == MyMoneyAccount::Income || | ||
546 | - account group == MyMoneyAccount::Expense | 549 | - account group == MyMoneyAccount::Expense | ||
▲ Show 20 Lines • Show All 245 Lines • Show Last 20 Lines |
Looks like this did not get updated after renaming. I get
error: ‘class MyMoneyTransactionFilter’ has no member named ‘setCheckSplitsInCategories’