Exemplo n.º 1
0
        public void AddErrorLogTest_good_id()
        {
            var toAdd = new ErrorLog();
            var logs  = new Log
            {
                LogId       = 10005,
                LogPriority = 1
            };

            toAdd.Log   = logs;
            toAdd.logId = 10005;
            toAdd.msg   = "test AddErrorLogTest_good_id()";
            _logDataControler.AddErrorLog(toAdd);

            Assert.AreEqual(_logsOnlyForTest.GetErrorLogById(10005).logId, 10005);
            _logsOnlyForTest.DeleteErrorLog(10005);
            _logsOnlyForTest.DeleteLog(10005);
        }
Exemplo n.º 2
0
        public void AddErrorLogTest_good_message_match()
        {
            var error = new ErrorLog("AddErrorLogTest_good_message_match");

            _logDataProxy.AddErrorLog(error);
            var logId = error.LogId;

            Assert.AreEqual(_logsOnlyForTest.GetErrorLogById(logId).msg, "AddErrorLogTest_good_message_match");
            _logsOnlyForTest.DeleteErrorLog(logId);
            _logsOnlyForTest.DeleteLog(logId);
        }