public async Task TestGetNoteByIdsFilter()
        {
            // arrange
            var note1 = await _persistence.CreateNoteAsync(null, NoteTestModelV1.GenerateRandomNote());

            var note2 = await _persistence.CreateNoteAsync(null, NoteTestModelV1.GenerateRandomNote());

            var note3 = await _persistence.CreateNoteAsync(null, NoteTestModelV1.GenerateRandomNote());

            var filter = FilterParams.FromTuples(
                "ids", $"{note2.Id}"
                );

            // act
            var result = await _persistence.GetNotesAsync(null, filter, null);

            // assert
            Assert.NotNull(result);
            Assert.Single(result.Data);
            NoteTestModelV1.AssertEqual(note2, result.Data[0]);
        }
Esempio n. 2
0
 public async Task <DataPage <NoteV1> > GetNotesAsync(string correlationId, FilterParams filter, PagingParams paging)
 {
     return(await SafeInvokeAsync(correlationId, "GetNotesAsync",
                                  () => _persistence.GetNotesAsync(correlationId, filter, paging)));
 }