コード例 #1
0
        public void AddErrorWithExceptionIncreasesCount()
        {
            var log = new LoggingValidationLog();

            log.AddError(new Exception("Test"));
            Assert.AreEqual(1, log.NumberOfErrors);
        }
コード例 #2
0
        public void ResetSetsCountsToZero()
        {
            var log = new LoggingValidationLog();

            log.AddError("Test");
            log.AddWarning("Test");
            log.Reset();
            Assert.AreEqual(0, log.NumberOfErrors);
            Assert.AreEqual(0, log.NumberOfWarnings);
        }