ru.yandex.qatools.allure.storages.TestStorage Maven / Gradle / Ivy
package ru.yandex.qatools.allure.storages;
import ru.yandex.qatools.allure.model.TestCaseResult;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
/**
* @author Dmitry Baev [email protected]
* Date: 06.11.13
*/
public final class TestStorage {
private static final Map testData = new ConcurrentHashMap<>();
private TestStorage() {
}
private static void checkTest(String uid) {
if (!testData.containsKey(uid)) {
testData.put(uid, new TestCaseResult());
}
}
public static TestCaseResult getTest(String uid) {
checkTest(uid);
return testData.get(uid);
}
public static TestCaseResult pollTest(String uid) {
checkTest(uid);
return testData.remove(uid);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy