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");
        }
Пример #4
0
    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);
        }
    }
Пример #5
0
 void Start()
 {
     runnerScript = GetComponent <GridRunner>();
 }