public void GetCampaignById()
        {
            GetCampaignByIdProcessor processor   = new GetCampaignByIdProcessor();
            FakedBusinessTransaction transaction = new FakedBusinessTransaction();

            transaction.Request = new GetCampaignByIdRequestMessage {
                CampaignId = 15415, AccountId = 5709, UserId = 4696
            };
            processor.Process(transaction);

            GetCampaignByIdResponseMessage rsqMsg = (GetCampaignByIdResponseMessage)transaction.Response;
        }
Пример #2
0
        public void TestMethod1()
        {
            //注册processors
            SystemWorker.Instance.Initialize(ServiceRoles.ABS);
            //配置数据库连接字符串
            Global.DbMySql =
                new Database(SystemWorker.Instance.ConfigurationProxy.GetField(ServiceRoles.ABS, Global.MySql),
                             Global.CommandTimeOut);
            Global.DbMySqlReadOnly =
                new Database(SystemWorker.Instance.ConfigurationProxy.GetField(ServiceRoles.ABS, Global.MySqlReadOnly),
                             Global.CommandTimeOut);
            Global.DbMySqlAdConversions =
                new Database(
                    SystemWorker.Instance.ConfigurationProxy.GetField(ServiceRoles.ABS, Global.MySqlAdConversions),
                    Global.CommandTimeOut);
            Global.DbOaInfoExcutor =
                new Database(SystemWorker.Instance.ConfigurationProxy.GetField(ServiceRoles.ABS, Global.OaInfoExcutor),
                             Global.CommandTimeOut);

            BusinessMessageTransaction bs = new BusinessMessageTransaction {
            };

            bs.Request = new GetCampaignByIdRequestMessage {
                CampaignId = 12023, AccountId = 3659
            };
            GetCampaignByIdProcessor getAdGroupByIdProcessor = new GetCampaignByIdProcessor();

            try
            {
                getAdGroupByIdProcessor.Process(bs);
            }
            catch
            {
            }
            GetCampaignByIdResponseMessage rspMsg = (GetCampaignByIdResponseMessage)bs.Response;

            Assert.IsNotNull(rspMsg);
        }