use of de.taimos.pipeline.aws.cloudformation.parser.JSONParameterFileParser in project pipeline-aws-plugin by jenkinsci.
the class ParameterParserTest method shouldParseJSON.
@Test
public void shouldParseJSON() throws Exception {
JSONParameterFileParser parser = new JSONParameterFileParser();
Collection<Parameter> parameters = parser.parseParams(this.getClass().getResourceAsStream("/params.json"));
Parameter[] array = parameters.toArray(new Parameter[0]);
Assert.assertEquals(2, array.length);
Parameter param1 = array[0];
Assert.assertEquals("Param1", param1.getParameterKey());
Assert.assertEquals("Value1", param1.getParameterValue());
Parameter param2 = array[1];
Assert.assertEquals("Param2", param2.getParameterKey());
Assert.assertEquals("Value2", param2.getParameterValue());
}
Aggregations