/** * Constructs an new event with specified binary attachment source, title and MIME-type * * @param attachment as byte array. * @param title of attachment. Shown at report as name of attachment * @param type MIME-type of attachment */ public MakeAttachmentEvent(byte[] attachment, String title, String type) { setTitle(title); setType(type); setAttachment(attachment); }
/** * Create an instance of {@link ClearStepStorageEvent } * */ public ClearStepStorageEvent createClearStepStorageEvent() { return new ClearStepStorageEvent(); }
/** * Sets message using fluent-api * * @param message to set * @return modified instance */ public TestCasePendingEvent withMessage(String message) { setMessage(message); return this; }
public TestCaseStartedEvent(String suiteUid, String name) { setSeverity(SeverityLevel.NORMAL); setSuiteUid(suiteUid); setName(name); }
/** * Constructs an new event with specified suiteUid and name * * @param suiteUid initial suiteUid * @param name initial name */ public TestCaseStartedEvent(String suiteUid, String name) { setSuiteUid(suiteUid); setName(name); }
public MakeAttachEvent(String title, AttachmentType attachmentType, Object attach) { setTitle(title); setAttachmentType(attachmentType); setAttach(attach); }
/** * Sets title using fluent-api * * @param title value to set * @return modified instance */ public TestCaseStartedEvent withTitle(String title) { setTitle(title); return this; }
/** * Sets title using fluent-api * * @param title value to set * @return modified instance */ public TestSuiteStartedEvent withTitle(String title) { setTitle(title); return this; }
/** * Sets description using fluent-api * * @param description value to set * @return modified instance */ public TestCaseStartedEvent withDescription(Description description) { setDescription(description); return this; }
/** * Create an instance of {@link ClearTestStorageEvent } * */ public ClearTestStorageEvent createClearTestStorageEvent() { return new ClearTestStorageEvent(); }
/** * Constructs an new event with specified name * * @param name initial name value */ public StepStartedEvent(String name) { setName(name); }
/** * Sets title using fluent-api * * @param title value to set * @return modified instance */ public StepStartedEvent withTitle(String title) { setTitle(title); return this; } }
/** * Constructs an new event with specified uid * * @param uid initial uid */ public TestSuiteFinishedEvent(String uid) { setUid(uid); }
/** * Sets throwable using fluent-api * * @param value to set * @return modified instance */ public TestCasePendingEvent withThrowable(Throwable value) { setThrowable(value); return this; } }
/** * Sets throwable using fluent-api * * @param value to set * @return modified instance */ public TestCaseCanceledEvent withThrowable(Throwable value) { setThrowable(value); return this; } }
/** * Returns default message (using in {@link ru.yandex.qatools.allure.events.TestCaseStatusChangeEvent} * if throwable not specified) * * @return default message */ @Override protected String getMessage() { return getStatus() == Status.FAILED ? "Test failed with unknown reason" : "Test broken with unknown reason"; }
/** * Sets throwable using fluent-api * * @param value to set * @return modified instance */ public TestCaseStatusChangeEvent withThrowable(Throwable value) { setThrowable(value); return this; } }
/** * Set specified throwable to event using fluent-api interface * * @param throwable the throwable to set * @return modified instance */ public StepFailureEvent withThrowable(Throwable throwable) { setThrowable(throwable); return this; }
/** * Create an instance of {@link ClearTestStorageEvent } * */ public ClearTestStorageEvent createClearTestStorageEvent() { return new ClearTestStorageEvent(); }