public void Effort_IncidentNote_GetByPrimaryKey_Test()
        {
            long             _id  = _incidentNoteId;
            IncidentNoteData _row = _sut.GetByPrimaryKey(_id);

            Assert.IsNotNull(_row);
            Assert.AreEqual(_row.IncidentNoteId, _id);
            System.Diagnostics.Debug.WriteLine(_row.ToString());
        }
        public void WebSrv_NI_IncidentNote_GetByPrimaryKey_Test()
        {
            long _id = 2;
            IncidentNoteAccess _sut = new IncidentNoteAccess(_niEntities);
            IncidentNoteData   _row = _sut.GetByPrimaryKey(_id);

            Assert.IsNotNull(_row);
            Assert.AreEqual(_row.IncidentNoteId, _id);
            System.Diagnostics.Debug.WriteLine(_row.ToString());
        }
        public void Effort_IncidentNote_Delete_Test()
        {
            long _id        = _incidentNoteId;
            int  _actualCnt = _sut.DeleteSave(_id);

            Assert.AreEqual(1, _actualCnt);
            IncidentNoteData _row = _sut.GetByPrimaryKey(_id);

            Assert.IsNull(_row);
        }
        public void Effort_IncidentNote_Update_Test()
        {
            long             _id       = _incidentNoteId;
            string           _newValue = "123456789 123456789";
            IncidentNoteData _row      = _sut.GetByPrimaryKey(_id);

            _row.Note = _newValue;
            int _rowCnt = _sut.UpdateSave(_row);

            Assert.AreEqual(_rowCnt, 1);
            IncidentNoteData _new = _sut.GetByPrimaryKey(_id);

            System.Diagnostics.Debug.WriteLine(_new.ToString());
            Assert.AreEqual(_row.NoteTypeId, _new.NoteTypeId);
            Assert.AreEqual(_row.Note, _new.Note);
        }
        public void Effort_IncidentNote_Insert_Test()
        {
            DateTime _ndt  = new DateTime(2016, 4, 21, 12, 12, 12);
            var      _data = new IncidentNoteData()
            {
                IncidentNoteId    = 0,
                NoteTypeId        = 1,
                NoteTypeShortDesc = "Ping",
                Note        = "Ping",
                CreatedDate = _ndt
            };
            IncidentNote _row = _sut.Insert(_data);

            Assert.IsNotNull(_row);
            _niEntities.SaveChanges();
            System.Diagnostics.Debug.WriteLine(_row.IncidentNoteId.ToString());
            Assert.IsTrue(_row.IncidentNoteId > 2);
        }
        public void Effort_IncidentNote_InsertSave_Test()
        {
            int      _before = _niEntities.IncidentNotes.Count();
            DateTime _ndt    = new DateTime(2016, 4, 21, 12, 12, 12);
            var      _data   = new IncidentNoteData()
            {
                IncidentNoteId    = 0,
                NoteTypeId        = 1,
                NoteTypeShortDesc = "Ping",
                Note        = "Ping",
                CreatedDate = _ndt
            };
            int _rowCnt = _sut.InsertSave(_data);

            Assert.AreEqual(_rowCnt, 1);
            int _after = _niEntities.IncidentNotes.Count();

            Assert.AreEqual(_before + 1, _after);
        }