Skip to content
Snippets Groups Projects
Commit 289b1dd3 authored by Henning's avatar Henning
Browse files

added authors

parent f40e5709
No related branches found
No related tags found
No related merge requests found
......@@ -118,6 +118,7 @@ public class BPMNIOParameters {
* 15.12.2021
* getRemoveVariables on BPMNIOParameters
* @param taskId
* @author Henning Schmeink, Tim Flicke
*/
public List<String> getRemoveVariables(String taskId) {
return removeVariables.entrySet().stream() //
......@@ -131,6 +132,7 @@ public class BPMNIOParameters {
* 15.12.2021
* addRemoveVariable add removeVariable to HashMap removeVariables to use it on BPMNIOParameters
* @param taskId
* @author Henning Schmeink, Tim Flicke
*/
public void addRemoveVariable(String flowElementId, String removeVariable) {
List<String> existingVariables = this.removeVariables.get(flowElementId);
......@@ -143,6 +145,7 @@ public class BPMNIOParameters {
* 20.12.2021
* addSetVariable add setVariable to HashMap setVariables to use it on BPMNIOParameters
* @param taskId
* @author Henning Schmeink, Tim Flicke
*/
public void addSetVariable(String flowElementId, String setVarName, Object setVarValue) {
......@@ -207,6 +210,7 @@ public class BPMNIOParameters {
* 20.12.2021
* addGetVariable add getVariable to HashMap getVariables to use it on BPMNIOParameters
* @param taskId
* @author Henning Schmeink, Tim Flicke
*/
public void addGetVariable(String flowElementId, String getVarName) {
List<String> existingVariables = this.inputVariables.get(flowElementId);
......
......@@ -144,6 +144,7 @@ public class BPMNVariableIOScanner {
* 15.12.2021
* insert removeVariables to BPMNIOParameters
* @param baseElement
* @author Henning Schmeink, Tim Flicke
*/
private void insertRemoveVariable(FlowElement baseElement, String removeVar)
{
......@@ -154,6 +155,7 @@ public class BPMNVariableIOScanner {
* 20.12.2021
* insert getVariables to BPMNIOParameters
* @param baseElement
* @author Henning Schmeink, Tim Flicke
*/
private void insertGetVariable(FlowElement baseElement, String getVarName)
{
......@@ -164,6 +166,7 @@ public class BPMNVariableIOScanner {
* 20.12.2021
* insert setVariables to BPMNIOParameters
* @param baseElement
* @author Henning Schmeink, Tim Flicke
*/
private void insertSetVariable(FlowElement baseElement, String setVarName, Object setVarValue)
{
......@@ -174,6 +177,7 @@ public class BPMNVariableIOScanner {
* 15.12.2021
* Scan for removeExpressions
* @param baseElement
* @author Henning Schmeink, Tim Flicke
*/
private void scanExpressions(FlowElement baseElement) {
......@@ -261,6 +265,7 @@ public class BPMNVariableIOScanner {
* Split all Variables in the expression string (without value)
* @param strExpression
* @return
* @author Henning Schmeink, Tim Flicke
*/
private List<String> buildGetVariableHashMap(String strExpression) {
int start, end;
......@@ -292,6 +297,7 @@ public class BPMNVariableIOScanner {
* Split the variables in the expression string (with value)
* @param strExpression
* @return
* @author Henning Schmeink, Tim Flicke
*/
private HashMap<String, Object> buildSetVariableHashMap(String strExpression) {
int start, end;
......
......@@ -55,6 +55,10 @@ public class PrioritizationService {
this.newDSL = newDSL;
}
/**
* @throws IOException
* @author Henning Schmeink, Tim Flicke
*/
public void prioritize() throws IOException {
Map<String, List<VariableReference>> readVariablesOldDSL, writeVariablesOldDSL, readVariablesNewDSL, writeVariablesNewDSL, removeVariablesOldDSL, removeVariablesNewDSL;
......@@ -101,6 +105,7 @@ public class PrioritizationService {
/**
* Function to set the TestOrder for JUNIT5
* @param testPriorities
* @author Henning Schmeink, Tim Flicke
*/
private void setTestOrder(HashMap<String, Integer> testPriorities)
{
......@@ -133,6 +138,7 @@ public class PrioritizationService {
* Function to sort a HashMap by Value
* @param hm
* @return
* @author Henning Schmeink, Tim Flicke
*/
public static HashMap<String, Integer> sortByValue(HashMap<String, Integer> hm)
{
......@@ -157,6 +163,7 @@ public class PrioritizationService {
/**
* @param testPriorities
* @throws IOException
* @author Henning Schmeink, Tim Flicke
*/
private void setTestPriorities(HashMap<String, Integer> testPriorities) throws IOException
{
......@@ -170,6 +177,7 @@ public class PrioritizationService {
/**
* @return
* @author Henning Schmeink, Tim Flicke
*/
private HashMap<String, Integer> sumTestPriorities() {
List<Test> tests = this.newDSL.getTests();
......@@ -195,6 +203,13 @@ public class PrioritizationService {
return testPriorities;
}
/**
* @param size
* @param score
* @param dependency
* @author Henning Schmeink
* @return
*/
private static int sumTestPrioritiesByYAML(int size, int score, int dependency) {
YamlReader yamlReader = new YamlReader();
MigrationYaml yaml = yamlReader.loadConfigYaml();
......@@ -229,6 +244,7 @@ public class PrioritizationService {
* Here, the changes of the variables are compared to the flowelements
* @param differentVariables
* @return
* @author Henning Schmeink, Tim Flicke
*/
private HashMap<String, Integer> checkFlowsWhereVariableExists(HashMap<String, List<String>> differentVariables) {
HashMap<String, Integer> dependencyList = new HashMap<>();
......@@ -259,6 +275,7 @@ public class PrioritizationService {
* @param changeVariablesOLD
* @param changesVariablesNEW
* @return
* @author Henning Schmeink, Tim Flicke
*/
private HashMap<String, List<String>> checkDifferences(HashMap<String, List<String>> changeVariablesOLD, HashMap<String, List<String>> changesVariablesNEW)
{
......@@ -313,6 +330,11 @@ public class PrioritizationService {
}
/**
* @param firstList
* @param secondList
* @param removeList
*/
private void sumDependencies(HashMap<String, Integer> firstList, HashMap<String, Integer> secondList, HashMap<String, Integer> removeList)
{
for(Map.Entry<String, Integer> elem1 : firstList.entrySet())
......@@ -349,6 +371,7 @@ public class PrioritizationService {
* @param oldDSL
* @param newDSL
* @return HashMap<String, String> contains all FlowElementNames with the Variables
* @author Henning Schmeink, Tim Flicke
*/
private HashMap<String, List<String>> checkVariables(Map<String, List<VariableReference>> oldDSL, Map<String, List<VariableReference>> newDSL) {
......@@ -445,6 +468,7 @@ public class PrioritizationService {
*
* @param dsl
* @return
* @author Tim Flicke
*/
private Map<String, List<VariableReference>> getRemoveVariables(TestgeneratorDSLSerializer dsl) {
......@@ -511,6 +535,7 @@ public class PrioritizationService {
* Function to get the WriteVariables from the DSL
* @param dsl
* @return Map<String, List<VariableReference>>
* @author Henning Schmeink
*/
private Map<String, List<VariableReference>> getWriteVariables(TestgeneratorDSLSerializer dsl) {
......@@ -576,6 +601,7 @@ public class PrioritizationService {
* Function to get the readVariables from the DSL
* @param dsl
* @return Map<String, List<VariableReference>>
* @author Henning Schmeink, Tim Flicke
*/
private Map<String, List<VariableReference>> getReadVariables(TestgeneratorDSLSerializer dsl) {
......
......@@ -40,6 +40,12 @@ public class ConfigController {
@Autowired
private TestService testService;
/**
* @param projectId
* @return
* @throws IOException
* @author Henning Schmeink
*/
@RequestMapping(path = "/project/{projectId}/config", method = RequestMethod.GET)
public String[] getConfig(@PathVariable(required = true) Long projectId) throws IOException {
......@@ -67,6 +73,12 @@ public class ConfigController {
}
/**
* @param projectId
* @param arrayParams
* @throws IOException
* @author Henning Schmeink
*/
@RequestMapping(path = "/project/{projectId}/config", method = RequestMethod.POST)
public void saveConfig(@PathVariable(required = true) Long projectId, @RequestBody List<String> arrayParams) throws IOException {
try {
......@@ -90,6 +102,12 @@ public class ConfigController {
}
}
/**
* @param projectId
* @return
* @throws IOException
* @author Henning Schmeink
*/
@RequestMapping(path = "/project/{projectId}/priority", method = RequestMethod.GET)
public List<Test> getPriority(@PathVariable(required = true) Long projectId) throws IOException {
List<Test> tests = null;
......
......@@ -66,7 +66,7 @@ public class TestConverter {
EndChecks endCheckDeclaration = TestgeneratorDSLObjectCreator.createEndChecks(endChecks);
// @Tim, @Henning Priorität hier hinzufügen
// @Tim Flicke , @Henning Schmeink Priorität hier hinzufügen
int prio = testcase.getPriority();
int order = testcase.getOrder();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment