I've been playing a bit with Test Driven Development, and have read the book, but now I want to try it out, and am really not sure what to do next... My wife...
21908
yme0987654321
Aug 26, 2009 3:11 am
I guess it would be a way of confirming the test ran before tearing down, since even a failed assumption in the first line of the test will still have the...
21909
yme0987654321
Aug 26, 2009 3:19 am
It doesn't fit my scenario because I would essentially not want to engage the external resources, so I guess I could combine them the other way around and fail...
21910
Pigneri, Rocco
rpigneri@...
Aug 26, 2009 2:29 pm
Dear John, Well, you hit the nail pretty much right on the head: you *do* have a really simple algorithm, but it *does* provide a great way for you to learn...
21911
Forsberg, Mike
mike.forsber...
Aug 26, 2009 3:38 pm
Starting off, I see two API methods right away. - A method that copies files: copyFile(File source, File destination) - void - A method that...
21912
kentb
kentlbeck
Aug 26, 2009 4:14 pm
I'm a bit confused. @Before and @After are inherited. Superclass @Before's are executed before subclass @Before's and subclass @After's are executed before...
21913
kentb
kentlbeck
Aug 26, 2009 4:14 pm
Lothar, My analysis of the situation is that the time invested in expressing dependencies between tests would be more valuable invested in improving the design...
21914
yme0987654321
Aug 27, 2009 7:18 pm
To be clear, I didn't mean that @Before methods don't get executed from the super class. What I meant was that if I have an @Before method in the super class,...
21915
Barry Kaplan
memelet
Aug 29, 2009 1:08 am
This is a shame, the framework indeed knows the test method for which @Before is executing. I haven't looked at the new rules impl yet, does anybody know if...
21916
kentb
kentlbeck
Aug 29, 2009 3:29 am
This is the second report I've seen today that wished that @Rules were executed before @Before. I know we had a good reason for the ordering we used. I'll have...
21917
Barry Kaplan
memelet
Aug 29, 2009 3:57 pm
Thanks Kent, that would be nice. For my case I moved my @Before code into a @Rule, which made that particular fixture much more reusable. Of course this won't...
21918
adrian.kuhn
Aug 31, 2009 7:09 pm
Hi Trenton, this is what JExample does. You can use an @Given annotation to declare dependencies between producer and consumer tests. JExample extends JUnit to...
21919
Alistair Israel
aisrael
Sep 2, 2009 8:50 am
Hi, list. Been playing around a bit with JUnit 4.7's new interceptors (rules) feature and in some cases, turning a @Before method (and a base class) into a...
21920
David Saff
dsaff
Sep 2, 2009 1:31 pm
Alistair, Thanks for the feedback! Glad the method-level rules are working out for you. We're hearing loud and clear, from you and others, that class-level ...
21921
Alistair Israel
aisrael
Sep 3, 2009 3:39 am
... In my case, I was able to extend ExternalResource to provide a lightweight HTTP server test harness (using the HTTP server API in Java 6) that could...
21922
Alistair Israel
aisrael
Sep 3, 2009 7:00 am
... Hi Regan. In this case I'd personally test and implement from the "outside in". Meaning, I'd actually try and verify the end result we're after. ...
21923
David Saff
dsaff
Sep 3, 2009 10:53 am
... Thanks for writing that up! (Indeed, an HTTP server was also my first "in the wild" ExternalResource.) David Saff...
21924
Srivalli Arkalgud
sarkalgud
Sep 4, 2009 4:25 pm
Hello, How can tests be grouped in JUnit? I am for grouping tests based on test coverage as in Sanity tests, Smoke tests, Regression tests. Thanks! [Non-text...
21926
Forsberg, Mike
mike.forsber...
Sep 4, 2009 5:26 pm
Have you looked into TestSuitesin 4.5 or the Suite annotation in the latest version? 4.5: http://junit.org/junit/javadoc/4.5/junit/framework/TestSuite.html ...
21927
Alistair Israel
aisrael
Sep 9, 2009 2:45 am
Hi, Kent/David. Just did some testing and it seems that the execution chain with interceptors is actually: - @Before - ExternalResource#before() - @Test -...
21928
tris_0011
Sep 10, 2009 7:58 pm
Hi! Thanks for your answer! I uploaded the picture here: http://s3.directupload.net/images/090910/u5fr8z34.png "testAltPrepCompPlainText_tabelle" is the one...
21929
Chris Dollin
anover_alias
Sep 14, 2009 11:16 am
... I don't know if it's related, but if `assertEquals(A, B)` does an `A.equals(B)`, your assertTrue is doing a B.equals(A), and if B isn't a String and has...
21930
kentb
kentlbeck
Sep 14, 2009 4:06 pm
Thanks for the note. We've had a couple of comments that people expected rules to run before @Before. We placed them where we did not for any particular...
21931
Bogdan
bogdanmocanu...
Sep 18, 2009 9:00 pm
Hello, I am using JUnit 4.7 and used the new Rules mechanism, with TempFolder. What I needed was to have a temporary folder where the CUT could create some...
21932
tris_0011
Sep 18, 2009 9:01 pm
Hi! Yes, i think that's the answer. 'assertEquals ("5", testObject.feedbackText);' doesn't work, but 'assertEquals ("5", testObject.feedbackText.toString());'...
21933
kentb
kentlbeck
Sep 18, 2009 10:17 pm
Bogdan, You are seeing the currently expected behavior. It's clear that we need to at least experiment with moving @Rules before @Before methods. Kent _____ ...
21934
beckymc22
Sep 19, 2009 10:23 pm
Hi, I recently upgraded to JUnit 4 and started exploring Matchers. I found that the org.junit.Assert.assertThat() method doesn't allow my Matcher's...
21935
Bogdan
bogdanmocanu...
Sep 19, 2009 10:24 pm
Hello Kent, thanks for answering. Only after sending the question, I saw that another user had a similar problem with TestName. Next time I will search the...
21936
Chris Dollin
anover_alias
Sep 21, 2009 8:04 am
... I would deduce that `testObject.feedbackText` is not a String. ... If `testObject.feedbackText` "should be" a String, then either it has type String (in...
21937
veena_kris2003
Sep 23, 2009 12:43 pm
http://junit.sourceforge.net/doc/faq/faq.htm#organize_1 Using this article I followed the instrunctions under Running Tests: In step 3 I have the full package...