Created
December 11, 2009 20:36
-
-
Save kkozmic/254489 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 void Member_should_action() | |
{ | |
Action action = () => { }; | |
kernel.Register( | |
Component.For<HasDependencies>() | |
.Parameters( | |
Parameter.ForKey("date").Eq(new DateTime(2009, 12, 12)), | |
Parameter.ForKey("Action").Eq(action), | |
Parameter.ForKey("Uri").Eq(new Uri("http://castleproject.org")), | |
Parameter.ForKey("Value").Eq<decimal>(123))); | |
var service = kernel.Resolve<HasDependencies>(); | |
Assert.AreSame(action, service.Action); | |
Assert.AreEqual(new DateTime(2009, 12, 12), service.Date); | |
Assert.AreEqual(new Uri("http://castleproject.org"), service.Uri); | |
Assert.AreEqual(123M, service.Value); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment