Created
October 24, 2013 13:25
-
-
Save harriyott/7137271 to your computer and use it in GitHub Desktop.
Unit test to validate all controllers can bind
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[TestMethod] | |
public void Can_create_controllers() | |
{ | |
var kernel = new StandardKernel(); | |
SiteResolver.RegisterComponents(kernel); | |
typeof(AccountController) | |
.Assembly | |
.GetTypes() | |
.Where(t => typeof(Controller).IsAssignableFrom(t)) | |
.ToList() | |
.ForEach(c => kernel.Get(c)); | |
Assert.IsTrue(true); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment