private async Task TestUpdate(ISQLiteClient client) { var note = new Note { Id = 1, Content = "Updated content", LastUpdated = DateTime.Now }; await client.UpdateAsync(note); var result = await client.GetAsync(1); Assert.AreEqual(note.Content, result.Content); }
private async Task TestInsert(ISQLiteClient client) { var note1 = new Note { Content = "IntegrationTest1", LastUpdated = DateTime.Now }; var note2 = new Note { Content = "IntegrationTest2", LastUpdated = DateTime.Now }; var resultingId1 = await client.InsertAsync(note1); var resultingId2 = await client.InsertAsync(note2); Assert.AreEqual(1, resultingId1.Id); Assert.AreEqual(2, resultingId2.Id); }
private async Task TestGet(ISQLiteClient client) { var result = await client.GetAsync(); Assert.IsTrue(result.Count() == 2); }
private async Task TestGet(ISQLiteClient client, int id) { var result = await client.GetAsync(id); Assert.AreEqual(id, result.Id); }