Esempio n. 1
0
        public void TestProfilerProvider()
        {
            var mockProfilingStorage = new Mock<IProfilingStorage>();
            var target = new ProfilerProvider() as IProfilerProvider;
            Assert.IsNotNull(target.Start("test", mockProfilingStorage.Object, null));

            //handle exception should not throw exception
            target.HandleException(new Exception(), this);
        }
Esempio n. 2
0
 /// <summary>
 /// Starts a new MiniProfiler from the <see cref="ProfilerProvider"/>.
 /// Shortcut for Options.ProfilerProvider.Start.
 /// </summary>
 /// <param name="profilerName">
 /// Allows explicit naming of the new profiling session; when null, an appropriate default will be used, e.g. for
 /// a web request, the URL will be used for the overall session name.
 /// </param>
 public MiniProfiler StartProfiler(string profilerName = null) => ProfilerProvider.Start(profilerName, this);
Esempio n. 3
0
 public void TestProfilerProvider_Start_InvalidStorage()
 {
     var target = new ProfilerProvider() as IProfilerProvider;
     target.Start("test", null, null);
 }
Esempio n. 4
0
 public void TestProfilerProvider_Start_InvalidName()
 {
     var target = new ProfilerProvider() as IProfilerProvider;
     target.Start(null, null, null);
 }