My bad. I was discombobulated over an unrelated MoQ issue (see the
were the same instance. I'm an idiot.
> On Tue, Sep 2, 2008 at 3:41 PM, yesthatmcgurk <
yesthatmcg...@gmail.com>wrote:
>
>
>
>
>
> > I'm using version 2.5.1.153, and it would fail. What is the "current"
> > version?
>
> > On Sep 2, 2:38 pm, "Daniel Cazzulino" <
dan...@cazzulino.com> wrote:
> > > This passes with the current version of Moq:
>
> > > [Fact]
> > > public void GetsTwoDifferentMocks()
> > > {
> > > var mock1 = new Mock<IFoo>();
> > > var mock2 = new Mock<IFoo>();
>
> > > var omg = object.ReferenceEquals(mock1.Object, mock2.Object);
>
> > > Assert.False(omg);
> > > }
>
> > > On Tue, Sep 2, 2008 at 3:27 PM, yesthatmcgurk <
yesthatmcg...@gmail.com
> > >wrote:
>
> > > > Am I going insane here?
>
> > > > var mock1 = new Mock<ILog>();
> > > > var mock2 = new Mock<ILog>();
>
> > > > var omg = object.ReferenceEquals(mock1.Object, mock2.Object)
>
> > > > Should omg be true or false? I would completely assume it should be
> > > > false, but just recently I noticed that I was getting the same mock
> > > > object (omg would be true).
>
> > > > Is this design? Is there something weird going on? And what do I do
> > > > when I want two different instances of the same mocked object?- Hide
> > quoted text -
>