Skip to content

Commit e4e648a

Browse files
committed
Add testng test case
Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
1 parent fbb1579 commit e4e648a

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package graphql.schema.idl;
2+
3+
import org.testng.annotations.Test;
4+
import graphql.GraphQLException;
5+
6+
public class SchemaParserTest {
7+
8+
@Test
9+
public void testNumberFormatException() {
10+
String[] malformedStrings = {
11+
"{B(t:66E3333333320,t:#\n66666666660)},622»» »»»6666662}}6666660t:z6666"
12+
};
13+
14+
for (String malformed : malformedStrings) {
15+
try {
16+
SchemaParser parser = new SchemaParser();
17+
parser.parse(malformed);
18+
} catch (GraphQLException e) {
19+
// Known exception
20+
}
21+
}
22+
}
23+
}

0 commit comments

Comments
 (0)