Could you use a real type for classB? Why does it need mocking?
S.
On 2 Dec 2009, at 21:16, gsogol wrote:
> I have class ClassX that has one ctor taking in two params ClassA and
> ClassB. Inside ClassX, I have a method called Handle
>
> public ClassY Handle(ClassA classA, ClassB classB)
> {
> if (classB == null) throw Exception();
> string x = classB.PropertyA.GetID();
>
> return new ClassY(x);
> }
>
> ClassB is a class that has one ctor with 2 params that takes in
> DateTime. I need to mock value x and assign some arbitrary value to
> it. So in essense, I don't care what I pass in to Handle method. I do
> care about local variable x and I'd like it to have a certain value.
> I'm using RhinoAutoMocker from StructureMap but having difficulties.
Steve Freeman
http://www.mockobjects.com
http://www.growing-object-oriented-software.com
Winner of the Agile Alliance Gordon Pask award 2006
--
You received this message because you are subscribed to the Google Groups
"Rhino.Mocks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rhinomocks?hl=en.