public void ShouldThrowArgumentExceptionWhenNoService() { var dep = new Hdependency(); // no such service Expect <Action>(() => dep.Get <IEnumerable>()).ToThrowException <ArgumentException>(); }
public void ShouldGetTheRightService() { var dep = new Hdependency(); IEnumerable service = "test"; //a string is a valid IEnumerable, so this is possible dep.Register <IEnumerable>(service); Expect(dep.Get <IEnumerable>()).ToBe("test"); }