user281070
user281070

Reputation: 1351

assert conditions in eclipse

I've write a junit test with eclipse , to check the Gui component status ,I use assert : textfield.assert("expected message") i'm searching how to get the error message printed by assert the message saying that the expected text doesn't match th typed text is printed in the eclipse console I like to get this message to generate a report is there an easy mean, my be a junit method ?

Upvotes: 2

Views: 669

Answers (1)

Marcos Placona
Marcos Placona

Reputation: 21720

It should work out as something like:

assert("Bad output", expectedResults);

I'd use:

assertEquals("Bad output for # attempt", expectedResults, obtainedResults);

though

Upvotes: 1

Related Questions