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 void FeedEntities(IEnumerable <Entity> entities) { var intermediate = new IntermediateSDS(); intermediate.entities = new EntityPool(entities, ctx); intermediate.ic = InconsistencyCoverage.NewCommon(); intermediate.inputConsistent = true; intermediate.localChangeSet = new EntityChangeSet(); var root = new SDSStack.Entry( new SDS(0, intermediate.entities.ToArray(), intermediate.ic), intermediate ); Assert.IsTrue(root.IsFullyConsistent); stack = Simulation.Stack; stack.ResetToRoot(root); messages = new MessageHistory(0, new MessagePack[] { MessagePack.CompleteBlank }); }