Loading...

RhinoMocks@googlegroups.com

[Prev] Thread [Next]  |  [Prev] Date [Next]

[RhinoMocks] Re: It doesn't work on my machine only!!! Mark Whitfeld Fri Aug 27 06:00:28 2010

Ok, I checked out the rhino mocks code and ran all the tests.
The tests all pass and if I add my test above, it also passes!

It seems that it is not working in new VS2010 projects.
I will investigate further when I get a chance...

On Aug 27, 9:11 am, Mark Whitfeld <[EMAIL PROTECTED]> wrote:
> Yeah, my previous machine was Win 7 64-bit as well and it worked.
> It only doesn't run on this machine... Arrgh!
>
> What do you mean by TDD.net? Never heard of it. Unless you mean
> TestDriven.net, but I don't use that because I have resharper.
>
> I don't hink that this is an issue with the test runner because it
> gives the same result no matter what test runner I use.
> The issue is possibly in how Rhino Mocks is determining whether it can
> mock the interface.
> But something is breaking on my machine only. Do you think it could be
> a permissions issue. I am an administrator on this machine though.
>
> I think I will download the Rhino Mocks Source code and try to run
> it's tests. Possibly even debug this from the source code.
>
> On Aug 26, 4:55 pm, Tim Barcz <[EMAIL PROTECTED]> wrote:
>
> > Oddly I have a Win 7 64-bit system and everything works fine.....
>
> > What version of TDD.NET?
>
> > On Thu, Aug 26, 2010 at 2:31 AM, Mark Whitfeld <[EMAIL PROTECTED]>wrote:
>
> > > Hi Tim
>
> > > I am using NUnit 2.5.6, I have also tried 2.5.3 as well as the
> > > Resharper Test runner.
> > > It doesn't work in any of these... Only on my machine... :(
>
> > > Thanks
> > > -Mark
>
> > > On Aug 25, 3:43 pm, Tim Barcz <[EMAIL PROTECTED]> wrote:
> > > > Mark,
>
> > > > Please tell me what version of NUnit are you running?
>
> > > > Tim
>
> > > > On Wed, Aug 25, 2010 at 2:06 AM, Mark Whitfeld <[EMAIL PROTECTED]
> > > >wrote:
>
> > > > > Oh, before I forget to mention. I am using Rhino.Mocks 3.6
>
> > > > > Thanks for your reply.
> > > > > Yeah, I tried that as well. It doesn't work either...
> > > > > I get:
>
> > > > > System.InvalidOperationException : No expectations were setup to be
> > > > > verified, ensure that the method call in the action is a virtual
> > > > > (C#) / overridable (VB.Net) method call
> > > > > at
>
> > > Rhino.Mocks.RhinoMocksExtensions.AssertExactlySingleExpectaton(MockRepository
> > > > > mocks, T mockToRecordExpectation)
> > > > > at Rhino.Mocks.RhinoMocksExtensions.GetExpectationsToVerify(T mock,
> > > > > Action`1 action, Action`1 setupConstraints)
> > > > > at Rhino.Mocks.RhinoMocksExtensions.AssertWasNotCalled(T mock,
> > > > > Action`1 action, Action`1 setupConstraints)
> > > > > at Rhino.Mocks.RhinoMocksExtensions.AssertWasNotCalled(T mock,
> > > > > Action`1 action)
> > > > > at Habanero.Templates.Test.Processor.TestMocking.Test_ShouldWork
>
> > > > > It fails in the same place. Could it be an issue with Castle do you
> > > > > think?
> > > > > I hope I don't have to use a different mocking framework just because
> > > > > it doesn't work on my machine!
>
> > > > > On Aug 24, 3:43 pm, Tuna Toksoz <[EMAIL PROTECTED]> wrote:
> > > > > > [TestFixture]
> > > > > > public class TestMocking
> > > > > > {
> > > > > >        [Test]
> > > > > >        public void Test_AssertWasNotCalled_ShouldWork()
> > > > > >        {
> > > > > >                var bob = MockRepository.GenerateMock<IBob>();
> > > > > >                bob.AssertWasNotCalled(o => o.Action());
> > > > > >        }
>
> > > > > > }
>
> > > > > > Can you try that?
>
> > > > > > Tuna Toksöz
> > > > > > Eternal sunshine of the open source mind.
>
> > > > >http://devlicio.us/blogs/tuna_toksozhttp://tunatoksoz.comhttp://twitt.
> > > ..
>
> > > > > > On Tue, Aug 24, 2010 at 3:30 AM, Mark Whitfeld <
> > > [EMAIL PROTECTED]
> > > > > >wrote:
>
> > > > > > > OK, I'm so stumped about this one!
> > > > > > > I have been using Rhino Mocks for years and it has never given me
> > > > > > > problems.
> > > > > > > I run the following simple code and it gives this error message:
>
> > > > > > > (on the line with AssertWasNotCalled)
> > > > > > > System.InvalidOperationException : No expectations were setup to 
> > > > > > > be
> > > > > > > verified, ensure that the method call in the action is a virtual
> > > > > > > (C#) / overridable (VB.Net) method call
>
> > > > > > > Stack Trace:
> > > > > > > at
> > > Rhino.Mocks.RhinoMocksExtensions.AssertExactlySingleExpectaton[T]
> > > > > > > (MockRepository mocks, T mockToRecordExpectation)
> > > > > > > at Rhino.Mocks.RhinoMocksExtensions.GetExpectationsToVerify[T](T
> > > mock,
> > > > > > > Action`1 action, Action`1 setupConstraints)
> > > > > > > at Rhino.Mocks.RhinoMocksExtensions.AssertWasNotCalled[T](T mock,
> > > > > > > Action`1 action, Action`1 setupConstraints)
> > > > > > > at Rhino.Mocks.RhinoMocksExtensions.AssertWasNotCalled[T](T mock,
> > > > > > > Action`1 action)
> > > > > > > at Habanero.Templates.Test.Processor.TestMocking.Test_ShouldWork()
>
> > > > > > > Here is the code (I know its testing the mocking framework, that's
> > > the
> > > > > > > point):
>
> > > > > > > [TestFixture]
> > > > > > > public class TestMocking
> > > > > > > {
> > > > > > >        [Test]
> > > > > > >        public void Test_AssertWasNotCalled_ShouldWork()
> > > > > > >        {
> > > > > > >                var bob = MockRepository.GenerateStub<IBob>();
> > > > > > >                bob.AssertWasNotCalled(o => o.Action());
> > > > > > >        }
> > > > > > > }
>
> > > > > > > public interface IBob
> > > > > > > {
> > > > > > >        void Action();
> > > > > > > }
>
> > > > > > > The project is compiled for AnyCPU (and I have tried all the
> > > others)
> > > > > > > and .NET 3.5.
> > > > > > > This fails on my PC, but works on every other PC. Aaaargh!
>
> > > > > > > My PC is as follows:
> > > > > > > Intel Core i7 CPU 860 @ 2.80GHz
> > > > > > > 8.00 GB RAM
> > > > > > > Windows 7 64-bit OS
>
> > > > > > > I have restarted Visual Studio, and the PC as well as run the 
> > > > > > > tests
> > > > > > > from Resharper and the nunit test runner.
> > > > > > > All have the same result: It fails!
>
> > > > > > > Please help!
>
> > > > > > > --
> > > > > > > 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]<[EMAIL PROTECTED]>
> > > <[EMAIL PROTECTED]<[EMAIL PROTECTED]>
>
> > > > > <[EMAIL PROTECTED]<[EMAIL PROTECTED]>
> > > <[EMAIL PROTECTED]<[EMAIL PROTECTED]>
>
> > > > > > > .
> > > > > > > For more options, visit this group at
> > > > > > >http://groups.google.com/group/rhinomocks?hl=en.
>
> > > > > --
> > > > > 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]<[EMAIL PROTECTED]>
> > > <[EMAIL PROTECTED]<[EMAIL PROTECTED]>
>
> > > > > .
> > > > > For more options, visit this group at
> > > > >http://groups.google.com/group/rhinomocks?hl=en.
>
> > > > --
> > > > Tim Barcz
> > > > Microsoft C# MVP
> > > > Microsoft ASPInsiderhttp://timbarcz.devlicio.ushttp://
> > >www.twitter.com/timbarcz
>
> > > --
> > > 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]<[EMAIL PROTECTED]>
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/rhinomocks?hl=en.
>
> > --
> > Tim Barcz
> > Microsoft C# MVP
> > Microsoft 
> > ASPInsiderhttp://timbarcz.devlicio.ushttp://www.twitter.com/timbarcz
>
>

-- 
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.