public void DisposedControlDoesNotActivateTheWorkItem()
        {
            TestableRootWorkItem workItem    = new TestableRootWorkItem();
            MyControl            testControl = new MyControl();

            workItem.Items.Add(testControl);

            testControl.Dispose();

            testControl.FireEnter();
            Assert.IsFalse(workItem.Status == WorkItemStatus.Active);
        }
예제 #2
0
        public void ControlCreateViewStyle()
        {
            tlog.Debug(tag, $"ControlCreateViewStyle START");

            var testingTarget = new MyControl();

            Assert.IsNotNull(testingTarget, "null handle");
            Assert.IsInstanceOf <Control>(testingTarget, "Should return Control instance.");

            try
            {
                testingTarget.OnCreateViewStyle();
            }
            catch (Exception e)
            {
                tlog.Debug(tag, e.Message.ToString());
                Assert.Fail("Caught Exception : Failed!");
            }

            testingTarget.Dispose();
            tlog.Debug(tag, $"ControlCreateViewStyle END (OK)");
        }
예제 #3
0
 private void Window_Closed(object sender, EventArgs e)
 {
     MyControl.Dispose();
 }
예제 #4
0
 public void Dispose()
 {
     MyControl.Dispose();
 }