Re: How to do unit test on an atom unit which tied with a large unit?



Koms Bomb wrote:

"Dennis Landi" <nada@xxxxxxxx> wrote:
Of course, you would have to instantiate a manager class or create
a "manager test stub" and fake the functionality in the test for
purposes of the test.

I think Dennis' second suggestion is the best way to go. Create a fake
manager class to work with and control the actual atom class that you
want to test. Since you aren't testing the manager class itself, it
only needs to be functional enough to for the atom class to get the
details it needs. This might be a little time consuming depending on
the relationship between these objects, but I think being able to test
in isolation will make up for that.

Do a search on Mock Objects, and you'll find lots of details.

--
Regards,
Bruce McGee
Glooscap Software
.



Relevant Pages

  • handling security within a usecase
    ... clerk can update the record, but for legal reasons, cannot update or ... only difference in functionality presented to the clerk and manager. ... The larger issue, perhaps, is how do you folks handle security wrt a use ...
    (comp.object)
  • Re: multiprocessing managers and socket connection.
    ... functionality. ... where I start on one machine a manager that is listening and then ... The socket connections to the ... When you use a PIPE, it throws the exception and actually exits; ...
    (comp.lang.python)
  • Re: It it possible to redirect events?
    ... the Manager, and the Manager has many 'Items'. ... I'm going to assume that what you want is an event in the Manager class ... for clients of the Manager class (specifically, ... 4.Client should respond to ItHappened events. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: It it possible to redirect events?
    ... the Manager, and the Manager has many 'Items'. ... For one, the code you posted wouldn't compile (the Manager class constructor needs a "()" after the name of the constructor), and even if it did, it wouldn't do anything because the instance of Item isn't initialized, nor is it referenced anywhere other than in a local variable. ... But assuming you really want to get rid of the forwarding, you could implement your event explicitly in the Manager class, subscribing to the underlying Item event. ... Note that this actually changes the reference relationships between your instances. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: GAME 36 - Nates Grades & Thoughts
    ... it's just tough watching winnable games go up in smoke. ... Reagan Reconstructed Radio Report with fake emotions and fake cheering ... and a good manager sees that stuff and must deal with THAT too. ...
    (alt.sports.baseball.bos-redsox)