public void DeleteESightTest() { bool isSccu = _esSession.SaveToDB(); Assert.IsTrue(isSccu); isSccu = _esSession.DeleteESight(); Assert.IsTrue(isSccu); }
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(); }