public void TestAlias() { bindData.Alias("foo-alias"); bindData.Alias <IFoo>(); Assert.AreSame(bindData, container.GetBind("foo-alias")); Assert.AreSame(bindData, container.GetBind <IFoo>()); }
public void CheckIllegalAlias() { var container = new Container(); var bindData = new BindData(container, "CheckIllegalAlias", (app, param) => "hello world", false); ExceptionAssert.Throws <ArgumentNullException>(() => { bindData.Alias(null); }); ExceptionAssert.Throws <ArgumentNullException>(() => { bindData.Alias(string.Empty); }); }