Ejemplo n.º 1
0
        public async Task ResetPagesComplete_ValuesInsertedToCheckValidity_Verified(string pageId, TimesCalled timesCalled)
        {
            _qnaApiClient.Setup(x => x.ResetCompleteFlag(_applicationId, It.IsAny <int>(), It.IsAny <int>(), It.IsAny <List <string> >())).Returns(Task.CompletedTask);
            _service = new ResetCompleteFlagService(_qnaApiClient.Object);
            await _service.ResetPagesComplete(_applicationId, pageId);

            var responseCount = Moq.Times.Once();

            if (timesCalled == TimesCalled.Never)
            {
                responseCount = Moq.Times.Never();
            }

            _qnaApiClient.Verify(x => x.ResetCompleteFlag(It.IsAny <Guid>(), It.IsAny <int>(), It.IsAny <int>(), It.IsAny <List <string> >()), responseCount);
        }
Ejemplo n.º 2
0
 public string ToString(int charsPrefix)
 {
     return
         ($"{Name.PadRightExact(90-charsPrefix, '-')}{TotalMilliseconds.ToString().PadRightExact(9, '-')} Times:{TimesCalled.ToString().PadLeftExact(2, '0').PadRightExact(4)}[{MinMilliseconds},{MaxMilliseconds}]");
 }