Exemplo n.º 1
0
        public void SetUp()
        {
            this.mocks = new MockRepository();


            this.LocalDataModel      = mocks.Stub <LocalDataFileService>();
            this.LocalDataQuery      = mocks.Stub <LocalDataQueryRepository>();
            this.dataModel           = mocks.Stub <SQLDataServiceModel>();
            dataModel.sqlService     = mocks.Stub <ISQLWebService>(mocks.Stub <InstanceContext>());
            dataModel.EncryptionSeed = "1234";
            this.queryHouse          = mocks.Stub <SQLDataQueryRepository>();


            this.Loger          = mocks.Stub <LogController>();
            Loger.DB            = dataModel;
            Loger.SQLQueryHouse = queryHouse;

            object[]           paramList           = { this.dataModel, this.LocalDataModel, this.queryHouse, this.LocalDataQuery };
            WorkInfoController workInfoCMDListener = mocks.Stub <WorkInfoController>(paramList);

            this.workInfoSelectCMD = mocks.Stub <WorkInfoSelectCommand>(workInfoCMDListener);

            this.cmdManager          = CMDManager.getInstance(this.Loger, this.workInfoSelectCMD);
            this.cmdManager.userInfo = mocks.Stub <UserInfo>();
        }
Exemplo n.º 2
0
 public static CMDManager getManager()
 {
     if (manager == null)
     {
         manager = new CMDManagerImpl();
     }
     return(manager);
 }
Exemplo n.º 3
0
        public static void test()
        {
            CMDManager manager = CMDManagerFactory.getManager();
            CMD        cmd     = manager.getCMDList()[0];

            Console.WriteLine(cmd.ToString());
            manager.execCMD(cmd);

            List <CMD> result = manager.findCmds("my");

            Console.WriteLine("search result:" + result.ToString());
        }