@Test public void deserialize() throws IOException { CI o = CIUtils.loadFromDefaultLocation(); Assert.assertNotNull(o); Assert.assertEquals(3, o.getClassifiers().size(),0); String[] mls = new String[]{ "ForumActivityMetric", "ForumTemporalMetric", "ItsActivityMetric", "ItsIssuesResolvedMetric", "ItsTemporalMetric", "MailingListActivityMetric", "MailingListTemporalMetric", "ScmActivityMetric", "ScmApiIntroducedMetric", "ScmApiUsageCountMetric", "ScmTemporalMetric" }; Iterator<CI.Classifier> iterator = o.getClassifiers().iterator(); CI.Classifier cd = iterator.next(); Assert.assertEquals("core developers", cd.getName()); Assert.assertEquals(1.0, cd.getPrior(),0.0); Assert.assertEquals(11,cd.getMetrics().size(),0); assertNames(mls,cd.getMetrics().iterator()); Assert.assertEquals(0.1234,cd.getMetrics().get(6).getStandardDeviation(),0.0); Assert.assertEquals(0.0002,cd.getMetrics().get(6).getMean(),0.0); CI.Classifier tr = iterator.next(); Assert.assertEquals("testers", tr.getName()); Assert.assertEquals(2.0, tr.getPrior(),0.0); Assert.assertEquals(11,tr.getMetrics().size(),0); assertNames(mls,tr.getMetrics().iterator()); Assert.assertEquals(0.5683,tr.getMetrics().get(4).getStandardDeviation(),0.0); Assert.assertEquals(0.0004,tr.getMetrics().get(4).getMean(),0.0); CI.Classifier bt = iterator.next(); Assert.assertEquals("bug triagers", bt.getName()); Assert.assertEquals(3.0, bt.getPrior(),0.0); Assert.assertEquals(11,bt.getMetrics().size(),0); assertNames(mls,bt.getMetrics().iterator()); Assert.assertEquals(0.0005895,bt.getMetrics().get(10).getStandardDeviation(),0.0); Assert.assertEquals(0.2547890,bt.getMetrics().get(10).getMean(),0.0); }
public List<Classifier> getClassifiers() { return classifiers; }
CI { public List<Classifier> getClassifiers() { return classifiers; } }
CI { public List<Classifier> getClassifiers() { return classifiers; }  }
CI { public List<Classifier> getClassifiers() { return classifiers; }  List<Classifier> getClassifiers(); void setClassifiers(List<Classifier> classifiers); }
CI { public List<Classifier> getClassifiers() { return classifiers; }  List<Classifier> getClassifiers(); void setClassifiers(List<Classifier> classifiers);  }