public void run_with_no_query() { var runner = new GridRunner <Foo, FooGrid, FooSource>(new FooGrid(), new FooSource()); var dicts = runner.Run(); dicts.Select(x => x["name"]).ShouldHaveTheSameElementsAs("Scooby", "Shaggy", "Velma"); }
public void run_with_no_query() { var runner = new GridRunner <Foo, FooGrid, FooSource>(new FooGrid(), new FooSource(), new ProjectionRunner <Foo>(new ProjectionRunner(new InMemoryServiceLocator())), new StubFieldAccessService()); var result = runner.Run()["data"]; var dicts = result.As <IDictionary <string, object>[]>(); dicts.Select(x => x["name"]).ShouldHaveTheSameElementsAs("Scooby", "Shaggy", "Velma"); }
public void run_with_query() { var runner = new GridRunner <Foo, FooGrid, FancyFooSource, FooQuery>(new FooGrid(), new FancyFooSource()); var dicts = runner.Run(new FooQuery { Letter = "S" }); dicts.Select(x => x["name"]).ShouldHaveTheSameElementsAs("Scooby", "Shaggy"); }
void makeRandomRunners() { for (int i = 0; i < runnerCount; i++) { GridRunner runner = (GridRunner)Instantiate(baseRunner, baseRunner.transform.position, Quaternion.identity); runner.transform.parent = baseRunner.transform.parent; runner.transform.localScale = baseRunner.transform.localScale; runner.randomize(); runners.Add(runner); } }
void Start() { runnerScript = GetComponent <GridRunner>(); }