Skip to content

Commit

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

0 comments on commit e66ac21

Please sign in to comment.