Ejemplo n.º 1
0
        public void DisposeTest()
        {
            OptionsCompositeControl target = compositeControl;

            Assert.IsTrue((target is IDisposable),
                          "Tested OptionsCompositeControl instance does not implements IDisposable interface.");

            target.Dispose();
            Assert.IsTrue(target.IsDisposed,
                          "Internal state of the OptionsCompositeControl instance is in the NotDosposed state, was expected that IsDisosed is True.");
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Clean up any resources being used.
 /// </summary>
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (compositeControl != null)
         {
             compositeControl.Dispose();
             compositeControl = null;
         }
         if (compositeControlAccessor != null)
         {
             compositeControlAccessor.Dispose(true);
             compositeControlAccessor = null;
         }
         GC.SuppressFinalize(this);
     }
 }