Move blackBoxFile() testData to box/ directory
Delete all test methods (and empty test classes), since they'll be auto-generated
This commit is contained in:
committed by
Alexander Udalov
parent
ecbb2f10ef
commit
41a416da60
@@ -0,0 +1,35 @@
|
||||
|
||||
class JsonObject() {
|
||||
}
|
||||
|
||||
class JsonArray() {
|
||||
}
|
||||
|
||||
public trait Formatter<in IN: Any, out OUT: Any> {
|
||||
public fun format(source: IN?): OUT
|
||||
}
|
||||
|
||||
public trait MultiFormatter <in IN: Any, out OUT: Any> {
|
||||
public fun format(source: Collection<IN>): OUT
|
||||
}
|
||||
|
||||
public class Project() {
|
||||
}
|
||||
|
||||
public trait JsonFormatter<in IN: Any>: Formatter<IN, JsonObject>, MultiFormatter<IN, JsonArray> {
|
||||
public override fun format(source: Collection<IN>): JsonArray {
|
||||
return JsonArray();
|
||||
}
|
||||
}
|
||||
|
||||
public class ProjectJsonFormatter(): JsonFormatter<Project> {
|
||||
public override fun format(source: Project?): JsonObject {
|
||||
return JsonObject()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fun box(): String {
|
||||
val formatter = ProjectJsonFormatter()
|
||||
return if (formatter.format(Project()) != null) "OK" else "fail"
|
||||
}
|
||||
Reference in New Issue
Block a user