public void CanAddAndRetrieveNamedViewInstance() { IRegion region = new Region(); object myView = new object(); region.Add(myView, "MyView"); object returnedView = region.GetView("MyView"); Assert.IsNotNull(returnedView); Assert.AreSame(returnedView, myView); }
public void GetViewWithNullOrEmptyStringThrows() { IRegion region = new Region(); region.GetView(string.Empty); }
public void GetViewReturnsNullAfterRemovingViewFromRegion() { IRegion region = new Region(); object myView = new object(); region.Add(myView, "MyView"); region.Remove(myView); Assert.IsNull(region.GetView("MyView")); }
public void GetViewReturnsNullWhenViewDoesNotExistInRegion() { IRegion region = new Region(); Assert.IsNull(region.GetView("InexistentView")); }