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); }
/// <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);
public void TestProfilerProvider_Start_InvalidStorage() { var target = new ProfilerProvider() as IProfilerProvider; target.Start("test", null, null); }
public void TestProfilerProvider_Start_InvalidName() { var target = new ProfilerProvider() as IProfilerProvider; target.Start(null, null, null); }