[Seaside] Problem with my TestCase

Sebastien Aubry Sebastien.Aubry at etu.univ-savoie.fr
Thu May 18 09:19:38 UTC 2006


Hello,

I work on a project (Expert system).
I write my Class TestCase for testing my application. I have two OrderedCollection what i want to test. I write some methods of test:

testAddBf: add a fact in the base of fact.

testAddBr: add a rule in the base in rules.

testAddBrWithAnd: add a rule in the base of rule with fact1 and fact2.

testAddBrWithOr: add a rule in the base of rule with fact1 or fact2

testIncludes: just for testing the method includes on my collection

testRemove: just for testing the method remove on my collection

testIncludes and testRemove are OK but the others don't pass the test. For example, here the code of testAddBf and testAddBr

TestExpert>>testAddBf

	self deny: (bf includes: (Fait new name:'A')).
	bf add: (Fait new name:'A').
	self assert: (bf includes: (Fait new name:'A')).

TestExpert>>testAddBr

	self deny: (br includes: (LDRule new premisse: (Fait new name:'poire') ; conclusion: (Fait new name: 'pomme'))).

	br add: (LDRule new premisse: (Fait new name:'poire') ; conclusion: (Fait new name: 'pomme')).

	self assert: (br includes: (LDRule new premisse: (Fait new name:'poire') ; conclusion: (Fait new name: 'pomme'))).	

I don't understand why theses methods don't pass the test, the SUnit Test Runner post: no errors but 4 failures.

Thanks by advance for your request.
Sébastien Aubry.


More information about the Seaside mailing list