예제 #1
0
        public void GetNotesTest()
        {
            var customer = _util.GetAuthorizedCustomerDTO();
            IEnumerable <ShortNoteDTO> addedShortNotes = _util.GetAddedNotes(customer)
                                                         .Select(addedNote => new ShortNoteDTO {
                Guid = addedNote.Guid, Title = addedNote.Title
            });

            IEnumerable <ShortNoteDTO> customersShortNotes = _client.GetNotes(customer.Guid);

            foreach (var aNote in addedShortNotes)
            {
                var customerHasThisNode =
                    customersShortNotes.Any(note =>
                                            note.Guid.Equals(aNote.Guid) &&
                                            note.Title.Equals(aNote.Title)
                                            );
                Assert.IsTrue(customerHasThisNode);
            }
        }
예제 #2
0
 public List <ShortNoteDTO> GetNotes(Guid customerGuid)
 {
     return(_client.GetNotes(customerGuid).Select(ToClientDTO).ToList());
 }
예제 #3
0
 public List <NoteDTO> GetCustomersNotes(CustomerDTO customer)
 {
     return(_client.GetNotes(customerGuid: customer.Guid).Select(sn => _client.GetNote(sn.Guid)).ToList());
 }