buildReadMessageRequest() private method

private buildReadMessageRequest ( Addressee addressee ) : OracleQuery
addressee gov.va.medora.mdo.domain.sm.Addressee
return OracleQuery
 public void testBuildReadMessageSqlStatementWithDate()
 {
     AddresseeDao dao = new AddresseeDao(_cxn);
     OracleQuery query = dao.buildReadMessageRequest(new domain.sm.Addressee() { ReadDate = DateTime.Now });
     Assert.IsTrue(String.Equals(query.Command.CommandText, "UPDATE SMS.ADDRESSEE SET READ_DATE=:readDate, OPLOCK=:oplockPlusOne, MODIFIED_DATE=:modifiedDate WHERE ADDRESSEE_ID=:addresseeId AND OPLOCK=:oplock RETURNING SECURE_MESSAGE_ID INTO :outId"));
     Assert.IsTrue(((Oracle.DataAccess.Types.OracleDate)query.Command.Parameters["readDate"].Value).Year > 1900, "The read date should be set");
 }
Example #2
0
        public void testBuildReadMessageSqlStatementWithDate()
        {
            AddresseeDao dao   = new AddresseeDao(_cxn);
            OracleQuery  query = dao.buildReadMessageRequest(new domain.sm.Addressee()
            {
                ReadDate = DateTime.Now
            });

            Assert.IsTrue(String.Equals(query.Command.CommandText, "UPDATE SMS.ADDRESSEE SET READ_DATE=:readDate, OPLOCK=:oplockPlusOne, MODIFIED_DATE=:modifiedDate WHERE ADDRESSEE_ID=:addresseeId AND OPLOCK=:oplock RETURNING SECURE_MESSAGE_ID INTO :outId"));
            Assert.IsTrue(((Oracle.DataAccess.Types.OracleDate)query.Command.Parameters["readDate"].Value).Year > 1900, "The read date should be set");
        }