forked from elastic/logstash
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
logstash-core/src/test/java/org/logstash/config/ir/imperative/IfStatementTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package org.logstash.config.ir.imperative; | ||
|
||
import org.junit.Test; | ||
import static org.junit.Assert.assertTrue; | ||
|
||
import org.logstash.config.ir.InvalidIRException; | ||
import org.logstash.config.ir.graph.Graph; | ||
|
||
import static org.logstash.config.ir.IRHelpers.*; | ||
|
||
public class IfStatementTest { | ||
|
||
@Test | ||
public void testEmptyIfStatement() throws InvalidIRException { | ||
IfStatement ifStatement = new IfStatement( | ||
randMeta(), | ||
createTestExpression(), | ||
new NoopStatement(randMeta()), | ||
new NoopStatement(randMeta()) | ||
); | ||
|
||
Graph ifStatementGraph = ifStatement.toGraph(); | ||
assertTrue(ifStatementGraph.isEmpty()); | ||
} | ||
} |