private buildReadMessageRequest ( |
||
addressee | ||
Résultat | 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"); }
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"); }