Inheritance Hierarchy
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
The ProfileResultsFormatterTests type exposes the following members.
Constructors
Name | Description | |
---|---|---|
![]() | ProfileResultsFormatterTests | Initializes a new instance of the ProfileResultsFormatterTests class |
Methods
Name | Description | |
---|---|---|
![]() | NeverStartingReportsNothingProfiled | |
![]() | StartingAndStoppingTwice | |
![]() | StartingOneSection | |
![]() | StartingTwoSections |
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