• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Spring, Hibernate, Data Modeling, REST and TDD:Agile Java Design and Development

 
paul nisset
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Amritendu,

Do you advocate writing all of your interfaces and tests completely first or a more hybrid approach?
While the interface ->test-> code approach provides clarity to a project, I find things crop up that I need to test for after I have started coding a module.

thanks,
Paul
 
Amritendu De
author
Ranch Hand
Posts: 188
11
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would go in a sequence. First I will write the find all records test followed by the implementation. This does not have any dependency with other methods in the class. Then I will write the create test and test with find all records method. Next I will write the find with an identifier method test and implementation. The other methods like remove and edit follows. So incrementally I will develop the entire source. Similarly I will write the entity first followed by data access and business service and finally the presentation tier. I will go up the stack one by one. This is described very well in the book.
 
paul nisset
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Amritendu.
 
Kent O. Johnson
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I am using Spring Data should I even bother with unit testing my find all, create, and other methods? Can I acoid unit testing that code or should I still unit test it?
 
Amritendu De
author
Ranch Hand
Posts: 188
11
Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It depends. I have seen lot of projects where unit testing is completely skipped because of budget. But it is highly recommended for high quality and regression.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic