Skip to content

Instantly share code, notes, and snippets.

@kkozmic
Created December 11, 2009 20:36
Show Gist options
  • Save kkozmic/254489 to your computer and use it in GitHub Desktop.
Save kkozmic/254489 to your computer and use it in GitHub Desktop.
[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