-
Notifications
You must be signed in to change notification settings - Fork 0
/
GenerativeProjectTest.pde
53 lines (34 loc) · 1.34 KB
/
GenerativeProjectTest.pde
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*
Test class for generative project
*/
class GenerativeProjectTest {
public GenerativeProjectTest() {
}
public void runAll() {
// TEST 1
println("***** TEST 1 *****\nAdd languages of two repos...");
ArrayList<RepoLanguage> list1 = new ArrayList<RepoLanguage>();
list1.add(new RepoLanguage("CSS", 0.2));
list1.add(new RepoLanguage("HTML", 0.8));
ArrayList<RepoLanguage> list2 = new ArrayList<RepoLanguage>();
list2.add(new RepoLanguage("CSS", 0.5));
list2.add(new RepoLanguage("HTML", 0.2));
list2.add(new RepoLanguage("JS", 0.3));
ArrayList<RepoLanguage> resultList = addRepoLanguages(list1, list2);
for (int i = 0; i < resultList.size(); i++) {
println("Language no. " + (i + 1) + " -> " + resultList.get(i).name + ", " + resultList.get(i).percentage);
}
// TEST 2
println("***** TEST 2 *****\nGet random user...");
String x = getRandomUser();
println(x);
// ...
// RepoLanguage repoLanguage = new RepoLanguage();
// Get languages from specified repo
// repoLanguages = getRepoLanguages(testRepo);
// Get languages from random user of GitHub
// repoLanguages = getRandomUserLanguages();
// testing
println("---- END TESTS ----");
}
}