add tests for Parser
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user