tdd « Development « Java Testing Q&A

Home
Java Testing Q&A
1.Development
2.FindBugs
3.HTMLUnit
4.hudson
5.junit
6.performance
7.plugin
8.profile
9.selenium
10.Tools
11.unit test
Java Testing Q&A » Development » tdd 

1. Creating nunit tests without exporting them with the api    stackoverflow.com

I'm new to unit testing using nunit (and Java development in general). When creating unit tests for private methods on classes, it looks as though the test file must be ...

2. Integration testing an external library?    stackoverflow.com

I am using an external library in a java project but I am not sure how can I integration test it with my code. For example: Let us say I am using ...

3. question about learning TDD    stackoverflow.com

what are the best books to learn about junit, jmock and testing generally? Currently I'm reading pragmatic unit testing in Java, I'm on chapter 6 its good but it gets complicated.. ...

4. Implementing a Stack using Test-Driven Development    stackoverflow.com

I am doing my first steps with TDD. The problem is (as probably with everyone starting with TDD), I never know very well what kind of unit tests to do when ...

5. Refactoring phase of the TDD Traffic Light - how to get this right?    stackoverflow.com

So I made the following test for a class Board that would to be born:

[TestMethod]
public void Set_The_Origin_As_Violet_And_The_Query_Confirms_It() {
    Board board = new Board(10, 10);

    Color ...

6. How to Test façade classes with no args constructors and no setters with TDD?    stackoverflow.com

This question comes a bit as continuation of the following topic (you don't need to read it, though). It's just a game of Tetris I'm implementing with TDD. So here is ...

7. When having to do a design change, should I change the already working tests first and only then try to run the new one?    stackoverflow.com

I have a bunch of tests that assume that my Tetris class is composed by a Board class. I now feel that instead of having a Board inside of that Tetris ...

8. First TDD test with no assert/expected exception. Is it worth it?    stackoverflow.com

Let's say I'm starting to do a game with TDD. Is this a good first test?

[TestMethod]
public void Can_Start_And_End_Game()
{
    Tetris tetris = new Tetris();
    tetris.Start();
  ...

9. Extracting class when TDD'ing. How to test the new extracted class?    stackoverflow.com

So I had a couple of methods in my main class that used a matrix to set pixels on or off. I got all my current tests running and so, and ...

10. Is it OK to copy & paste unit-tests when the logic is basically the same?    stackoverflow.com

I currently have like 10 tests that test whenever my Tetris piece doesn't move left if there is a piece in the path, or a wall. Now, I will have to ...

11. Unit-Testing delegating methods    stackoverflow.com

Is there any point in Unit-Testing a method that the only thing it does is delegate work on another object? Example:

class abc {

    ...

    public ...

12. Integration tests and TDD    stackoverflow.com

I have this first integration test for a tic tac toe game:

[TestClass]
public class FirstIntegrationTest
{
    [TestMethod, TestCategory("Integration Tests")]
    public void Standard_TicTacToe_Game_PlayerO_Wins()
    {
  ...

13. is it practically possible to do good TDD (or BDD) without using any DI framework in java?    stackoverflow.com

IMO one of the main characteristics of a good TDD is: testing your class (or actually unit) in isolation. When you do so, you are able to actually test single behavior in ...

14. How to effectively (not) test service layer    stackoverflow.com

In one of our service classes I have a bunch of methods which just return the DAO result with no processing like

public void acceptRequest(User from, User to) {
   ...

15. How to avoid accessors in test-driven development?    stackoverflow.com

I'm learning test-driven development, and I have noticed that it forces loosely coupled objects, which is basically a good thing. However, this also sometimes forces me to provide accessors for properties ...

16. Test-driven development not working for my class    stackoverflow.com

I have this class that I wanted to build using TDD, but I failed. It's a pretty basic class called SubMissions, and all it does is it fetches some data from ...

17. Writing/implementing an API: testability vs information hiding    stackoverflow.com

Many times I am involved in the design/implementation of APIs I am facing this dilemma. I am a very strong supporter of information hiding and try to use various techniques ...

18. Applying TDD on MVC    stackoverflow.com

I am struggling to find good content of MVC and TDD. I just want to learn how to effectively write unit tests for the MVC design pattern. I would appreciate any ...

19. How do I test the Presenter in an MVP pattern in java    stackoverflow.com

I wanted to know how to test the Presenter using a mock view in java. I am doing Test Driven Design (TDD) and I do not understand how to test the ...

20. Should I comment my tests?    stackoverflow.com

I am about to write just another Java-Test which covers a new feature. To document the reason for this new tests I am thinking about commenting the test with an explanation ...

21. Money Example from Kent Beck's TDD by example    stackoverflow.com

So I have worked through the Money example in Kent Beck's book Test Driven Development by Example and have been able to get the code to work up until the last ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.