public void ReportIsCorrectlyGeneratedTest()
        {
            PerformanceMetricsWriter metricsWriter;
            PerformanceReport        report;

            Scenario()
            .Given(metricsWriter = PerformanceMetricsWriter.With().TestName("ReportIsCorrectlyGeneratedTest"))
            .When(PerformanceSuite.With()
                  .NumRuns(2)
                  .PerRunTimeout(20).Seconds()
                  .LoadRunner(ContentionLoadRunner.With()
                              .Tests(new MyPerfTest())
                              .RunTimeout(15).Seconds())
                  .Listener(metricsWriter)
                  .Build())
            .When(report = metricsWriter.BuildReport())
            .When(report.PrintToConsole)
            .Then(
                Expect(report.GetMetricSummaryNamed("metric1").ValueMean),
                Is(ADouble.EqualTo(4.75)))
            .Then(
                Expect(report.GetMetricSummaryNamed("metric1").ValueMedian),
                Is(ADouble.EqualTo(5)))
            .Then(
                Expect(report.GetMetricSummaryNamed("metric1").ValueMax),
                Is(ADouble.EqualTo(10)))
            .Then(
                Expect(report.GetMetricSummaryNamed("metric1").ValueMin),
                Is(ADouble.EqualTo(0)))
            .Then(
                Expect(report.GetMetricSummaryNamed("metric1").MetricName),
                Is(AString.EqualTo("metric1")));
        }
예제 #2
0
 public void EqualToTest()
 {
     AssertFails(4.999999999999999D, ADouble.EqualTo(5));
     AssertPasses(5D, ADouble.EqualTo(5));
     AssertFails(5.000000000000001D, ADouble.EqualTo(5));
 }
예제 #3
0
 public void EqualToTestMax()
 {
     AssertFails(1.797689999999e+308, ADouble.EqualTo(double.MaxValue));
     AssertPasses(double.MaxValue, ADouble.EqualTo(double.MaxValue));
 }
예제 #4
0
 public void EqualToNull()
 {
     AssertPasses(null, ADouble.EqualTo(null));
     AssertFails(null, ADouble.EqualTo(1D));
     AssertFails(1D, ADouble.EqualTo(null));
 }
예제 #5
0
 public void EqualToTestMin()
 {
     AssertPasses(double.MinValue, ADouble.EqualTo(double.MinValue));
     AssertFails(double.MinValue + 0.000000000000001D, ADouble.EqualTo(double.MaxValue));
 }
예제 #6
0
 public ATestDto MyPrimDoubleProp(double expect)
 {
     MyPrimDoubleProp(ADouble.EqualTo(expect));
     return(this);
 }
예제 #7
0
 public ATestDto MyNullDoubleProp(double?expect)
 {
     MyNullDoubleProp(ADouble.EqualTo(expect));
     return(this);
 }