OmniSciDB  6686921089
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ReassignOwnedTest.java
Go to the documentation of this file.
1 package com.mapd.parser.extension.ddl;
2 
3 import static org.junit.Assert.assertEquals;
4 
5 import com.google.gson.JsonObject;
6 import com.omnisci.thrift.calciteserver.TPlanResult;
7 
8 import org.junit.Test;
9 
10 public class ReassignOwnedTest extends DDLTest {
11  public ReassignOwnedTest() {
12  resourceDirPath = ReassignOwnedTest.class.getClassLoader().getResource("").getPath();
13  jsonTestDir = "reassignowned";
14  }
15 
16  @Test
17  public void reassignOwned() throws Exception {
18  final JsonObject expectedJsonObject = getJsonFromFile("reassign_owned.json");
19  final TPlanResult result =
20  processDdlCommand("REASSIGN OWNED BY user_1, user_2 To user_3;");
21  final JsonObject actualJsonObject =
22  gson.fromJson(result.plan_result, JsonObject.class);
23  assertEquals(expectedJsonObject, actualJsonObject);
24  }
25 }
JsonObject getJsonFromFile(final String fileName)
Definition: DDLTest.java:37
TPlanResult processDdlCommand(final String ddlCommand)
Definition: DDLTest.java:32