I wonder if it would make sense (perhaps) to move the methods into a new "RecordReplay" namespace (or similar) so that in order to even see them you would need to explicitly add a "using" for that namespace. This could limit the scope of the breaking change to nothing more than their having to add an additional using statement for people who still rely upon record/replay.
Thoughts --? Steve Bohlen [email protected] http://blog.unhandled-exceptions.com http://twitter.com/sbohlen On Wed, Nov 16, 2011 at 3:36 PM, bill richards <[email protected] > wrote: > This is one of your tests ... > > public void FoundDotNet20_Test_KeyExists() > { > bool isInstalled = true; > DotNetFramework target = new DotNetFramework(); > IRegistryKey key = > > CreateDotNetRegistryOpenSubKeyMock(DotNetFramework.REGPATH_DOTNET20_VERSION, > isInstalled); > target.ChangeBaseKey(key); > bool expected = true; > bool actual = target.FoundDotNet20; > Assert.AreEqual(actual, expected); > > // Works > key.AssertWasCalled(x => > x.OpenSubKey(DotNetFramework.REGPATH_DOTNET20_VERSION)); > // Fails > key.VerifyAllExpectations(); > } > > > the line marked // Fails ... should fail, because you have not > "recorded" and "replayed". VerifyAllExpectations() forms part of the > Record/Replay syntax AssertWasCalled() *is* the assertion you should > be using in these tests. > > ... and I know it's a breaking change, but IMHO I think that we > should do something to remove the Record/Replay syntax backward > compatibility -it just makes the library a little confusing > > > On Nov 15, 12:28 am, rhyous <[email protected]> wrote: > > I am learning Rhino Mocks and I have created a very small sample > > project that you can all access. > http://www.rhyous.com/wp-content/uploads/2011/11/DotNetFrameworkTest.zip > > > > I am wondering what I am doing wrong here. > > VerifyAllExpectations() fails when AssertWasCalled() succeeds and this > > has me pretty confused. > > > > I have spent a couple hours troubleshooting and thought I would throw > > this to the mailing list. > > > > Thanks, > > > > Jaredhttp://www.rhyous.com > > -- > 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. > > -- 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.
