Skip to content

Instantly share code, notes, and snippets.

@pawelklimczyk
Created November 14, 2016 13:29
Show Gist options
  • Save pawelklimczyk/cff77aec37c36f1a5650d18a94b855f0 to your computer and use it in GitHub Desktop.
Save pawelklimczyk/cff77aec37c36f1a5650d18a94b855f0 to your computer and use it in GitHub Desktop.
[TestFixture]
public class UsersModuleConventionTests
{
[Test]
public void AllPublicMethodsNeedToReturnOperationResult()
{
CodeWatcherConfig config = CodeWatcherConfig.Create()
.WithWatcher(c => new MethodReturnTypeWatcher(c).Configure(typeof(OperationResult<object>)))
.WatchAssembly(typeof(UsersModule).Assembly)
.Build();
//This will throw exception if any public method will return something else than OperationResult<object>
config.Execute();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment