CodeContracts – Amazing… simply amazing

Look at this code… looks perfectly normal right?  In a code review, you wouldn’t notice anything amiss. var tags = new List<DataCacheTagContract>(); tags.Add(new DataCacheTagContract() { Tag = "tag" }); tags.Add(new DataCacheTagContract()); Add("key", "value", TimeSpan.FromSeconds(1), tags); But there is a bug present and it isn’t obvious…  How would you know?  Code Contracts saved the day.  When…

0

I Love TDD and Code Contracts

After spending a few days writing a ton of code and heavily refactoring using TDD and Code Contracts I have to say… Wow! I know people like to debate the value of TDD, test first etc.  I don’t care what they say – this method rocks.  I found bugs I would have never found any…

0