Ejemplo n.º 1
0
        private void EnsureTrace(BrowserLogMessage logMessage, TraceLevel level)
        {
            var exceptionHandler = new Mock <IExceptionHandler>(MockBehavior.Strict);
            var traceService     = new Mock <ITraceService>();

            var controller = new LogController(exceptionHandler.Object, traceService.Object);

            controller.Post(logMessage);

            traceService.Verify(v => v.Log(level, It.IsAny <string>()), Times.AtLeastOnce);
        }
Ejemplo n.º 2
0
 public void TestInitialize()
 {
     this.sampleMessage = new BrowserLogMessage {
         Payload = JToken.Parse("{ test: 'hi' }"),
     };
 }