Пример #1
0
        public override void SetUp()
        {
            base.SetUp();

            myDataAccess = myMockery.NewMock<IDatabaseSC>();

            myServiceProvider = Engine.ServiceProvider;
            myServiceProvider.RegisterService( "TOM Database", myDataAccess );
            myServiceProvider.RegisterService( typeof( IEntityRepositoryFactory ), new FakeEntityRepositoryFactory() );

            myServiceProvider.ConfigurationSC().Import( Path.Combine( MauiHome, "config" ), true );

            ScriptingInterface tomScripting = new ScriptingInterface();
            tomScripting.Init( myServiceProvider );
            myServiceProvider.RegisterService( typeof( ScriptingInterface ), tomScripting );

            myInterpreter = new Interpreter();
            myInterpreter.Init( myServiceProvider );
            //myInterpreter.DumpErrorToConsole = true;
            myInterpreter.Start();
        }
Пример #2
0
        public override void SetUp()
        {
            base.SetUp();

            myDataAccess = myMockery.NewMock <IDatabaseSC>();

            myServiceProvider = Engine.ServiceProvider;
            myServiceProvider.RegisterService("TOM Database", myDataAccess);
            myServiceProvider.RegisterService(typeof(IEntityRepositoryFactory), new FakeEntityRepositoryFactory());

            myServiceProvider.ConfigurationSC().Import(Path.Combine(MauiHome, "config"), true);

            ScriptingInterface tomScripting = new ScriptingInterface();

            tomScripting.Init(myServiceProvider);
            myServiceProvider.RegisterService(typeof(ScriptingInterface), tomScripting);

            myInterpreter = new Interpreter();
            myInterpreter.Init(myServiceProvider);
            //myInterpreter.DumpErrorToConsole = true;
            myInterpreter.Start();
        }