Exemplo n.º 1
0
        public void ToParamStringGeneratesDefault()
        {
            var threshold = new CoverageThreshold();
            var expected  = "SymbolCoverage:0";
            var actual    = threshold.ToParamString();

            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 2
0
        public void ToParamStringGeneratesWithValue()
        {
            var threshold = new CoverageThreshold
            {
                Metric   = CoverageThreshold.NCoverMetric.BranchCoverage,
                MinValue = 95
            };
            var expected = "BranchCoverage:95";
            var actual   = threshold.ToParamString();

            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 3
0
        public void ToParamStringGeneratesWithPattern()
        {
            var threshold = new CoverageThreshold
            {
                Metric   = CoverageThreshold.NCoverMetric.CyclomaticComplexity,
                MinValue = 95,
                ItemType = CoverageThreshold.NCoverItemType.Class,
                Pattern  = "Test"
            };
            var expected = "CyclomaticComplexity:95:Class:Test";
            var actual   = threshold.ToParamString();

            Assert.AreEqual(expected, actual);
        }