Ejemplo n.º 1
0
        public void DeleteESightTest()
        {
            bool isSccu = _esSession.SaveToDB();

            Assert.IsTrue(isSccu);
            isSccu = _esSession.DeleteESight();
            Assert.IsTrue(isSccu);
        }
Ejemplo n.º 2
0
 public void SaveToDBTest()
 {
     using (ESSession esSession = new ESSession())
     {
         esSession.SetHttpMode(true);
         esSession.InitESight(_hwESightHost, ConstMgr.HWESightHost.DEFAULT_TIMEOUT_SEC);
         bool isSccu = esSession.SaveToDB();
         Assert.IsTrue(isSccu);
         Assert.IsTrue(esSession.HWESightHost.ID > 0);
     }
 }
Ejemplo n.º 3
0
        public void DisposeESightTest()
        {
            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);
            esSession.Open();
            bool isSccu = esSession.SaveToDB();

            Assert.IsTrue(isSccu);

            esSession.HClient = null;
            //esSession.HWESightHost.HostIP = "xxx.xxx.xxx";

            esSession.Dispose();
        }
Ejemplo n.º 4
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();
        }