Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

extending database

 
Ronnie Phelps
Ranch Hand
Posts: 329
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I decided to extend the DBAccess interface because I felt a method was throwing an exception that wasn't neccessary, should I just create a new method and ignore the implementation of the given method? I figured this wouldn't be the right thing to do because the requirements state that the interface must be implemented for testing purposes and if the implementation is ignored in the implementing class, there is no way of testing that function.
 
Max Habibi
town drunk
( and author)
Sheriff
Posts: 4118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ronnie,
I agree with you: and I have similar concerns about some of the Exceptions the beta throws. For example, IMO, A record being locked is not a exceptional condition: it's an everyday condition: that is, it's just a routine error. However, they didn't ask us to design the test, only to code it.
ps - How did you decide to approach your encoding issue?
All best,
M, author
The Sun Certified Java Developer Exam with J2SE 1.4
 
Ronnie Phelps
Ranch Hand
Posts: 329
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Max I feel the same way about the RecordNotFoundException thrown when findByCriteria doesn't find anything. Maybe we should just call the new method within the body of the given method and just throw the exception whenever it's neccessary. This will allow their testing to perform the way they expect it to peform. And I can just use the implementing methods in my RemoteObject without having to catch or throw unneccesary exceptions.
ps - How did you decide to approach your encoding issue?

I used the Gatters and Scatters that you suggested. It made the code alot easier to read and I could avoid dealing with StringBuffer to allocate the field sizes.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic