A while ago, I wrote a blog post regarding Test Data Builders Refined. Earlier this week, I wrote a very simple base class that provides an implicit cast operator for the builder class:
public abstract class TestDataBuilder<TSubject> { public abstract TSubject Build(); public static implicit operator TSubject(TestDataBuilder builder) { return builder.Build(); } }
Even I can’t get it more complex than this :-).
ohh, very nice 🙂