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); } }
public List <ShortNoteDTO> GetNotes(Guid customerGuid) { return(_client.GetNotes(customerGuid).Select(ToClientDTO).ToList()); }
public List <NoteDTO> GetCustomersNotes(CustomerDTO customer) { return(_client.GetNotes(customerGuid: customer.Guid).Select(sn => _client.GetNote(sn.Guid)).ToList()); }