예제 #1
0
        public void deleteAsyncTest()
        {
            //Arrange
            Event test = new Event();

            //Act
            model.DeleteAsync(test);

            //Arrange
        }
예제 #2
0
        public async Task <DeleteMoodRecordResponse> RunAsync <T>(T request, CancellationToken token)
        {
            _logger.LogTrace($"{nameof(RunAsync)} in {nameof(DeleteMoodRecordService)} running.");

            if (request is not DeleteMoodRecordCommand command)
            {
                _logger.LogError(
                    $"{nameof(request)} with body: {JsonSerializer.Serialize(request)} " +
                    $"is not of type {typeof(DeleteMoodRecordCommand)}");

                throw new ArgumentException($"{nameof(request)} is not of type {typeof(DeleteMoodRecordCommand)}");
            }

            await _mongoDbRepository.DeleteAsync(command.MoodId);

            return(new DeleteMoodRecordResponse(true));
        }