Gary,
When you have a problem that you would like help with, you should give
all of the information, for example, nowhere have you given any
indication that you cannot proceed without mocking XElement (other
than saying "I have to mock this"), and I can think of no conditions
under which you would have to. You are so adamant that you absolutely
have to mock XElement, please tell us why that is?
> bill richards wrote:
> > there is
> > absolutely no reason why one would have to mock this item
>
> If there wasn't then I wouldn't have asked the question.
>
There are often instances when an individual believes that s/he has to
do something when in fact they do not, this I am afraid is one of
those cases. These instances generally come about through
misunderstanding and/or over-complication.
| XElement mockXML;
| String[] xmlCtorArgs = new String[1];
|
| xmlCtorArgs[0] ="mockXML";
| mockXML = mocks.StrictMock<XElement>(xmlCtorArgs);
What exactly does the above mean to you? To me it demonstrates a lack
of understanding ...
> var element = new XElement("mockXML");
What is so difficult about writing the above in your test? How does it
break your test? How does it break the code under test? And if it does
break the code under test, perhaps you should seriously think about
what it is you are testing, and perhaps even, that what you are
testing (the object) has not been implemented according to
standard .Net development practices, because clearly you are retro-
fitting "unit tests" -I say "clearly" because if you were not there
really would be no need at all to mock the XElement- what are you
testing? How does a mocked XElement help that test? Why is it
essential for that test?
>bill richards wrote:
>> As it happens, I do have ALL THE FACTS which are PERTINENT to this
>> question
>Wrong again. Keep digging. Do let me know when you hit bottom.
and this is not very helpful at all is it? All this does is
demonstrate your ability to be dogmatic. The response should have been
along the lines of ... "sorry Bill, but you do not have all of the
facts pertinent to this question, because I did not give them all.
What you are unaware of is that .... (your reasons for doing something
that doesn't need doing goes here) "
This response is an attempt at illiciting a civilized discourse from
yourself, so that maybe you can enlighten the group as to when it is
absolutely essential that you must mock an instance of XElement, when
in fact nobody else has that understanding.
--
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.