Skip to content

Commit

Permalink
Init debugging for #6
Browse files Browse the repository at this point in the history
  • Loading branch information
mdewilde committed Nov 14, 2017
1 parent abd72da commit d1d348d
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
37 changes: 37 additions & 0 deletions src/main/resources/chart.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"type": "bar",
"data": {
"labels": ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"],
"datasets": [{
"label": "# of Votes",
"data": [12, 19, 3, 5, 2, 3],
"backgroundColor": [
"rgba(255, 99, 132, 0.2)",
"rgba(54, 162, 235, 0.2)",
"rgba(255, 206, 86, 0.2)",
"rgba(75, 192, 192, 0.2)",
"rgba(153, 102, 255, 0.2)",
"rgba(255, 159, 64, 0.2)"
],
"borderColor": [
"rgba(255,99,132,1)",
"rgba(54, 162, 235, 1)",
"rgba(255, 206, 86, 1)",
"rgba(75, 192, 192, 1)",
"rgba(153, 102, 255, 1)",
"rgba(255, 159, 64, 1)"
],
"borderWidth": 1
}]
},
"options": {
"scales": {
"yAxes": [{
"ticks": {
"beginAtZero":true,
"padding": 25
}
}]
}
}
}
25 changes: 25 additions & 0 deletions src/test/java/be/ceau/chart/tests/DeserializeTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package be.ceau.chart.tests;

import java.io.IOException;
import java.util.Scanner;

import org.junit.Test;

public class DeserializeTest {

@Test
public void deserialize() {
try {

Scanner scanner = new Scanner(getClass().getResource("/chart.json").openStream());
String text = scanner.useDelimiter("\\A").next();
scanner.close();



} catch (IOException e) {
e.printStackTrace();
}
}

}

0 comments on commit d1d348d

Please sign in to comment.