public void GivenAHappyUpserter() { _upserter = new Upserter <int>(x => x, (x, y) => x == y, ints => ints.Length, ints => ints.Length, null); }
public void GivenAHappyUpserter() { _upserter = new Upserter <int>(x => x, null, ints => ints.Length, ints => ints.Length, ints => ints.Length); }
public void GivenAnUpdater() { _upserter = new Upserter <EntityWithIntId>(x => x.GetId(), null, updateRequest => { _updateRequests = updateRequest; return(0); } , null); }
public void GivenAHappyUpserter() { _upserter = new Upserter <int>(x => x, (x, y) => x == y, ints => { _addedEntities = ints; return(ints.Length); }, ints => { _updatedEntities = ints; return(ints.Length); }, ints => { _deletedEntities = ints; return(ints.Length); }); }
public void GivenAUpserterThatDoesNotWantToUpdate() { _upserter = new Upserter <string, Guid>(x => new Guid(x), (x, y) => false, strings => { _addedEntities = strings; return(strings.Length); }, strings => { _updatedEntities = strings; return(strings.Length); }, strings => { _deletedEntities = strings; return(strings.Length); }); }