public void Effort_NetworkLog_GetByPrimaryKey_Test() { long _id = _incidentLogId; NetworkLogData _row = _sut.GetByPrimaryKey(_id); Assert.IsNotNull(_row); Assert.AreEqual(_row.NetworkLogId, _id); System.Diagnostics.Debug.WriteLine(_row.ToString()); }
public void WebSrv_NI_NetworkLog_GetByPrimaryKey_Test() { long _id = 39; NetworkLogAccess _sut = new NetworkLogAccess(_niEntities); NetworkLogData _row = _sut.GetByPrimaryKey(_id); Assert.IsNotNull(_row); Assert.AreEqual(_row.NetworkLogId, _id); System.Diagnostics.Debug.WriteLine(_row.ToString()); }
public void Effort_NetworkLog_Update_Test() { // only IncidentId long _id = _incidentLogId; int _incidentId = 3; NetworkLogData _row = _sut.GetByPrimaryKey(_id); _row.IncidentId = _incidentId; int _rowCnt = _sut.UpdateIncidentIdSave(_row); Assert.AreEqual(_rowCnt, 1); NetworkLogData _new = _sut.GetByPrimaryKey(_id); Console.WriteLine(_new.ToString()); Assert.AreEqual(_row.IncidentId, _new.IncidentId); Assert.AreEqual(_row.IPAddress, _new.IPAddress); Assert.AreEqual(_row.NetworkLogDate, _new.NetworkLogDate); Assert.AreEqual(_row.Log, _new.Log); Assert.AreEqual(_row.IncidentTypeId, _new.IncidentTypeId); }