protected override void Dispose(bool disposing) { if (disposing) { if (optionsControl != null) { optionsControl.Dispose(); optionsControl = null; } } base.Dispose(disposing); }
protected override void Dispose(bool disposing) { if (disposing) { if (optionsControl != null) { optionsControl.Dispose(); optionsControl = null; } } base.Dispose(disposing); }
public void WindowTest() { OptionsPageCustom target = optionsPageCustom; Microsoft_Samples_VisualStudio_IDE_OptionsPage_OptionsPageCustomAccessor accessor = new Microsoft_Samples_VisualStudio_IDE_OptionsPage_OptionsPageCustomAccessor(target); OptionsCompositeControl optionsControl = new OptionsCompositeControl(); optionsControl = accessor.Window as OptionsCompositeControl; Assert.IsNotNull(optionsControl, "Internal Window property was not initialized by expected value."); Assert.AreEqual(optionsControl.OptionsPage, target, "Internal CompositeCOntrol options page property was initialized by unexpected value."); }
public void ConstructorTest() { OptionsCompositeControl target = new OptionsCompositeControl(); Assert.IsNotNull(target, "Instance of the OptionsCompositeControl was not created successfully after default constructor call."); }
/// <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); } }
public void TestInitialize() { compositeControl = new OptionsCompositeControl(); compositeControlAccessor = new Microsoft_Samples_VisualStudio_IDE_OptionsPage_OptionsCompositeControlAccessor(compositeControl); Assert.IsNotNull(compositeControl, "General OptionsCompositeControl instance (compositeControl) was not created successfully."); }
public void TestCleanup() { compositeControl = null; compositeControlAccessor = null; }
public void InitializeComponentTest() { OptionsCompositeControl target = new OptionsCompositeControl(); Assert.IsNotNull(target, "Instance of the OptionsCompositeControl object was not created successfully."); Microsoft_Samples_VisualStudio_IDE_OptionsPage_OptionsCompositeControlAccessor accessor = new Microsoft_Samples_VisualStudio_IDE_OptionsPage_OptionsCompositeControlAccessor(target); Assert.IsNotNull(accessor, "Instance of the OptionsCompositeControl accessor was not created successfully."); accessor.InitializeComponent(); Assert.IsNotNull(target.Controls, "Controls collection was not initialized after InitializeComponent() call."); Assert.IsTrue((target.Controls.Count>0), "Controls collection was not populated by controls objects."); }