ProfileResultsFormatterTests ClassDelta Engine Documentation
Inheritance Hierarchy

System Object
  DeltaEngine.Profiling.Tests ProfileResultsFormatterTests

Namespace: DeltaEngine.Profiling.Tests
Assembly: DeltaEngine.Profiling.Tests (in DeltaEngine.Profiling.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public class ProfileResultsFormatterTests

The ProfileResultsFormatterTests type exposes the following members.

Constructors

  NameDescription
Public methodProfileResultsFormatterTests
Initializes a new instance of the ProfileResultsFormatterTests class
Top
Methods

  NameDescription
Public methodNeverStartingReportsNothingProfiled
Public methodStartingAndStoppingTwice
Public methodStartingOneSection
Public methodStartingTwoSections
Top
Examples

[Test]
public void NeverStartingReportsNothingProfiled()
{
    var profiler = new CodeProfiler();
    Assert.AreEqual(NothingProfiled,
        profiler.GetProfilingResultsSummary(ProfilingMode.Rendering));
}
[Test]
public void StartingOneSection()
{
    var profiler = new CodeProfiler();
    profiler.Start(ProfilingMode.Rendering, Section1);
    Assert.IsTrue(
        profiler.GetProfilingResultsSummary(ProfilingMode.Rendering).StartsWith(OneSection));
}
[Test]
public void StartingTwoSections()
{
    var profiler = new CodeProfiler();
    profiler.Start(ProfilingMode.Rendering, Section1);
    profiler.Start(ProfilingMode.Rendering, Section2);
    Assert.IsTrue(
        profiler.GetProfilingResultsSummary(ProfilingMode.Rendering).StartsWith(TwoSections));
}
[Test]
public void StartingAndStoppingTwice()
{
    var profiler = StartAndStopTwoSections();
    string summary = profiler.GetProfilingResultsSummary(ProfilingMode.Rendering);
    Assert.IsTrue(summary.StartsWith(TwoSections));
    Assert.IsTrue(summary.Contains(Section1));
    Assert.IsTrue(summary.Contains(Section2));
    Assert.IsTrue(summary.Contains(OneCall));
}
See Also