private String createFileName(final Type testCaseType) { final String type = testCaseType.toString(); return "TEST-" + type + ".xml"; }
/** * Checks if test documentation information is provided. * * @return <code>true</code> if test documentation is provided, * <code>false</code> otherwise. */ public boolean isIndexProvided() { return index != null && !index.isEmpty(); }
Type getType() { final Type testCase = scenario.getTestCaseType(); return testCase; }
@Override protected void renderTestDocTypeStart(final UnitTestDoc testDoc) { final Type type = testDoc.getUutType(); final String id = type.toString(); final String name = type.getTypeName(); sink.section3(); helper.renderAnchor(id); sink.sectionTitle3(); sink.text(name + " (" + type.getPackageName() + ')'); sink.sectionTitle3_(); }
/** * {@inheritDoc} * * @see de.smartics.testdoc.report.index.ExportIndex#addToIndex(de.smartics.testdoc.core.doc.UnitTestDoc) */ @Override public void addToIndex(final UnitTestDoc testDoc) { final Type type = testDoc.getUutType(); final String packageName = type.getPackageName(); final Map<String, UnitTestDoc> nameIndex = getNameIndex(packageName); final String typeName = type.getTypeName(); nameIndex.put(typeName, testDoc); }
@Override protected void renderSentence(final ScenarioTestDoc scenario) { sink.tableCell(); final String testSentence = messages.getLabel(scenario.getId(), scenario.getTestMethod() .getTestSentence()); sink.text(testSentence); sink.tableCell_(); }
private void writeType(final Type type) throws XMLStreamException { final String packageName = type.getPackageName(); if (StringUtils.isNotBlank(packageName)) { writeElement("package", packageName); } writeElement("type", type.getTypeName()); }
/** * {@inheritDoc} * * @see de.smartics.testdoc.report.index.ExportIndex#addToIndex(de.smartics.testdoc.core.doc.UnitTestDoc) */ @Override public void addToIndex(final UnitTestDoc testDoc) { final Type type = testDoc.getUutType(); final String typeName = type.getTypeName(); index.put(typeName, testDoc); }
/** * Checks if the scenario is accepted. * * @param scenario the scenario to check. * @return true when accepted false otherwise. */ public boolean acceptScenario(final ScenarioTestDoc scenario) { return acceptsAllOf(scenario.getCategories()); }
TestMethodDoc getTestMethod() { return scenario.getTestMethod(); }
/** * Convenience constructor. * * @param resultType the result type of the test case. * @param time the reported duration of the test case execution. * @param testCaseType * @param testMethodName the name of the test method. */ public JUnitTestMethodDoc(final ResultType resultType, final String time, final String testCaseType, final String testMethodName) { this(resultType, time, new Type(testCaseType), testMethodName); }
/** * Convenience constructor with default values for structures not needed for * non visual reports. */ public ReportConfig() { this(SelectionFilter.STANDARD, InformationFilter.SHOW_DEFAULTS, null, new ImageHelper(null), ExternalReportReferences.EMPTY, new UnitTestDocNaturalComparator()); }
@Override protected void renderTestDocTypeStart(final UnitTestDoc testDoc) { final Type type = testDoc.getUutType(); final String id = type.toString(); final String name = type.getTypeName(); sink.section3(); helper.renderAnchor(id); sink.sectionTitle3(); sink.text(name + " (" + type.getPackageName() + ')'); sink.sectionTitle3_(); }
/** * {@inheritDoc} * * @see de.smartics.testdoc.maven.export.AbstractReportExporter#renderSentence(de.smartics.testdoc.report.doc.ScenarioTestDoc) */ @Override protected void renderSentence(final ScenarioTestDoc scenario) throws IOException { try { final String testSentence = messages.getLabel(scenario.getId(), scenario.getTestMethod() .getTestSentence()); writeElement("sentence", testSentence); } catch (final XMLStreamException e) { throw new IOException("Cannot write sentence.", e); } }
private void writeType(final Type type) throws XMLStreamException { final String packageName = type.getPackageName(); if (StringUtils.isNotBlank(packageName)) { writeElement("package", packageName); } writeElement("type", type.getTypeName()); }
Type getType() { final Type testCase = scenario.getTestCaseType(); return testCase; }
TestMethodDoc getTestMethod() { return scenario.getTestMethod(); }
@Override protected void renderSentence(final ScenarioTestDoc scenario) { sink.tableCell(); final String testSentence = messages.getLabel(scenario.getId(), scenario.getTestMethod() .getTestSentence()); sink.text(testSentence); sink.tableCell_(); }
protected void renderTableEnd(final ScenarioTestDoc scenarioRepresentant) throws IOException { final Type testCaseType = scenarioRepresentant.getTestCaseType(); final JUnitTestCaseManager junitManager = testDocHelper.getJunitManager(); junitManager.evict(testCaseType); }
protected void renderTableEnd(final ScenarioTestDoc scenarioRepresentant) throws IOException { final Type testCaseType = scenarioRepresentant.getTestCaseType(); final JUnitTestCaseManager junitManager = testDocHelper.getJunitManager(); junitManager.evict(testCaseType); }