Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

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

 
Ranch Hand
Posts: 479
2
  • 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
 
author
Posts: 188
11
Oracle Java
  • 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: 479
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Amritendu.
 
Ranch Hand
Posts: 112
3
  • 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
Posts: 188
11
Oracle Java
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic