[Seaside] Problem with my TestCase

stephane ducasse stephane.ducasse at free.fr
Thu May 18 18:00:11 UTC 2006


What you ask is not clear.
Then I'm not sure that this is the right list for such a kind of  
questions.

test methods do not have argument so I do not understand the  
testAddBf:....

Put a self halt in your test method and click on debug then you will  
get a debugger on the method.
Stef

On 18 mai 06, at 11:19, Sebastien Aubry wrote:

> 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.
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>



More information about the Seaside mailing list