Skip to content

Commit

Permalink
Adding unit test
Browse files Browse the repository at this point in the history
Fixes #9314
  • Loading branch information
ycombinator committed Apr 4, 2018
1 parent 60ae51e commit d5c9d33
Showing 1 changed file with 25 additions and 0 deletions.
@@ -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());
}
}

0 comments on commit d5c9d33

Please sign in to comment.