public async Task CanCreateUpdateRemoveAsync()
        {
            await ResetAsync();

            await _repository.RemoveAllAsync();

            await _client.RefreshAsync();

            Assert.Equal(0, await _repository.CountAsync());

            var stack = StackData.GenerateStack(projectId: TestConstants.ProjectId, organizationId: TestConstants.OrganizationId);

            Assert.Null(stack.Id);

            await _repository.AddAsync(stack);

            Assert.NotNull(stack.Id);
            await _client.RefreshAsync();

            stack = await _repository.GetByIdAsync(stack.Id);

            Assert.NotNull(stack);

            stack.Description = "New Description";
            await _repository.SaveAsync(stack);

            await _repository.RemoveAsync(stack.Id);
        }
Example #2
0
        protected async Task RemoveDataAsync()
        {
            await _eventRepository.RemoveAllAsync();

            await _client.RefreshAsync();

            await _repository.RemoveAllAsync();

            await _client.RefreshAsync();
        }
Example #3
0
        private async Task RemoveDataAsync()
        {
            await _organizationRepository.RemoveAllAsync();

            await _projectRepository.RemoveAllAsync();

            await _eventRepository.RemoveAllAsync();

            await _stackRepository.RemoveAllAsync();
        }
Example #4
0
        private async Task RemoveEventsAndStacks()
        {
            await _client.RefreshAsync();

            await _eventRepository.RemoveAllAsync();

            await _client.RefreshAsync();

            await _stackRepository.RemoveAllAsync();

            await _client.RefreshAsync();
        }
Example #5
0
        private async Task RemoveDataAsync(bool removeUserAndProjectAndOrganizationData = false)
        {
            await _eventRepository.RemoveAllAsync();

            await _stackRepository.RemoveAllAsync();

            if (!removeUserAndProjectAndOrganizationData)
            {
                return;
            }

            await _tokenRepository.RemoveAllAsync();

            await _userRepository.RemoveAllAsync();

            await _projectRepository.RemoveAllAsync();

            await _organizationRepository.RemoveAllAsync();
        }
        protected async Task RemoveDataAsync()
        {
            await _repository.RemoveAllAsync();

            await _stackRepository.RemoveAllAsync();
        }