I've been reading through the book Working Effectively with Legacy Code and I've been playing around with the concept of overriding difficult to test methods in unit tests via the creation of a fake. I put together an example of what I thought would work and it ended up behaving differently than I had been expecting. I think I've just di...
Do you (and would you) ever create progress bars that are just there to keep the client happy and moves without reflecting the true progress of the program? I remember reading about this somewhere, and am wondering if there are other developers that do it too...
...
Hi,
I'm currently testing the controller in my mvc app and I'm creating a fake repository for testing. However I seem to be writing more code and spending more time for the fakes than I do on the actual repositories. Is this right?
The code I have is as follows:
Controller
public partial class SomeController : Controller
{
IRepos...
Hi,
I'm developing a site which serves some slow (up to around 4 sec. loading time) pages due to extensive database queries.
In order to let the users know that the new page is loading (also to prevent multiple clicks), I'm displaying a div with a fake loading bar on the page where the users clicked a link to a slow loading page.
Actu...
Say I have the following business logic:
foreach (var item in repository.GetAll())
{
if (SomeConditition)
{
item.Status = Status.Completed;
repository.Update(item);
}
}
Now I write the following unit test:
public void Test()
{
var repository = new FakeReposit...
I stumbled upon this open source project Fake It Easy, and I have to admit, it looks very interesting, however I have my doubts, what are the difference between FIE fakes and say Moq Mocks? Is any one better for particular uses?
EDIT:
What is it about this new framework that would make it better than say Moq?
...