Created
August 24, 2010 18:23
-
-
Save stevehorn/548033 to your computer and use it in GitHub Desktop.
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
<Test()> | |
public sub Test_getting_by_Type | |
Dim newTypeInstance As Type = GetType(ModelBinder.ModelBinder(Of Models.Query.Query)) | |
'Fails...why? | |
Dim retrievedByType = ObjectFactory.GetInstance(newTypeInstance)() | |
retrievedByType.ShouldNotBeNull() | |
'Passes | |
Dim retrievedByExplicit = ObjectFactory.GetInstance(Of ModelBinder.ModelBinder(Of Models.Query.Query))() | |
retrievedByExplicit.ShouldNotBenull() | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment