Esempio n. 1
0
        public void TestCompleteRequestTrace_WhenSuccess()
        {
            owinRequestMock.Setup(s => s.Uri).Returns(new Uri("http://fake.com"));
            owinRequestMock.SetReturnsDefault("");
            owinResponseMock.Setup(s => s.Body).Returns(new MemoryStream());

            var signalrRequest = new SignalrRequest(owinContextMock.Object);

            sqlOperationMock.Setup(s => s.ExecuteAsync(It.IsAny <ExecuteSqlQuery>(), It.IsAny <object[]>()));
            dataTracingService.CompleteRequestTrace(signalrRequest);
            sqlOperationMock.Verify(v => v.ExecuteAsync(It.IsAny <ExecuteSqlQuery>(),
                                                        It.IsAny <object[]>()), Times.Exactly(1));
        }
 protected override void OnPostRequest()
 {
     LogHelper.Log("OnPostRequest");
     _tracer.CompleteRequestTrace(CurrentRequest);
 }