private Label convert(final ru.yandex.qatools.allure.model.Label label) { return new Label() .setName(label.getName()) .setValue(label.getValue()); }
final Optional<ru.yandex.qatools.allure.model.Label> historyId = findLabel(source.getLabels(), "historyId"); if (historyId.isPresent()) { dest.setHistoryId(historyId.get().getValue()); } else { dest.setHistoryId(getHistoryId(String.format("%s#%s", testClass, name), parameters));
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) { int currentHashCode = 1; { String theName; theName = this.getName(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "name", theName), currentHashCode, theName); } { String theValue; theValue = this.getValue(); currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "value", theValue), currentHashCode, theValue); } return currentHashCode; }
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) { if (!(object instanceof Label)) { return false; } if (this == object) { return true; } final Label that = ((Label) object); { String lhsName; lhsName = this.getName(); String rhsName; rhsName = that.getName(); if (!strategy.equals(LocatorUtils.property(thisLocator, "name", lhsName), LocatorUtils.property(thatLocator, "name", rhsName), lhsName, rhsName)) { return false; } } { String lhsValue; lhsValue = this.getValue(); String rhsValue; rhsValue = that.getValue(); if (!strategy.equals(LocatorUtils.property(thisLocator, "value", lhsValue), LocatorUtils.property(thatLocator, "value", rhsValue), lhsValue, rhsValue)) { return false; } } return true; }
private List<String> getStoryKeys(TestCaseResult currentTestCaseResult) { List<String> storyKeys = new ArrayList<String>(); for (Label currentLabel : currentTestCaseResult.getLabels()) { if (currentLabel.getName().equalsIgnoreCase("story") && !currentLabel.getValue().isEmpty()) { storyKeys.add(currentLabel.getValue()); } } return storyKeys.size() != 0 ? storyKeys : null; }
private TestLevel getSeverity(TestCaseResult currentTestCaseResult) { String severity = ""; for (Label currentLabel : currentTestCaseResult.getLabels()) { if (currentLabel.getName().equalsIgnoreCase("severity") && !currentLabel.getValue().isEmpty()) { severity = currentLabel.getValue(); } } if (!(severity.isEmpty())) { switch (SeverityLevel.fromValue(severity)) { case TRIVIAL: return TestLevel.TRIVIAL; case MINOR: return TestLevel.MINOR; case CRITICAL: return TestLevel.CRITICAL; case BLOCKER: return TestLevel.BLOCKER; default: return TestLevel.MAJOR; } } return null; }
private Label convert(final ru.yandex.qatools.allure.model.Label label) { return new Label() .setName(label.getName()) .setValue(label.getValue()); }
final Optional<ru.yandex.qatools.allure.model.Label> historyId = findLabel(source.getLabels(), "historyId"); if (historyId.isPresent()) { dest.setHistoryId(historyId.get().getValue()); } else { dest.setHistoryId(getHistoryId(String.format("%s#%s", testClass, name), parameters));