Search in sources :

Example 1 with GenerationReportToAssert

use of com.devonfw.cobigen.api.assertj.GenerationReportToAssert in project cobigen by devonfw.

the class XmlPluginIntegrationTest method testMergeStrategyDefined_xmlmerge_override_attachTexts.

/**
 * Tests the merge strategy xmlmerge_override_attachTexts to exist and being registered.
 *
 * @throws Exception test fails
 */
@Test
public void testMergeStrategyDefined_xmlmerge_override_attachTexts() throws Exception {
    generateTemplateAndTestOutput("xmlTestTemplate_SingleChild", "xmlTestOutput_SingleChild.txt", null);
    GenerationReportToAssert asserts = generateTemplateAndTestOutput("xmlTestTemplate_SingleChild", "xmlTestOutput_SingleChild.txt", null);
    asserts.notContainsException(PluginNotAvailableException.class);
}
Also used : GenerationReportToAssert(com.devonfw.cobigen.api.assertj.GenerationReportToAssert) Test(org.junit.Test)

Example 2 with GenerationReportToAssert

use of com.devonfw.cobigen.api.assertj.GenerationReportToAssert in project cobigen by devonfw.

the class XmlPluginIntegrationTest method testMergeStrategyDefined_xmlmerge_override_validate.

/**
 * Tests the merge strategy xmlmerge_override_validate to exist and being registered.
 *
 * @throws Exception test fails
 */
@Test
public void testMergeStrategyDefined_xmlmerge_override_validate() throws Exception {
    generateTemplateAndTestOutput("xmlTestTemplate_VariablesConstantValidate", "xmlTestOutput_VariablesConstant.txt", null);
    GenerationReportToAssert asserts = generateTemplateAndTestOutput("xmlTestTemplate_VariablesConstantValidate", "xmlTestOutput_VariablesConstant.txt", null);
    asserts.notContainsException(PluginNotAvailableException.class);
}
Also used : GenerationReportToAssert(com.devonfw.cobigen.api.assertj.GenerationReportToAssert) Test(org.junit.Test)

Example 3 with GenerationReportToAssert

use of com.devonfw.cobigen.api.assertj.GenerationReportToAssert in project cobigen by devonfw.

the class XmlPluginIntegrationTest method testMergeStrategyDefined_xmlmerge_attachTexts_validate.

/**
 * Tests the merge strategy xmlmerge_attachTexts_validate to exist and being registered.
 *
 * @throws Exception test fails
 */
@Test
public void testMergeStrategyDefined_xmlmerge_attachTexts_validate() throws Exception {
    generateTemplateAndTestOutput("xmlTestTemplate_TextNodesValidate", "xmlTestOutput_TextNodes.txt", null);
    GenerationReportToAssert asserts = generateTemplateAndTestOutput("xmlTestTemplate_TextNodesValidate", "xmlTestOutput_TextNodes.txt", null);
    asserts.notContainsException(PluginNotAvailableException.class);
}
Also used : GenerationReportToAssert(com.devonfw.cobigen.api.assertj.GenerationReportToAssert) Test(org.junit.Test)

Example 4 with GenerationReportToAssert

use of com.devonfw.cobigen.api.assertj.GenerationReportToAssert in project cobigen by devonfw.

the class XmlPluginIntegrationTest method testMergeStrategyDefined_xmlmerge_validate.

/**
 * Tests the merge strategy xmlmerge_validate to exist and being registered.
 *
 * @throws Exception test fails
 */
@Test
public void testMergeStrategyDefined_xmlmerge_validate() throws Exception {
    generateTemplateAndTestOutput("xmlTestTemplate_ChildListValidate", "xmlTestOutput_ChildList.txt", null);
    GenerationReportToAssert asserts = generateTemplateAndTestOutput("xmlTestTemplate_ChildListValidate", "xmlTestOutput_ChildList.txt", null);
    asserts.notContainsException(PluginNotAvailableException.class);
}
Also used : GenerationReportToAssert(com.devonfw.cobigen.api.assertj.GenerationReportToAssert) Test(org.junit.Test)

Example 5 with GenerationReportToAssert

use of com.devonfw.cobigen.api.assertj.GenerationReportToAssert in project cobigen by devonfw.

the class XmlPluginIntegrationTest method testMergeStrategyNotFoundErrorMessageRegression.

/**
 * Regression test that the error message of cobigen-core has not been changed, which indicates a merge strategy to
 * not being found. This is necessary for the tests checking the already implemented merge strategies to exist.
 *
 * @throws Exception test fails
 */
@Test
public void testMergeStrategyNotFoundErrorMessageRegression() throws Exception {
    generateTemplateAndTestOutput("xmlTestTemplate_SingleAttribute", "xmlTestOutput_SingleAttribute.txt", null);
    GenerationReportToAssert asserts = generateTemplateAndTestOutput("xmlTestTemplate_SingleAttribute", "xmlTestOutput_SingleAttribute.txt", null);
    asserts.containsException(PluginNotAvailableException.class);
}
Also used : GenerationReportToAssert(com.devonfw.cobigen.api.assertj.GenerationReportToAssert) Test(org.junit.Test)

Aggregations

GenerationReportToAssert (com.devonfw.cobigen.api.assertj.GenerationReportToAssert)10 Test (org.junit.Test)9 CobiGen (com.devonfw.cobigen.api.CobiGen)1 GenerationReportTo (com.devonfw.cobigen.api.to.GenerationReportTo)1 TemplateTo (com.devonfw.cobigen.api.to.TemplateTo)1 File (java.io.File)1 AssertionFailedError (junit.framework.AssertionFailedError)1