Created
April 12, 2011 17:50
-
-
Save egomesbrandao/916016 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
Public Class Fornecedor | |
Implements IContrato | |
End Class | |
Public Interface IContrato | |
End Interface | |
Imports Ninject.Modules | |
Public Class Modulo | |
Inherits NinjectModule | |
Public Overrides Sub Load() | |
Bind(Of IContrato).To(Of Fornecedor)() | |
End Sub | |
End Class | |
<TestClass()> Public Class NinjectTest | |
<TestMethod()> _ | |
Public Sub TestMethod1() | |
Dim modulo As New Modulo() | |
Dim kernel As IKernel = New StandardKernel(modulo) | |
Dim meuContrato As IContrato = kernel.Get(Of IContrato)() | |
Assert.IsNotNull(meuContrato) | |
Assert.IsInstanceOfType(meuContrato, GetType(Fornecedor)) | |
End Sub | |
End Class |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment