public void SetUp() { node1to1 = new NCoverNode(1, 0, 1, 1, "doc1", 0, false, "m", 0, "k", new Regex(".*")); node1to5 = new NCoverNode(1, 0, 5, 1, "doc1", 0, false, "m", 0, "k", new Regex(".*")); node5to10 = new NCoverNode(5, 0, 10, 1, "doc1", 0, false, "m", 0, "k", new Regex(".*")); node6to10 = new NCoverNode(6, 0, 10, 1, "doc1", 0, false, "m", 0, "k", new Regex(".*")); }
public void SetUp() { _node1To1 = new NCoverNode(1, 0, 1, 1, "doc1", 0, false, "m", 0, "k", new Regex(".*")); _node2To2 = new NCoverNode(2, 0, 2, 1, "doc1", 0, false, "m", 0, "k", new Regex(".*")); _node4To4 = new NCoverNode(4, 0, 4, 1, "doc1", 0, false, "m", 0, "k", new Regex(".*")); _node5To5 = new NCoverNode(5, 0, 5, 1, "doc1", 0, false, "m", 0, "k", new Regex(".*")); _resultsNone = new NCoverResults(new NCoverNode[] {}); _resultsAll = new NCoverResults(new[] {_node1To1, _node2To2, _node4To4, _node5To5}); _results1To1N4To4 = new NCoverResults(new[] {_node1To1, _node4To4}); }
public void SetUp() { _uncovered1 = new NCoverNode(1, 0, 1, 1, "doc", 0, false, "m", 0, "k", new Regex(".*")); _uncovered2 = new NCoverNode(2, 0, 2, 1, "doc", 0, false, "m", 0, "k", new Regex(".*")); _uncovered3 = new NCoverNode(3, 0, 3, 1, "doc", 0, false, "m", 0, "k", new Regex(".*")); _uncovered4 = new NCoverNode(4, 0, 4, 1, "doc", 0, false, "m", 0, "k", new Regex(".*")); _uncovered5 = new NCoverNode(5, 0, 5, 1, "doc", 0, false, "m", 0, "k", new Regex(".*")); _covered1 = new NCoverNode(1, 0, 1, 1, "doc", 1, false, "m", 0, "k", new Regex(".*")); _covered2 = new NCoverNode(2, 0, 2, 1, "doc", 1, false, "m", 0, "k", new Regex(".*")); _covered3 = new NCoverNode(3, 0, 3, 1, "doc", 1, false, "m", 0, "k", new Regex(".*")); _covered4 = new NCoverNode(4, 0, 4, 1, "doc", 1, false, "m", 0, "k", new Regex(".*")); _covered5 = new NCoverNode(5, 0, 5, 1, "doc", 1, false, "m", 0, "k", new Regex(".*")); _results100Percent = new NCoverResults(new[] {_covered1, _covered2, _covered3}); _results66Percent = new NCoverResults(new[] {_uncovered1, _covered2, _covered3}); _results33Percent = new NCoverResults(new[] {_covered1, _uncovered2, _uncovered3}); _results50PercentOf4Lines = new NCoverResults(new[] {_uncovered1, _uncovered2, _covered3, _covered4}); _results50PercentOf2Lines = new NCoverResults(new[] {_uncovered1, _covered2}); }
public void Should_Consolidate_Multiple_References_To_The_Same_codepoint_from_multiple_files() { var c1 = new NCoverNode(1, 0, 1, 1, "doc", 0, false, "m", 0, "k", new Regex(".*")); var c2 = new NCoverNode(1, 0, 1, 1, "doc", 1, false, "m", 0, "k", new Regex(".*")); Threshold threshold = new Threshold( new NCoverResults(new INCoverNode[] {c1, c2}), new NCoverResults(new INCoverNode[] {c2}), 0.0); Assert.AreEqual( "NCoverCopTask: PASSED: -- There is no newly uncovered code. \r\n\tSequence Points Summary: 1 not excluded, 1 hit\r\n\tPercentage Summary: 100.00% [Minimum Required: 100.00%]\r\n", threshold.Message); }
public void Document_IsTruncatedByMatchingRegEx() { var node = new NCoverNode(1, 2, 3, 4, @"C:/Manticore_Debug/trunk/SomeFile.cs", 1, false, "m", 0, "k2", new Regex("trunk.*")); Assert.AreEqual(@"trunk/SomeFile.cs", node.Document); }