public void JoinEmptyChildsThenParent() { DataMigrationHelper.AddBooks(250, DbAccess); var books = Measure(() => CreateQuery() .Select.Table <BookWithFkImages>() .Join(f => f.Images.Type.Book) .ToArray()); Assert.That(books, Is.Not.Null); }
public void AddBooksTest() { Assert.That(() => DataMigrationHelper.ClearDb(DbAccess), Throws.Nothing); Assert.That(() => DbAccess.Database.Run(s => s.GetSkalar("SELECT COUNT(1) FROM " + BookMeta.TableName)), Is.Zero); Assert.That(DataMigrationHelper.AddBooks(200, DbAccess), Is.Not.Empty.And.Unique); Assert.That(() => DbAccess.Database.Run(s => s.GetSkalar("SELECT COUNT(1) FROM " + BookMeta.TableName)), Is.EqualTo(200)); Assert.That(DataMigrationHelper.AddBooks(200, DbAccess), Is.Not.Empty.And.Unique); Assert.That(() => DbAccess.Database.Run(s => s.GetSkalar("SELECT COUNT(1) FROM " + BookMeta.TableName)), Is.EqualTo(400)); }