Ejemplo n.º 1
0
        public void Calculates_lack_of_cohesion()
        {
            CodeModelFactory factory = new CodeModelFactory();

            List <CaDETClass> classes = factory.CreateProject(_testDataFactory.GetCohesionClasses()).Classes;

            var dateRange = classes.Find(c => c.Name.Equals("DateRange"));
            var doctor    = classes.Find(c => c.Name.Equals("Doctor"));

            dateRange.Metrics[CaDETMetric.LCOM].ShouldBe(0);
            doctor.Metrics[CaDETMetric.LCOM].ShouldBe(0.75);
        }