import org.junit.Test;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;

/**
 * Created by bing on 6/6/17.
 */
public class DataGeneratorTest {
    @Test
    public void generateCentroidsTest() {
        double[][] c = DataGenerator.generateCentroids(5, 2, 10, 20);

        assertEquals(5, c.length);
        assertEquals(2, c[0].length);

        for (double[] d : c) {
            for (double e : d) {
                assertTrue(e<=20);
                assertTrue(e>=10);
            }
        }
    }
}

@@ -537,11 +537,600 @@
  %7D%0A    %7D
+%0A%0A    @Test(expected = EmptyDataSetException.class)%0A    public void generateDataTest1() throws EmptyDataSetException%7B%0A        DataGenerator.generateData(1,null,10);%0A%0A    %7D%0A%0A    @Test%0A    public void generateDataTest2() throws EmptyDataSetException %7B%0A        double%5B%5D%5B%5D data = DataGenerator.generateData(10,DataGenerator.generateCentroids(2),10);%0A%0A        assertEquals(10,data.length);%0A        assertEquals(2,data%5B0%5D.length);%0A%0A        for (double%5B%5D d: data) %7B%0A            for (double e:d) %7B%0A                assertTrue(e%3C=100);%0A                assertTrue(e%3E=0);%0A            %7D%0A        %7D%0A    %7D
 %0A%7D%0A

add generateData test method