Exemple #1
0
        public void single_node_nodein_graph_that_is_not_a_test()
        {
            var graph = new AffectedGraph();

            graph.AddNode(new AffectedGraphNode(displayName: "display",
                                                isInterface: false,
                                                isTest: false,
                                                isRootNode: true,
                                                name: "A name",
                                                fullName: "name",
                                                assembly: "foo.dll",
                                                type: "Type",
                                                testDescriptors: new List <TestDescriptor>(),
                                                isChange: false,
                                                inTestAssembly: false,
                                                complexity: 0));
            var classifier = new CoverageDistanceAndComplexityGraphRiskClassifier();

            Assert.AreEqual(0, classifier.CalculateRiskFor(graph));
        }
Exemple #2
0
        public void null_graph_returns_zero()
        {
            var classifier = new CoverageDistanceAndComplexityGraphRiskClassifier();

            Assert.AreEqual(0, classifier.CalculateRiskFor(null));
        }