public void Register_Registers_Element() { var target = new NameScope(); var element = new object(); target.Register("foo", element); Assert.Same(element, target.Find("foo")); }
public void Can_Register_Same_Element_More_Than_Once() { var target = new NameScope(); var element = new object(); target.Register("foo", element); target.Register("foo", element); Assert.Same(element, target.Find("foo")); }
public void Unregister_Unregisters_Element() { var target = new NameScope(); var element = new object(); target.Register("foo", element); target.Unregister("foo"); Assert.Null(target.Find("foo")); }
object INameScope.Find(string name) { return(_nameScope.Find(name)); }
public object Find(string name) => _nameScope.Find(name);
public object Find(string name) { return(_nameScope.Find(name)); }