CSharpFeeds - All your C# feeds in one place.

Thursday, February 25, 2010

Return from sequence in FakeItEasy

by Patrik Hägne via Legend and truth on 2/25/2010 7:36:00 PM

I added a nifty little feature in FakeItEasy today, not 100% sure about the naming though so if you have any ideas pleas tell me. The idea is that when you configure a call you can specify several values and each time a call is made to the configured member (property or method) the next value from the collection will be returned. Here’s what it looks like in action:public interface ICurrentTimeProvider { DateTime CurrentTime { get; } } [Test] public void Example() { var timeProvider = ...

[ read more ]

Careful with that axe, part two: What about exceptions?

by Eric Lippert via Fabulous Adventures In Coding on 2/25/2010 2:59:00 PM

Suppose you’re shutting down the worker thread we were talking about last time, and it throws an exception? What happens? Badness, that’s what. What to do about it? As in our previous discussion, it is better to not be in this situation in the first place: write the worker code so that it does not throw. If you cannot do that, then you have two choices: handle the exception, or don't handle the exception. Suppose you don't handle the exception. As of I think CLR v2, an unhandled exception in a ...

[ read more ]

Subscribe

New Feed

Product Spotlight

Recently Updated Sources

Legal Note

The content of the postings is owned by the respective author. CSharpFeeds is not responsible for the contents of the postings. This site is automatically generated and cannot be reviewed for abusive content. If you find abusive content on CSharpFeeds, please contact us. Designated trademarks and brands are the property of their respective owners. All rights reserved.

Advertise with us