public void DatabaseIsPassedToDelegate_When_Invoked() { IDatabase <int, int> passedDb = default; using var wQuery = new WriteQuery <int, int>(db => passedDb = db); wQuery.Execute(_db); passedDb.Should() .BeEquivalentTo(_db); }
public void Executes_DelegateInConstructor_When_Invoked() { var invoked = false; using var wQuery = new WriteQuery <int, int>(_ => invoked = true); wQuery.Execute(_db); invoked.Should() .BeTrue(); }