Exemple #1
0
        public void DeleteESightTest()
        {
            bool isSccu = _esSession.SaveToDB();

            Assert.IsTrue(isSccu);
            isSccu = _esSession.DeleteESight();
            Assert.IsTrue(isSccu);
        }
Exemple #2
0
        public void DeleteESightTestZero()
        {
            ESSession    esSession    = new ESSession();
            HWESightHost hwESightHost = new HWESightHost();

            hwESightHost.HostIP       = "127.0.0.1";
            hwESightHost.HostPort     = 32102;
            hwESightHost.LoginAccount = "test";
            hwESightHost.LoginPwd     = "test";
            esSession = new ESSession();
            esSession.SetHttpMode(true);
            esSession.InitESight(hwESightHost, ConstMgr.HWESightHost.DEFAULT_TIMEOUT_SEC);

            bool isSccu = esSession.SaveToDB();

            Assert.IsTrue(isSccu);
            int oldId = esSession.HWESightHost.ID;

            esSession.HWESightHost.ID = 0;
            isSccu = esSession.DeleteESight();
            Assert.IsTrue(isSccu);
            esSession.HWESightHost.ID = oldId;
            esSession.DeleteESight();
        }