Пример #1
0
 public PerformanceCounterCheckerTestCase(
     PerformanceCounterChecker checker,
     ITestCase testCase)
 {
     this.checker  = checker;
     this.testCase = testCase;
 }
 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();
 }
 public PerformanceCounterCheckerTestCase(
     PerformanceCounterChecker checker,
     ITestCase testCase)
 {
     this.checker = checker;
     this.testCase = testCase;
 }