|
From: Mike B. <mbr...@vi...> - 2004-01-19 18:07:24
|
Was that feature added to Nmock recently? Does it also exist in the Java mock objects framework? I have used both and didn't know such a feature existed in either. Is an object with a mock derived class but real base class really a mock object? Shouldn't it be all or nothing? What good is a hybrid? It seems more useful to me to treat the class and its base clases as a single interface and create a mock implementation of that interface replacing the real implementation. Please explain your reasoning. Mike > -----Original Message----- > From: Jim Arnold [mailto:JA...@th...] > Sent: Monday, January 19, 2004 11:44 AM > To: mbr...@vi... > Cc: nmo...@li...; > nmo...@li... > Subject: RE: [Nmock-general] Mocking types with constructors > > > > > > > Yes, currently NMock allows you to mock classes with empty > constructors. You get back a subclass with a real class as > its base. What I'm proposing is to remove the limitation on > empty constructors by either *not* calling any constructor on > the base, or by allowing the user to pass parameters into > GetMockInstance() which would be used to construct the base with. > > Jim > |