public void MsmqAccessDenied() { MsmqReceiverTestWrapper testSync = new MsmqReceiverTestWrapper(logWriter, CommonUtil.MessageQueuePath, eventLogger); testSync.LogMsgQueueException(MessageQueueErrorCode.AccessDenied); string expected = string.Format(Resources.MsmqAccessDenied, CommonUtil.MessageQueuePath, WindowsIdentity.GetCurrent().Name); string actual = CommonUtil.GetLastEventLogEntry(); Assert.IsTrue(actual.IndexOf(expected) > -1); }
public void MsmqAccessDenied() { MsmqReceiverTestWrapper testSync = new MsmqReceiverTestWrapper(logWriter, CommonUtil.MessageQueuePath, eventLogger); testSync.LogMsgQueueException(MessageQueueErrorCode.AccessDenied); string expected = string.Format(Resources.MsmqAccessDenied, CommonUtil.MessageQueuePath, WindowsIdentity.GetCurrent().Name); string actual = CommonUtil.GetLastEventLogEntry(); Assert.IsTrue(actual.IndexOf(expected) > -1); }
public void MSMQInvalidTransactionUsage() { MsmqReceiverTestWrapper testSync = new MsmqReceiverTestWrapper(Context); testSync.LogMsgQueueException(MessageQueueErrorCode.TransactionUsage); string expected = SR.MsmqInvalidTransactionUsage(CommonUtil.MessageQueuePath); //assert warning is written to event log Assert.IsTrue(CommonUtil.GetLastEventLogEntry().IndexOf(expected) > -1); }
public void MSMQInvalidTransactionUsage() { MsmqReceiverTestWrapper testSync = new MsmqReceiverTestWrapper(Context); testSync.LogMsgQueueException(MessageQueueErrorCode.TransactionUsage); string expected = SR.MsmqInvalidTransactionUsage(CommonUtil.MessageQueuePath); //assert warning is written to event log Assert.IsTrue(CommonUtil.GetLastEventLogEntry().IndexOf(expected) > -1); }
public void MsmqRecieveTimeout() { MsmqReceiverTestWrapper testSync = new MsmqReceiverTestWrapper(Context); testSync.LogMsgQueueException(MessageQueueErrorCode.IOTimeout); string expected = SR.MsmqReceiveTimeout(CommonUtil.MessageQueuePath); //assert warning is written to event log string actual = CommonUtil.GetLastEventLogEntry(); Assert.IsTrue(actual.IndexOf(expected) > -1); }
public void MsmqRecieveTimeout() { MsmqReceiverTestWrapper testSync = new MsmqReceiverTestWrapper(Context); testSync.LogMsgQueueException(MessageQueueErrorCode.IOTimeout); string expected = SR.MsmqReceiveTimeout(CommonUtil.MessageQueuePath); //assert warning is written to event log string actual = CommonUtil.GetLastEventLogEntry(); Assert.IsTrue(actual.IndexOf(expected) > -1); }