private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.performanceCounter1 = new System.Diagnostics.PerformanceCounter(); this.performanceCounterChecker1 = new MbUnit.Framework.ComponentModel.PerformanceCounterChecker(this.components); this.testCaseComponent1 = new MbUnit.Framework.ComponentModel.TestCaseComponent(this.components); ((System.ComponentModel.ISupportInitialize)(this.performanceCounter1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.performanceCounterChecker1)).BeginInit(); // // performanceCounter1 // this.performanceCounter1.CategoryName = ".NET CLR Data"; this.performanceCounter1.CounterName = "SqlClient: Current # connection pools"; // // performanceCounterChecker1 // this.performanceCounterChecker1.MaxValue = 10F; this.performanceCounterChecker1.MinValue = 0F; this.performanceCounterChecker1.PerformanceCounter = this.performanceCounter1; // // testCaseComponent1 // this.testCaseComponent1.Test += new System.EventHandler(this.testCaseComponent1_Test_3); ((System.ComponentModel.ISupportInitialize)(this.performanceCounter1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.performanceCounterChecker1)).EndInit(); }
protected override void OnValidate(object value) { if (value == null) { throw new ArgumentNullException("value"); } TestCaseComponent testCase = value as TestCaseComponent; if (testCase == null) { throw new ArgumentException("value not assignable to TestCaseComponent"); } base.OnValidate(value); }
public void AddTestCase(TestCaseComponent testCase) { this.Owner.Container.Add(testCase); this.List.Add(testCase); }