Пример #1
0
 public void SetupLayoutManager()
 {
     managedControl        = GetControlFactory().CreateControl();
     managedControl.Width  = 100;
     managedControl.Height = 100;
     _ManagerStub          = new LayoutManagerStub(managedControl);
 }
 public void SetupLayoutManager()
 {
     managedControl = GetControlFactory().CreateControl();
     managedControl.Width = 100;
     managedControl.Height = 100;
     _ManagerStub = new LayoutManagerStub(managedControl);
 }
Пример #3
0
        public void Test_Refresh()
        {
            //---------------Set up test pack-------------------
            IControlHabanero  control     = GetControlFactory().CreatePanel();
            LayoutManagerStub managerStub = new LayoutManagerStub(control);

            //---------------Assert Precondition----------------
            Assert.IsFalse(managerStub.IsRefreshed);
            //---------------Execute Test ----------------------
            managerStub.Refresh();
            //---------------Test Result -----------------------
            Assert.IsTrue(managerStub.IsRefreshed);
        }
Пример #4
0
        public void Test_ResetTheManagedControl()
        {
            //---------------Set up test pack-------------------
            IControlHabanero  control     = GetControlFactory().CreatePanel();
            LayoutManagerStub managerStub = new LayoutManagerStub(control);

            //---------------Assert Precondition----------------

            Assert.AreSame(control, managerStub.ManagedControl);
            //---------------Execute Test ----------------------
            IControlHabanero control2 = GetControlFactory().CreatePanel();

            managerStub.ManagedControl = control2;

            //---------------Test Result -----------------------
            Assert.AreSame(control2, managerStub.ManagedControl);
        }
        public void Test_ResetTheManagedControl()
        {
            //---------------Set up test pack-------------------
            IControlHabanero control = GetControlFactory().CreatePanel();
            LayoutManagerStub managerStub = new LayoutManagerStub(control);

            //---------------Assert Precondition----------------

            Assert.AreSame(control, managerStub.ManagedControl);
            //---------------Execute Test ----------------------
            IControlHabanero control2 = GetControlFactory().CreatePanel();
            managerStub.ManagedControl = control2;

            //---------------Test Result -----------------------
            Assert.AreSame(control2, managerStub.ManagedControl);

        }
 public void Test_Refresh()
 {
     //---------------Set up test pack-------------------
     IControlHabanero control = GetControlFactory().CreatePanel();
     LayoutManagerStub managerStub = new LayoutManagerStub(control);
     //---------------Assert Precondition----------------
     Assert.IsFalse(managerStub.IsRefreshed);
     //---------------Execute Test ----------------------
     managerStub.Refresh();
     //---------------Test Result -----------------------
     Assert.IsTrue(managerStub.IsRefreshed);
 }