示例#1
0
        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);
        }
示例#2
0
        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);
        }