Loading ...
Sorry, an error occurred while loading the content.
 

Re: [XP] Re: Outside Mock Objects

Expand Messages
  • Niclas Olofsson
    ... It s your responability to not make it happen. A NPE is not supposed to happen. Anyway, a NPE would happen because of two reasons (connected to the current
    Message 1 of 1 , Aug 1, 2002
      dip_bhatt wrote:
      > what if the perform implementation throws a nullpointerexception at
      > the middle of processing the mock objects? and you don't even know
      > which statment threw that exception?
      >
      > Can you override this problem?

      It's your responability to not make it happen. A NPE is not supposed to
      happen. Anyway, a NPE would happen because of two reasons (connected to
      the current mock model) - 1) You sent null instead of the mock, 2) A
      method in the mock returns null and you aren't expecting it. Either case
      you as a programmer did something wrong. But Java will at least tell
      give you the stack-trace so you'll know exactly which call caused the
      error. Ie; I don't see the problem.

      Cheers,
      /Niclas
    Your message has been successfully submitted and would be delivered to recipients shortly.