Hi everybody,
I've been studying a bit about NUNI-Testing and I have a question,
The question relates to bazaar.launchpad.net/openpetrac ... nerEdit.cs
I understand that messages are only displayed if an assertion fails like in fe.
Assert.AreEqual(1, testPartnerLocations.Rows.Count, "the partner should only have one location");
But by this, messages that announce that something went well, aren't displayed.
Am I right that the following lines announce that something went well?
Assert.AreEqual(TSubmitChangesResult.scrOK, result, "TPartnerEditUIConnector SubmitChanges return value");
Assert.Greater(MainDS.PPartnerLocation[0].LocationKey, 0, "TPartnerEditUIConnector SubmitChanges returns valid location key");
But the mesages would only appear in the log if the asserts went wrong.
What do you think?
I also noticed that in ci-win.solidcharity.com/job/Open ... onsoleFull there appear several database-errors:
[nunit2] 04:13:53 Error executing non-query SQL statement.
[nunit2] The SQL Statement was:
[nunit2] INSERT INTO a_gift(a_ledger_number_i, a_batch_number_i, a_gift_transaction_number_i) VALUES(43, 99999999, 1)
[nunit2] Possible cause: Npgsql.NpgsqlException:
[nunit2] insert or update on table "a_gift" violates foreign key constraint "a_gift_fk1"
[nunit2] Severity: ERROR
[nunit2] Code: 23503
But although the respective tests don't fail:
[nunit2] Tests run: 3, Failures: 0, Not run: 0, Time: 1.187 seconds
Should we implement some asserts that check for DB-errors?
Greetings
Joachim