0

I am trying to write unit tests for my application and would like to have my proto-classes implement interfaces. Preferably they would be generated together with the c# classes, but I can not find a way of doing this. Is there a way?

TeeCee
  • 37
  • 4

1 Answers1

1

The protogen tool writes standard partial-class definitions. This makes it easy to add interfaces in a second class file:

namespace Foo {
    partial class Bar : IWhatever {...}
}
Marc Gravell
  • 1,026,079
  • 266
  • 2,566
  • 2,900
  • Thank you one part down. Do you know if there is a way of generating them at the same time as the c#-classes. So that generating the classes will generate Interfaces as well? I am currently generating the c#-classes during pre-build and would like to get the interfaces generated at the same time. – TeeCee Aug 26 '14 at 09:58