コード例 #1
0
 public void Test_GetCategories()
 {
     var comparer = new QuintilesComparer();
     comparer.SetDataForCategories(DataList1To10());
     Assert.AreEqual(1, comparer.GetCategory(new CoreDataSet { Value = 1 }));
     Assert.AreEqual(5, comparer.GetCategory(new CoreDataSet { Value = 10 }));
 }
コード例 #2
0
 public void Test_Significance0WhenDataIsNull()
 {
     var comparer = new QuintilesComparer();
     comparer.SetDataForCategories(DataList1To10());
     Assert.AreEqual(0, comparer.GetCategory(null));
 }
コード例 #3
0
 public void Test_Category0IfNullValueList()
 {
     var comparer = new QuintilesComparer();
     comparer.SetDataForCategories(null);
     Assert.AreEqual(0, comparer.GetCategory(Data()));
 }
コード例 #4
0
 public void Test_Category0IfNoValues()
 {
     var comparer = new QuintilesComparer();
     comparer.SetDataForCategories(new List<double>());
     Assert.AreEqual(0, comparer.GetCategory(Data()));
 }
コード例 #5
0
 public void Test_Category0IfValueCountLessThan5()
 {
     var comparer = new QuintilesComparer();
     comparer.SetDataForCategories(new List<double> { 1, 2, 3, 4 });
     Assert.AreEqual(0, comparer.GetCategory(Data()));
 }
コード例 #6
0
 public void Test_Category0IfNoDataSet()
 {
     var comparer = new QuintilesComparer();
     Assert.AreEqual(0, comparer.GetCategory(Data()));
 }