Beispiel #1
0
        public void CountRestultRulesByType_OnExecute_ReturnsNumberOfResultsWithType()
        {
            var analyzeResult = new AnalyzeResult();

            analyzeResult.AddResultRule("code", "type1");
            analyzeResult.AddResultRule("code", "type1");
            analyzeResult.AddResultRule("code", "type2");
            analyzeResult.AddResultRule("code", "type2");
            analyzeResult.AddResultRule("code", "type2");

            var type1Counter = analyzeResult.CountRestultRulesByType("type1");
            var type2Counter = analyzeResult.CountRestultRulesByType("type2");
            var type3Counter = analyzeResult.CountRestultRulesByType("type3");

            Assert.AreEqual(2, type1Counter);
            Assert.AreEqual(3, type2Counter);
            Assert.AreEqual(0, type3Counter);
        }
Beispiel #2
0
        public void CountRestultRulesByType_OnExecuteWithNull_ThrowsException()
        {
            var analyzeResult = new AnalyzeResult();

            analyzeResult.CountRestultRulesByType(null);
        }