background preloader

Rahien

Rahien
In my previous post, I started to go over the go-raft implementation, after being interrupted by the need to sleep, I decided to go on with this, but I wanted to expand a bit first about the issue we discussed earlier, not checking the number of bytes read in log_entry’s Decode. Let us assume that we actually hit that issue, what would happen? The process goes like this, we try to read a value, but the Read method only return some of the information. We explicitly ignore that, and try to use the buffer anyway. Best case scenario, we are actually getting an error, so we bail early. At that point, we detect the error and truncate the file. I reported this issue, and I’m interested to know if my review is in any way correct. getEntriesAfter gives us all the in memory entries. setCommitIndex is interesting. And this one gives me a headache: Basically, this mean that we need to write the commit index to the beginning of the file. Then we have this: This seems pretty easy to follow, all told.

http://ayende.com/blog

Scott Hanselman Debugging is a satisfying and special kind of hell. You really have to live it to understand it. When you're deep into it you never know when it'll be done. How to Use Rhino Mocks/Mocks, Dynamic Mocks, Partial Mocks - Wikibooks, collection of open-content textbooks The difference between these three types of Rhino Mocks mocking solutions has always been a little confusing to me. So, here's my best shot at some concise definitions: A normal mock object will throw an exception when a method, which has no explicit expectation defined, is called on the mock instance.A dynamic mock, instead of throwing an exception, will return null or 0 for any unexpected method calls.A partial mock, like a dynamic mock, will not throw an exception if a method is called when there is no expectation defined for the method; but, instead of returning 0 or null, a partial mock will call the actual implementation method (i.e., not the mock) on the object and return that value.

Rhino Mocks Documentation - Ayende @ Wiki Rhino Mocks allows you to easily create mock objects and setup a wide range of expectations on them using strongly typed notation instead of compiler-opaque strings. It's as simple as: IProjectView projectView = mocks.StrictMock<IProjectView>(); Expect.Call(projectView.Title).Return("Project's Title"); New Version Of Rhino Mocks - The Code Project - .NET A dynamic mock object framework for the .Net platform. It's purpose is to ease testing by allowing the developer to create mock implementations of custom objects and verify the interactions using unit testing. Rhino.Mocks is an attempt to create easier way to build and use mock objects and allow better refactoring support from the current tools. It's a hybrid approach between the pure Record/Replay of EasyMock.Net's model and NMock's expectation based model. Rhino.Mocks originated from EasyMock.Net and attempt to improve on their model to create easy to use and power mocking framework.

VS10x Editor View Enhancer Sign in to write a review Sort by: This tool claims to be a free add on. Later it becomes a "trial". TDD : Introduction to Rhino Mocks Rhino Mocks is the most popular Mock Object Framework for .NET. The purpose of this blog entry is to provide a brief introduction to Rhino Mocks. In particular, I want to describe how you can use Rhino Mocks when building ASP.NET MVC web applications. In the first part of this entry, I explain why Mock Object Frameworks are critical tools when performing Test-Driven Development. Next, I discuss how you can use Rhino Mocks to create both state verification unit tests and behavior verification unit tests. Finally, I discuss how Rhino Mocks forces you to design your ASP.NET MVC web applications in a particular way.

Rhino Mocks Documentation - Ayende @ Wiki Rhino Mocks allows you to easily create mock objects and setup a wide range of expectations on them using strongly typed notation instead of compiler-opaque strings. It's as simple as: IProjectView projectView = mocks.StrictMock<IProjectView>(); Expect.Call(projectView.Title).Return("Project's Title"); 15 TDD steps to create a Rails application Hi,Testing Rails applications is my passion for over 7 years now. If you sign up to this newsletter you will receive exclusive information about everything related to Ruby unit testing, Rails acceptance testing, JavaScript testing, testable architectures, TDD, BDD and good OO design. Subscribe to the Testing Rails mailing list Introduction Several times recently, I have been asked how to develop a Rails application using the Test Driven Development approach.

Corporation - Downloads The installation package includes Users View Sidekick, Code Review Sidekick, Shelveset Sidekick, Labels Sidekick, History Sidekick, Workspace Sidekick, Permission Sidekick and Status Sidekick in stand-alone application. To enable Visual Studio 2013 integration, please install VSIX Visual Studio Integration Package with all Sidekicks integrated, Search Items dialog and dynamic History functionality. Note that version 5.0 is compatible only with Visual Studio 2013 and Team Foundation Server 2013 client binaries. Please use prior versions of Sidekickas for prior versions of Visual Studio (2005/2008/2010) Download MSI installation package for stand-alone application (version 5.0, build from 24-Dec-2013) Download VSIX package for Visual Studio 2013 integrated experience (version 5.0, build from 24-Dec-2013)

Mocks Aren&#039;t Stubs The term 'Mock Objects' has become a popular one to describe special case objects that mimic real objects for testing. Most language environments now have frameworks that make it easy to create mock objects. What's often not realized, however, is that mock objects are but one form of special case test object, one that enables a different style of testing. In this article I'll explain how mock objects work, how they encourage testing based on behavior verification, and how the community around them uses them to develop a different style of testing. Derik Whittaker : HowTo: Setting Expectations on Stubs using RhinoMocks When using a mocking tool like RhinoMocks, one of the features that it can provide is the ability to A) create a stub of an object and B) set expectations on Method/Property calls that are part of that method. Doing this is pretty easy, but like all things there are some ‘gotcha’s’. Below is a step by step on how to set expectations on a stub Create your mock RepositoryMockRepository mocker = new MockRepository();Create your stubISomeInterface provider = mocker.Stub< ISomeInterface >();Note that I am using the mocker instance NOT MockRepository.GenerateStub. This is because if you use the static method on the MockRepository object, you WILL NOT have your expectations set in the runtime engine correctly.Set your expectationsExpect.Call(provider.SomeMethod(string.Empty, string.Empty)).IgnoreArguments().Return(false);Set everything in the Mock Enginemocker.ReplayAll();Test your stubbed expectationbool testValue = provider.SomeMethod();

Adzic » DbFit: Test-driven database development Important: From January 2013, DBFit has moved and the new home is This page is outdated and will no longer be updated. DbFit is a set of FIT fixtures which enables FIT/FitNesse tests to execute directly against a database. This enables developers to manipulate database objects in a relational tabular form, making database testing and management much easier then with xUnit-style tools.

Related: