Exemplo n.º 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);
        }
Exemplo n.º 2
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);
        }