Пример #1
0
        public void SetUp()
        {
            controller = new BuilderProjectsPanelController();

            sectionsController   = Substitute.For <ISectionsController>();
            scenesViewController = Substitute.For <IScenesViewController>();
            landsController      = Substitute.For <ILandController>();

            ITheGraph theGraph = Substitute.For <ITheGraph>();

            theGraph.Query(Arg.Any <string>(), Arg.Any <string>()).Returns(new Promise <string>());
            theGraph.Query(Arg.Any <string>(), Arg.Any <string>(), Arg.Any <QueryVariablesBase>()).Returns(new Promise <string>());
            theGraph.QueryLands(Arg.Any <string>(), Arg.Any <string>(), Arg.Any <float>()).Returns(new Promise <List <Land> >());

            ICatalyst catalyst = Substitute.For <ICatalyst>();

            catalyst.contentUrl.Returns(string.Empty);
            catalyst.Get(Arg.Any <string>()).Returns(new Promise <string>());
            catalyst.GetEntities(Arg.Any <string>(), Arg.Any <string[]>()).Returns(new Promise <string>());
            catalyst.GetDeployedScenes(Arg.Any <string[]>()).Returns(new Promise <CatalystSceneEntityPayload[]>());

            controller.Initialize(sectionsController, scenesViewController,
                                  landsController, theGraph, catalyst);
        }