Beispiel #1
0
        public void DeleteTest()
        {
            HotController hotController;

            // 测试用例1
            hotController = new HotController();
            hotController.Delete((Dictionary <string, object>)null);
            Assert.IsNotNull((object)hotController);
            Assert.IsNull((object)(hotController.FeedbackEvent));
            Assert.IsNull((object)(hotController.AuditEvent));
            Assert.IsNull((object)(hotController.GetDetailsEvent));
            Assert.AreEqual <string>("127.0.0.1", ((BaseService)hotController).Server);
            Assert.AreEqual <int>(8080, ((BaseService)hotController).Port);

            // 测试用例2
            Dictionary <string, object> dictionary;

            hotController  = new HotController();
            dictionary     = new Dictionary <string, object>(0);
            dictionary[""] = (object)null;
            hotController.Delete(dictionary);
            Assert.IsNotNull((object)hotController);
            Assert.IsNull((object)(hotController.FeedbackEvent));
            Assert.IsNull((object)(hotController.AuditEvent));
            Assert.IsNull((object)(hotController.GetDetailsEvent));
            Assert.AreEqual <string>("127.0.0.1", ((BaseService)hotController).Server);
            Assert.AreEqual <int>(8080, ((BaseService)hotController).Port);
        }
Beispiel #2
0
        public FormHotManage()
        {
            InitializeComponent();

            this.m_HotController              = new HotController();
            this.m_HotController.QueryEvent  += new EventHandler <ServiceEventArgs>(m_HotController_QueryEvent);
            this.m_HotController.DeleteEvent += new EventHandler <ServiceEventArgs>(m_HotController_DeleteEvent);
        }
Beispiel #3
0
        public void EditTest()
        {
            HotController hotController;

            // 测试用例1
            hotController = new HotController();
            hotController.Edit((Fire_Hot)null);
            Assert.IsNotNull((object)hotController);
            Assert.IsNull((object)(hotController.FeedbackEvent));
            Assert.IsNull((object)(hotController.AuditEvent));
            Assert.IsNull((object)(hotController.GetDetailsEvent));
            Assert.AreEqual <string>("127.0.0.1", ((BaseService)hotController).Server);
            Assert.AreEqual <int>(8080, ((BaseService)hotController).Port);

            // 测试用例2
            hotController = new HotController();
            Fire_Hot s0 = new Fire_Hot();

            s0.OBJECTID      = 0;
            s0.shape         = (string)null;
            s0.no            = (string)null;
            s0.satellite     = (string)null;
            s0.longitude     = 0;
            s0.latitude      = 0;
            s0.pixels        = 0;
            s0.smoke         = 0;
            s0.continuous    = 0;
            s0.landtype      = (string)null;
            s0.county        = (string)null;
            s0.type          = 0;
            s0.receiptt      = (string)null;
            s0.note          = (string)null;
            s0.reporter      = (string)null;
            s0.reporttime    = (string)null;
            s0.opinion       = (string)null;
            s0.duty          = (string)null;
            s0.cre_time      = (string)null;
            s0.cre_pers      = (string)null;
            s0.mod_time      = (string)null;
            s0.mod_pers      = (string)null;
            s0.source        = (string)null;
            s0.id            = (string)null;
            s0.pac           = (string)null;
            s0.status        = 0;
            s0.hotFeedback   = (HotFeedback)null;
            s0.mediaByteDict = (Dictionary <string, object>)null;
            s0.mediaFiles    = (List <MediaFile>)null;
            hotController.Edit(s0);
            Assert.IsNotNull((object)hotController);
            Assert.IsNull((object)(hotController.FeedbackEvent));
            Assert.IsNull((object)(hotController.AuditEvent));
            Assert.IsNull((object)(hotController.GetDetailsEvent));
            Assert.AreEqual <string>("127.0.0.1", ((BaseService)hotController).Server);
            Assert.AreEqual <int>(8080, ((BaseService)hotController).Port);
        }
Beispiel #4
0
        public void DeleteTest1()
        {
            HotController hotController;

            hotController = new HotController();
            hotController.Delete((string)null);
            Assert.IsNotNull((object)hotController);
            Assert.IsNull((object)(hotController.FeedbackEvent));
            Assert.IsNull((object)(hotController.AuditEvent));
            Assert.IsNull((object)(hotController.GetDetailsEvent));
            Assert.AreEqual <string>("127.0.0.1", ((BaseService)hotController).Server);
            Assert.AreEqual <int>(8080, ((BaseService)hotController).Port);
        }
Beispiel #5
0
        public FormHot(OperationType type, Fire_Hot hot = null)
        {
            InitializeComponent();
            this.m_OperationType = type;
            this.currentHot      = hot;

            this.m_AreaCodeController             = new AreaCodeController();
            this.m_AreaCodeController.QueryEvent += m_AreaCodeController_QueryEvent;

            this.m_HotController            = new HotController();
            this.m_HotController.AddEvent  += m_HotController_AddEvent;
            this.m_HotController.EditEvent += m_HotController_EditEvent;
        }
        public FormHotDetails(Fire_Hot hot, HotOperate hotOperate)
        {
            InitializeComponent();

            this.currentHot = hot;
            this.hotOperate = hotOperate;

            this.hotControler = new HotController();
            this.hotControler.GetDetailsEvent += new EventHandler <ServiceEventArgs>(HotControler_GetDetailsEvent);
            this.hotControler.AuditEvent      += new EventHandler <ServiceEventArgs>(HotControler_AuditEvent);
            this.hotControler.FeedbackEvent   += new EventHandler <ServiceEventArgs>(HotControler_FeedbackEvent);

            this.m_AreaCodeController             = new AreaCodeController();
            this.m_AreaCodeController.QueryEvent += m_AreaCodeController_QueryEvent;
        }