add tests for Parser

This commit is contained in:
Naoyuki Kanezawa
2013-05-01 02:45:48 +09:00
parent 8b7b2125fc
commit 1200b464a1
4 changed files with 226 additions and 7 deletions

View File

@@ -15,14 +15,12 @@ public class Packet {
public String type;
public String data;
public Packet(String type) {
this(type, null);
}
public Packet(String type, String data) {
this.type = type;
this.data = data;
}
@Override
public String toString() {
return String.format("{\"type\": \"%s\", \"data\": \"%s\"}", this.type, this.data);
}
}