public void InsertTest() { var rec = new IdValue() { Value = "The new one" }; int id = _gateway.Insert(rec); Assert.That(id >= 3); }
public void DeleteTest() { var recs = _gateway.Select().Where(x => x.Value.Equals("The new one")); if (!recs.Any()) { var rec = new IdValue() { Value = "The new one" }; _gateway.Insert(rec); } recs = _gateway.Select().Where(x => x.Value.Equals("The new one")).ToList(); foreach (var idValue in recs) { _gateway.Delete(idValue.Id); } var afterDelete = _gateway.Select().Where(x => x.Value.Equals("The new one")).ToList(); Assert.That(recs.Any()); Assert.That(!afterDelete.Any()); }