public async Task <TestCaseResponse> InsertAsync(TestCaseRequest testCaseRequest)
        {
            var testCase = testCaseRequest.ToDataModel();
            await _dbService.InsertAsync(testCase);

            return(testCase.ToResponse());
        }
示例#2
0
        public async Task <TestRunResponse> InsertTestRunAsync(int sessionId, TestRunRequest testRunRequest)
        {
            var testRun = testRunRequest.ToDataModel(sessionId);
            await _dbService.InsertAsync(testRun);

            return(testRun.ToResponse());
        }
示例#3
0
        public async Task InsertMessageAsync(ChatMessageDTO messageDto)
        {
            var userId = await _usersService.GetUserIdAsync(messageDto.UserName);

            string guestUserName = null;

            if (userId == null)
            {
                guestUserName = messageDto.UserName;
            }
            var message = messageDto.ToDataModel(userId, guestUserName);
            await _dbService.InsertAsync(message);
        }