It’s the little things

July 17th, 2008

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 :-) .

Jan Van Ryswyck Esoterica, Unit Testing

  1. July 17th, 2008 at 15:11 | #1

    ohh, very nice :)

Comments are closed.