Skip to content

Commit

Permalink
refactor(test): removed last usage of command script from tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tglman committed Dec 7, 2024
1 parent 2e3bcaa commit 435724c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,17 @@

import static org.assertj.core.api.Assertions.assertThat;

import com.orientechnologies.BaseMemoryDatabase;
import com.orientechnologies.orient.core.record.impl.ODocument;
import com.orientechnologies.orient.core.sql.executor.OResult;
import com.orientechnologies.orient.core.sql.executor.OResultSet;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;

import com.orientechnologies.BaseMemoryDatabase;
import com.orientechnologies.orient.core.record.impl.ODocument;
import com.orientechnologies.orient.core.sql.executor.OResult;
import com.orientechnologies.orient.core.sql.executor.OResultSet;

public class OCommandExecutorSQLScriptTest extends BaseMemoryDatabase {

public void beforeTest() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import static org.junit.Assert.assertTrue;

import com.orientechnologies.BaseMemoryDatabase;
import com.orientechnologies.orient.core.command.script.OCommandScript;
import com.orientechnologies.orient.core.db.ODatabaseDocumentInternal;
import com.orientechnologies.orient.core.record.OElement;
import com.orientechnologies.orient.core.record.impl.ODocument;
Expand Down Expand Up @@ -342,8 +341,8 @@ public void testDottedTargetInScript() throws Exception {

StringBuilder script = new StringBuilder();
script.append("let $a = select from B;\n");
script.append("update $a.a set name = 'baz';\n");
db.command(new OCommandScript(script.toString())).execute();
script.append("update $a[0].a set name = 'baz';\n");
db.execute("sql", script.toString());

try (OResultSet result = db.query("select from A")) {
assertEquals(result.next().getProperty("name"), "baz");
Expand Down

0 comments on commit 435724c

Please sign in to comment.