public async Task TestGetAndDeleteNonExistentRecordReturnsNull() { Poco?res = await PocoView.GetAndDeleteAsync(null, GetPoco(2, "2")); Assert.IsNull(res); Assert.IsNull(await PocoView.GetAsync(null, GetPoco(2))); }
public async Task TestGetAndDeleteExistingRecordRemovesAndReturns() { await PocoView.UpsertAsync(null, GetPoco(2, "2")); Poco?res = await PocoView.GetAndDeleteAsync(null, GetPoco(2)); Assert.IsNotNull(res); Assert.AreEqual(2, res !.Key); Assert.AreEqual("2", res.Val); Assert.IsNull(await PocoView.GetAsync(null, GetPoco(2))); }