OmniSciDB  95562058bd
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
com.mapd.parser.extension.ddl.ShowCommandTest Class Reference
+ Inheritance diagram for com.mapd.parser.extension.ddl.ShowCommandTest:
+ Collaboration diagram for com.mapd.parser.extension.ddl.ShowCommandTest:

Public Member Functions

 ShowCommandTest ()
 
void showUserSessions () throws Exception
 
void process_givenShowTablesDdlCommand_returnsExpectedJsonResponse () throws Exception
 
void showDatabases () throws Exception
 
void showQueries () throws Exception
 
- Public Member Functions inherited from com.mapd.parser.extension.ddl.DDLTest
void setup () throws Exception
 

Additional Inherited Members

- Protected Attributes inherited from com.mapd.parser.extension.ddl.DDLTest
String resourceDirPath
 
String jsonTestDir
 
- Static Protected Attributes inherited from com.mapd.parser.extension.ddl.DDLTest
static final Gson gson = new Gson()
 
- Package Functions inherited from com.mapd.parser.extension.ddl.DDLTest
TPlanResult processDdlCommand (final String ddlCommand) throws Exception
 
JsonObject getJsonFromFile (final String fileName) throws Exception
 

Detailed Description

Definition at line 10 of file ShowCommandTest.java.

Constructor & Destructor Documentation

com.mapd.parser.extension.ddl.ShowCommandTest.ShowCommandTest ( )
inline

Definition at line 11 of file ShowCommandTest.java.

References com.mapd.parser.extension.ddl.DDLTest.jsonTestDir, and com.mapd.parser.extension.ddl.DDLTest.resourceDirPath.

11  {
12  resourceDirPath = ShowCommandTest.class.getClassLoader().getResource("").getPath();
13  jsonTestDir = "showcommands";
14  }

Member Function Documentation

void com.mapd.parser.extension.ddl.ShowCommandTest.process_givenShowTablesDdlCommand_returnsExpectedJsonResponse ( ) throws Exception
inline

Definition at line 26 of file ShowCommandTest.java.

References com.mapd.parser.extension.ddl.DDLTest.getJsonFromFile(), com.mapd.parser.extension.ddl.DDLTest.processDdlCommand(), and run_benchmark_import.result.

27  {
28  final JsonObject expectedJsonObject = getJsonFromFile("show_tables.json");
29  final TPlanResult result = processDdlCommand("SHOW TABLES;");
30  final JsonObject actualJsonObject =
31  gson.fromJson(result.plan_result, JsonObject.class);
32  assertEquals(expectedJsonObject, actualJsonObject);
33  }
JsonObject getJsonFromFile(final String fileName)
Definition: DDLTest.java:37
TPlanResult processDdlCommand(final String ddlCommand)
Definition: DDLTest.java:32

+ Here is the call graph for this function:

void com.mapd.parser.extension.ddl.ShowCommandTest.showDatabases ( ) throws Exception
inline

Definition at line 36 of file ShowCommandTest.java.

References com.mapd.parser.extension.ddl.DDLTest.getJsonFromFile(), com.mapd.parser.extension.ddl.DDLTest.processDdlCommand(), and run_benchmark_import.result.

36  {
37  final JsonObject expectedJsonObject = getJsonFromFile("show_databases.json");
38  final TPlanResult result = processDdlCommand("SHOW DATABASES");
39  final JsonObject actualJsonObject =
40  gson.fromJson(result.plan_result, JsonObject.class);
41  assertEquals(expectedJsonObject, actualJsonObject);
42  }
JsonObject getJsonFromFile(final String fileName)
Definition: DDLTest.java:37
TPlanResult processDdlCommand(final String ddlCommand)
Definition: DDLTest.java:32

+ Here is the call graph for this function:

void com.mapd.parser.extension.ddl.ShowCommandTest.showQueries ( ) throws Exception
inline

Definition at line 45 of file ShowCommandTest.java.

References com.mapd.parser.extension.ddl.DDLTest.getJsonFromFile(), com.mapd.parser.extension.ddl.DDLTest.processDdlCommand(), and run_benchmark_import.result.

45  {
46  final JsonObject expectedJsonObject = getJsonFromFile("show_queries.json");
47  final TPlanResult result = processDdlCommand("SHOW QUERIES;");
48  final JsonObject actualJsonObject =
49  gson.fromJson(result.plan_result, JsonObject.class);
50  assertEquals(expectedJsonObject, actualJsonObject);
51  }
JsonObject getJsonFromFile(final String fileName)
Definition: DDLTest.java:37
TPlanResult processDdlCommand(final String ddlCommand)
Definition: DDLTest.java:32

+ Here is the call graph for this function:

void com.mapd.parser.extension.ddl.ShowCommandTest.showUserSessions ( ) throws Exception
inline

Definition at line 17 of file ShowCommandTest.java.

References com.mapd.parser.extension.ddl.DDLTest.getJsonFromFile(), com.mapd.parser.extension.ddl.DDLTest.processDdlCommand(), and run_benchmark_import.result.

17  {
18  final JsonObject expectedJsonObject = getJsonFromFile("show_user_sessions.json");
19  final TPlanResult result = processDdlCommand("SHOW USER SESSIONS;");
20  final JsonObject actualJsonObject =
21  gson.fromJson(result.plan_result, JsonObject.class);
22  assertEquals(expectedJsonObject, actualJsonObject);
23  }
JsonObject getJsonFromFile(final String fileName)
Definition: DDLTest.java:37
TPlanResult processDdlCommand(final String ddlCommand)
Definition: DDLTest.java:32

+ Here is the call graph for this function:


The documentation for this class was generated from the following file: