示例#1
0
        /// <summary>
        /// InMemory!
        /// </summary>
        /// <returns></returns>
        public static ITableSnapshotBuilder EmptySnapshot()
        {
            TableSnapshotBuilder b = new TableSnapshotBuilder();

            b.TableSnapshotDelegate = () =>
            {
                SqliteDatabaseProvider prov = SqliteDatabaseProvider.CreateInMemoryDatabase();
                RepositoryListSnapshotBuilder.CreateTable(prov);
                SqliteTableSnapshot ts = new SqliteTableSnapshot(prov, RepositoryTableSnapshot.TableName, RepositoryTableSnapshot.PrimaryKey);
                return(ts);
            };
            return(b);
        }
        public static ITableSnapshotBuilder CreateInMemorySnapshotFromRequest(IEnumerable <string> jsonResponses)
        {
            Guard.ArgumentNotNull(jsonResponses, nameof(jsonResponses));
            TableSnapshotBuilder b = new TableSnapshotBuilder();

            b.TableSnapshotDelegate = () =>
            {
                SqliteDatabaseProvider prov = SqliteDatabaseProvider.CreateInMemoryDatabase();
                Fill(prov, jsonResponses);
                SqliteTableSnapshot ts = new SqliteTableSnapshot(prov, EventTableSnapshot.TableName, EventTableSnapshot.PrimaryKey);
                return(ts);
            };
            return(b);
        }
 public RepositoryListDifferTest()
 {
     this.DatabaseProvider = SqliteDatabaseProvider.CreateInMemoryDatabase();
 }