public void GetViewWithNullOrEmptyStringThrows() { var ex = Assert.Throws <ArgumentException>(() => { IRegion region = new Region(); region.GetView(string.Empty); }); }
public void GetViewReturnsNullAfterRemovingViewFromRegion() { IRegion region = new Region(); var myView = new ContentView(); region.Add(myView, "MyView"); region.Remove(myView); Assert.Null(region.GetView("MyView")); }
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 CanAddAndRetrieveNamedViewInstance() { IRegion region = new Region(); var myView = new ContentView(); region.Add(myView, "MyView"); object returnedView = region.GetView("MyView"); Assert.NotNull(returnedView); Assert.Same(returnedView, myView); }
public void GetViewWithNullOrEmptyStringThrows() { IRegion region = new Region(); region.GetView(string.Empty); }
public void GetViewReturnsNullWhenViewDoesNotExistInRegion() { IRegion region = new Region(); Assert.IsNull(region.GetView("InexistentView")); }
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.Null(region.GetView("InexistentView")); }