public static IntermediateSDS RandomIntermediate(EntityChange.ExecutionContext ctx) { IntermediateSDS rs = new IntermediateSDS(); rs.entities = EntityPoolTests.RandomPool(random.Next(16), ctx); rs.ic = BitCubeTests.RandomIC(); rs.inputConsistent = random.NextBool(); rs.localChangeSet = EntityChangeSetTests.RandomSet(ctx.Ranges); return(rs); }
public static EntityPool RandomPool(int numEntities, EntityChange.ExecutionContext ctx) { var rs = new EntityPool(ctx); var entities = CreateEntities(ctx.LocalSpace, numEntities); foreach (var e in entities) { Assert.IsTrue(rs.Insert(e)); } return(rs); }