diff --git a/sfge/lib/apex-jorje-lsp-sfge.jar b/sfge/lib/apex-jorje-lsp-sfge.jar index 36d205d74..96e1b9bf5 100644 Binary files a/sfge/lib/apex-jorje-lsp-sfge.jar and b/sfge/lib/apex-jorje-lsp-sfge.jar differ diff --git a/sfge/src/test/java/com/salesforce/graph/vertex/VerticesTest.java b/sfge/src/test/java/com/salesforce/graph/vertex/VerticesTest.java index 7b58a60b0..6c4bb77f8 100644 --- a/sfge/src/test/java/com/salesforce/graph/vertex/VerticesTest.java +++ b/sfge/src/test/java/com/salesforce/graph/vertex/VerticesTest.java @@ -15,6 +15,7 @@ import org.apache.logging.log4j.Logger; import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource; import org.hamcrest.MatcherAssert; +import org.hamcrest.Matchers; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -198,7 +199,7 @@ public void testMethodAuraAnnotations() { AnnotationVertex annotation = annotations.get(0); MatcherAssert.assertThat(annotation.getName(), equalTo(Schema.AURA_ENABLED)); List annotationParameters = annotation.getParameters(); - MatcherAssert.assertThat(annotationParameters, hasSize(equalTo(2))); + MatcherAssert.assertThat(annotationParameters, hasSize(equalTo(3))); } @Test @@ -764,4 +765,20 @@ public void testEnumSwitchStatement() { LiteralExpressionVertex literalExpression = literalCase.getLiteralExpression(); MatcherAssert.assertThat(literalExpression, instanceOf(LiteralExpressionVertex.Null.class)); } + + @Test + public void testInsertAsUserSyntax() { + String sourceCode = + "public class MyClass {\n" + + " public void doSomething() {\n" + + " Account acc = new Account(Name = 'Acme Inc');\n" + + " insert as user acc;\n" + + " }\n" + + "}\n"; + + TestUtil.buildGraph(g, sourceCode); + DmlInsertStatementVertex insertStatementVertex = + TestUtil.getVertexOnLine(g, ASTConstants.NodeType.DML_INSERT_STATEMENT, 4); + MatcherAssert.assertThat(insertStatementVertex, Matchers.notNullValue()); + } }