Sorting some result list by the ids of another list

by Oliver 24. June 2011 21:47

Imagine we have the following list of ids of some kind of objects and a mapping of some of the ids to some values (also int’s here): 1: var ids = new List<int> { 6, 2, 5, 3, 7 }; 2: var valueMap = new List<int[]> { new[] { 5, 15 }, new[] { 2, 12 }, new[] { 3, 13 }... [More]

Mocking revisited – mocking a method and passing a parameter using FakeItEasy and Moq

by Oliver 21. June 2011 23:35

Finally, I’ve started mocking things in our kind of legacy project while building new functionality. Now, I wanted to replace some DAL service with a mock that would would just serve me some results instead of ramping up NHibernate, going to the DB and assembling all the entities for this test. At f... [More]

Mocking for the first time – a short overview of a few .NET mocking frameworks

by Oliver 25. March 2011 15:50

In my recent post Testing: trying to get it right I mentioned that a lot of our tests are of the dirty hybrid kind, somewhere between real Unit tests and real Integration tests. Focusing on the Unit test part, we’re looking into using a mocking framework right now to change the way we write tests – ... [More]

Running a multi-lingual web application: System.IO.PathTooLongException

by Oliver 4. March 2011 15:18

We definitely have long paths on our client’s platform, for example for a concrete rating on the detail page of a campsite with a long name in a state with a long name - [More]

Using a single/the same AssemblyInfo.cs across projects

by Oliver 12. February 2011 11:17

Recently, while skimming my RSS feeds for a short read, I stumbled upon Phil Haack’s blog and his post Introducing RouteMagic. I’m not going into the details of that post right now (although to me it seems he’s written some interesting stuff about MVC and lately on Routing). I was just curious about... [More]

enjoyed the post?


Testing: trying to get it right

by Oliver 9. February 2011 10:54

Read a great post on Steve Sanderson’s blog with the promising title Writing Great Unit Tests – and it is definitely worth reading. He mentions another post with the title Integration Testing Your ASP.NET MVC Application which I also recommend. One of the eye openersfor me was this quote in his post... [More]

C# access modifiers: protected internal vs. protected vs. internal

by Oliver 27. January 2011 22:50

As I just read here on msdn, the modifiers protected and internal are orthogonal as in that they can be specified in all combinations and are combined with a logical OR. This means: protected members are accessible from inheriting classes internal members are accessible from classes within th... [More]

The Teamaton tool belt: a collection of small but useful tools for every day development and administration

by Oliver 26. January 2011 20:30

Today: a simple hosts file editor Today I set up a new project on GitHub: the Teamaton tool belt! It shall serve us as a central store for small tools, probably mostly command-line, built for a single purpose. The first tool in our new tool belt is: HostsEditor. I wrote this small command line uti... [More]

Automatic deployment of an ASP.NET Web Application Project with TeamCity and MSBuild

by Oliver 21. January 2011 20:19

We recently updated one our largest project to use ASP.NET 4.0, and for this matter the new Package/Publish feature including sub-web.configs which is meant to supersede the Web Deployment Project. For a manual deployment there’s a good write-up on the msdn library titled ASP.NET Web Application Pro... [More]

dotnetpro 10/2010 – some notes on useful links and further reading

by Oliver 19. January 2011 18:15

Parallel Programming in C# Free eBook: The Task class: use like 1: Task.Factory 2: .StartNew(() => { 3: var result = new MyCustomObject(); 4: // do something and return... [More]

enjoyed the post?


About Oliver code blog logo I build web applications using ASP.NET and have a passion for jQuery. Enjoy MVC 4 and Orchard CMS, and I do TDD whenever I can. I like clean code. Love to spend time with my wife and our daughter. My profile on Stack Exchange, a network of free, community-driven Q&A sites

About Anton code blog logo I'm a software developer at teamaton. I code in C# and work with MVC, Orchard, SpecFlow, Coypu and NHibernate. I enjoy beach volleyball, board games and Coke.