示例#1
0
        private async Task Run(Guid envId, ITestCaseQuery query, Guid id)
        {
            var env = await _appEnvRepository.FirstOrDefaultAsync(x => x.Id == envId);

            var testCases = await query.Query(id);

            await _executor.Execute(env.Host, testCases);
        }
示例#2
0
        public async Task <Guid> Save(InAppEnvSaveDto input)
        {
            var envId  = input.EnvId ?? Guid.Empty;
            var entity = await _appEnvRepository.FirstOrDefaultAsync(x => x.Id == envId);

            if (input.EnvId == null)
            {
                entity = new AppEnv {
                    Id = Guid.NewGuid(), AppId = input.AppId, Host = input.Host
                };
                await _appEnvRepository.InsertAsync(entity);
            }
            else
            {
                entity.AppId = input.AppId;
                entity.Host  = input.Host;
                await _appEnvRepository.UpdateAsync(entity);
            }
            return(entity.Id);
        }