Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        public void GetViewWithNullOrEmptyStringThrows()
        {
            IRegion region = new Region();

            region.GetView(string.Empty);
        }
Esempio n. 3
0
        public void GetViewReturnsNullAfterRemovingViewFromRegion()
        {
            IRegion region = new Region();
            object myView = new object();
            region.Add(myView, "MyView");
            region.Remove(myView);

            Assert.IsNull(region.GetView("MyView"));
        }
Esempio n. 4
0
        public void GetViewReturnsNullWhenViewDoesNotExistInRegion()
        {
            IRegion region = new Region();

            Assert.IsNull(region.GetView("InexistentView"));
        }