RigidityCalculator { public double calcule(final int commits) { return (double) commits / totalCommits; } RigidityCalculator(final int totalCommits); int getTotalCommits(); double calcule(final int commits); double calcule(final int commitsFile1, final int commitsFile2);  }
@Test public void testCalculeOneFile() { RigidityCalculator calc = new RigidityCalculator(100); Assert.assertEquals(0.16, calc.calcule(16), 0.001); }
@Test public void testCalculePairFile() { RigidityCalculator calc = new RigidityCalculator(100); Assert.assertEquals(0.33, calc.calcule(16, 17), 0.001); }